0% found this document useful (0 votes)
5 views103 pages

Odbc SQL2000 1 5

The document is a software license agreement for SQL Server by Harris Corporation, outlining the terms of use, proprietary rights, and limitations of liability. It specifies that the software is licensed for use on a single CPU, prohibits unauthorized copying and distribution, and includes a limited warranty for the physical media. Additionally, it addresses government restrictions, termination conditions, and the governing laws of California.

Uploaded by

ryu0001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views103 pages

Odbc SQL2000 1 5

The document is a software license agreement for SQL Server by Harris Corporation, outlining the terms of use, proprietary rights, and limitations of liability. It specifies that the software is licensed for use on a single CPU, prohibits unauthorized copying and distribution, and includes a limited warranty for the physical media. Additionally, it addresses government restrictions, termination conditions, and the governing laws of California.

Uploaded by

ryu0001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 103

SQL Server

Reference Guide
Edition 1.5
Part No.: 845636-00
HARRIS SOFTWARE LICENSE AGREEMENT

Your use of the software and operation manual means you agree to become bound by the
terms of this license agreement. If you do not agree to the terms of this agreement, do not
use the software and promptly return the entire package, along with any other product
materials, to the place where you obtained it for a full refund.

1. License
Harris hereby grants to you the right to use the Software only on a single CPU at a
time, at a single location. You may make one copy of the Software in machine
readable form, solely for backup purposes. The enclosed Software and any written
materials (the «Reference Guide») from Harris are licensed, not sold, to you for use
only upon the terms of this Agreement. Harris serves any rights not expressly granted
to you under this Agreement. You own the magnetic or other physical medium on
which the software is originally or subsequently recorded or fixed, but Harris retains
ownership of the Software recorded on the original disk and all subsequent copies of
the Software, regardless of the form or media on which the original and other copies
may exist.

2. Proprietary Rights
The Software and the Reference Guide contain trade secrets. You may not decompile,
reverse engineer, disassemble or otherwise reduce the Software to a human
perceivable form. The Software and the Reference Guide are copyrighted. You must
reproduce on each copy Harris’s copyright notice and any other proprietary legends
that were on the original copies supplied by Harris. You may not modify, adapt,
translate, rent, lease, loan, resell distribute, network, or create derivative works based
upon the Software or any part thereof. Unauthorized copying of the Software,
including Software that has been modified, merged or included with other Software,
or of the Reference Guide is expressly forbidden. You may be held legally
responsible for any infringement that is caused or encouraged by your failure to abide
by the terms of this Agreement.

3. Transfers
You may not electronically transfer the Software from one CPU to another over a
network. You may not distribute or otherwise transfer copies of the Software or the
Reference Guide to others, even if you are transferring the hardware on or with which
the Software is used. Nothing in this paragraph 3 shall impair any rights you may
otherwise have against Harris for any rights granted by Harris under this Agreement.

4. Termination
You may use the Software until this Agreement terminates. You may terminate this
Agreement at any time by destroying the Software and all copies thereof. This
Agreement terminates automatically without notice from Harris if you fail to comply
with any provision of this Agreement. Upon termination, you must destroy the
Software and any copies thereof.
Limited Warranty and Disclaimer of Warranty

5.1 Media
Harris warrants to the original Licensee that the disk(s) on which the Software is
recorded is free from defects in materials and workmanship under normal use and
service for a period of ninety (90) days from the date of delivery as evidenced by a
copy of the receipt. Harris entire liability and your exclusive remedy as to the disk(s)
shall be, at Harris option, either (a) return of the purchase price or (b) replacement of
the disk that does not meet the foregoing limited warranty and which is returned to
Harris with a copy of the receipt. Any replacement disk will be warranted for the
remainder of the original warranty period. Harris shall have no responsibility to
replace the disk or hardware, or refund the purchase price, if the disk failed due to
accident, abuse, or misapplication.

5.2 Operation
The limited warranty is the only warranty given by Harris in connection with the
Software and the Reference Guide delivered pursuant to this Agreement. EXCEPT
AS PROVIDED IN SECTIONS 5.1 AND 5.2. THE SOFTWARE AND THE
USER’S MANUAL (INCLUDING ANY INSTRUCTIONS FOR USE) ARE
PROVIDED «AS IS» WITHOUT WARRANTY OF ANY KIND. HARRIS DOES
NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATION
REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE
OR USER’S MANUAL IN TERMS OF CORRECTNESS, ACCURACY,
RELIABILITY, CURRENTNESS, OR OTHERWISE. WITH REGARD TO THE
SOFTWARE AND THE USER’S MANUAL, HARRIS DISCLAIMS ALL
WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR
ANY WARRANTIES ARISING OUT OF A COURSE OF DEALING. NO ORAL
OR WRITTEN INFORMATION OR ADVICE GIVEN BY HARRIS, ITS
DEALERS, DISTRIBUTORS, AGENTS, OR EMPLOYEES SHALL CREATE A
WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS
WARRANTY, AND YOU MAY NOT RELY ON ANY SUCH INFORMATION
OR ADVICE. EXCEPT AS SET FORTH IN SECTION 5.2. IF THE SOFTWARE
OR USER’S MANUAL IS DEFECTIVE YOU, AND NOT HARRIS OR ITS
DEALERS, DISTRIBUTORS, AGENTS, OR EMPLOYEES, ASSUME THE
ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR
CORRECTION. THE PRICE CHARGED BY HARRIS FOR THE SOFTWARE
AND USER’S MANUAL DOES NOT INCLUDE ANY CONSIDERATION FOR
ASSUMPTION BY HARRIS OF ANY RISK OF ANY DAMAGES INCURRED
BY YOU WITH RESPECT TO THE SOFTWARE OR THE USER’S MANUAL.
THE ENTIRE RISK ARISING OUT OF YOUR USE OF THE SOFTWARE IS
ASSUMED BY YOU. ACCORDINGLY, AND NOTWITHSTANDING THE
FAILURE OF THE ESSENTIAL PURPOSE OF ANY REMEDY, NEITHER
HARRIS NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE
CREATION, PRODUCTION, OR DELIVERY OF THE SOFTWARE OR USER’S
MANUAL SHALL BE LIABLE FOR ANY DIRECT, INDIRECT,
CONSEQUENTIAL, OR INCIDENTAL DAMAGES (INCLUDING DAMAGES
FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS
OF BUSINESS INFORMATION, AND THE LIKE) ARISING OUT OF THE USE
OF OR INABILITY TO USE SUCH PRODUCT EVEN IF HARRIS HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

6 U.S. Government Restricted Rights


The Software and documentation are provided with Restricted Rights. Use,
duplication, or disclosure by the Government is subject to restrictions as set forth in
subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software
clause at DFARS 252.227-7013 or subparagraphs (c)(2) and (2) of the Commercial
Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable.
Contractor/manufacturer is Harris Automation Solutions, 1134 E. Arques Avenue,
Sunnyvale, CA 94806.

7 Miscellaneous
This Agreement is a complete and exclusive statement of the Agreement between us
and supersedes any proposal or prior Agreement, oral or written and any other prior
or subsequent communications between us relating to the subject matter of this
Agreement. This Agreement shall be construed, interpreted and governed by the laws
of the State of California, excluding its conflict of laws provisions to the extent such
provisions would apply the law of another jurisdiction.

COPYRIGHT
This manual is copyright © 1999 by Harris Corporation. ADC-100 software is copyright
© 1990-1999 by Harris Corporation. All rights reserved.

TRADEMARKS
All brand names and product names used in this book are trademarks, registered
trademarks, or trade names of their respective holders.

The information contained in this document has been checked and is believed to be
reliable. However, Harris assumes no responsibility for errors or omissions, and reserves
the right to make changes to the product described herein and the documentation without
prior notice.
1 Introduction 3
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Other Support Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Conventions Used In This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Your Feedback Requested . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

2 SQL Server Installation 7


System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
SQL Server Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Upgrading to SQL Server 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Installing Microsoft SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Creating the SQL Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Extracting the SQL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Running the Createdb.sql Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Running the Createusr.sql Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

3 SQL Server 2000 Overview 29


SQL Server 2000 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Service Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33

4 SQL Client Installation 35


Installing the SQL Server 2000 Client Connectivity Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Configuring the ODBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Configuring the Clients to use SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Updating the Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Reconfiguring the Database Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

5 Adding Fields 51

6 More Info Windows 53


MIBuilder Work Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53

1
Contents

Inserting a Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Group Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Result Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Deleting a Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Resizing a Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Repositioning a Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
MoreInfo Window in Media Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
MoreInfo Window in Air Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

7 Database Backup & Restore 63


Creating an Automatic Backup Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Restoring the Database from a Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Advanced Backup Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Switching tapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
More frequent backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Appending backups to the same tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Backing up the transaction log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Labeling Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Combinations of the above . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Backing up to the disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

8 Appendix A: Editing Scripts 93


Editing the Createdb.sql File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Editing the Createusr.sql File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

9 Appendix B: Troubleshooting 97
Symptoms/Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

2
Chapter 1
Introduction

The Harris SQL Server database product adds the functionality of an ODBC-compliant
database to your existing Harris automation system. In addition to a wide range of features
inherent to an ODBC database (such as the ability to share and exchange information between
Harris Client applications and other broadcast devices), the Harris SQL Server product allows
you to add your own fields for any spot or event. You can then create windows that display the
added fields—as well as standard fields—in Media Client and Air Client with an easy-to-use,
graphical interface software tool.

About This Guide


Before you can use the Harris SQL Server product, you must first install SQL Server software
on the File Server PC connected to the Harris automation network. Chapter 2, SQL Server
Installation, describes the procedure for installing Microsoft SQL Server 2000 software, the
SQL server software Harris recommends and supports. It also describes how to use the SQL
scripts provided by Harris to create a SQL database for your automation system.

To create and display custom ODBC database fields, Media Client and Air Client require a
special configuration. Chapter 3, Client Setup, describes how to configure Media Client and
Air Client workstations on the Harris automation network to access and use the SQL Server
database.

When the SQL Server software is installed and the Client workstations are configured to use
the Harris ODBC database, you can add your own fields. Chapter 4, Adding Fields, describes
how to use the Microsoft SQL Server 2000 software tool, “Enterprise Manager,” to add fields
to the Harris ODBC database.

A Harris software tool called, “MoreInfo Builder,” is accessible from each Client application
you configure to work with the ODBC database. Chapter 5, MoreInfo Builder, provides
instructions on how to use the MIBuilder interface to construct windows that display database
information for use with Media Client and Air Client. It also describes how to access the
MoreInfo window in the Client applications.

Other Support Documents


In addition to the Harris SQL Server Reference Guide, you may also require documentation
that did not come with the Harris SQL Server product:

3
INTRODUCTION
1 Conventions Used In This Guide

• Air Client Reference Guide. To display MoreInfo windows, you must be able to access IDs
in the playlist or transmission list windows in Air Client. If you are unfamiliar with how to
perform this task, refer to the documentation that came with Air Client.

• Media Client User’s Guide. To enter data in fields you added when creating spots, you must
be able to access and use spot preparation windows in Media Client. If you are unfamiliar
with how to perform this task, refer to the documentation that came with Media Client.

• Microsoft SQL Server online documentation. For custom SQL server installations or to
use ODBC database features that are not described in this guide, you will need the online
documentation that comes with the Microsoft SQL Server installation CD. The Harris SQL
Server Reference Guide is limited to the discussion of the installation configuration options
Harris recommends and requires for successful operation and the special features that Harris
supports (i.e., adding fields and creating MoreInfo windows).

• SQL Import & Export Utility (User Note). This user note explains how to import or export
the database to and from various formats using the SQL Import & Export Utility. This is
useful as an additional way to backup or restore the database, as well as a simple way for
moving or sending the database from server to another.

• Database Translator (User Note). When upgrading an automation system from Btrieve to
SQL, the database needs to be converted to preserve the records. The Database Translator is
a simple tool used to do this and is explained in this user note. The database translator can
also be used to convert a database between different versions of Btrieve. (Btrieve <->
Btrieve, Btrieve <-> SQL)

Conventions Used In This Guide


The following notational conventions are used in this guide:

NOTE A note contains information to help you efficiently use the described functionality. The
information is not usually of dire consequence, such as the information in a warning, but is
important nonetheless.

WARNING A warning describes actions that could cause Media Client to


perform in such a way that could adversely affect broadcast facility
operations, or even transmission.

The following typographical conventions are used in this guide:

• Courier indicates text that is entered by the user.

Example: D:\CD Title\Folder\Setup.exe is what is typed, whereas any


surrounding text not in Courier would not be typed.

4
INTRODUCTION
Your Feedback Requested

• Brackets [ ] indicate the definition of a dynamic parameter or information displayed by the


application that cannot be accurately predicted in every case.

Example: The Choose Device - [device name] dialog box may be written, but the actual dialog
box will display, perhaps, Choose Device - MAINSERVER. Because the name of a device
server varies in broadcast facilities, [device name] is used to indicate the dynamic nature of
device server names.

Another example: If this guide instructs the user to type a command, such as
DelimitPosition=[character position], the words [character
position] are not typed, but a value substituted by the user is.

• Text in boldface is used to emphasize or delineate a term, phrase, or action from the rest of
paragraph.

Your Feedback Requested


The information contained in this guide has been thoroughly tested and verified; however,
should you discover errors or have suggestions for future publishings, contact Harris
Automation Solutions at:

Harris Automation Solutions


ATTN: Technical Publications Department
1134 East Arques Avenue
Sunnyvale, California 94086
(650) 595-8293
(650) 595-8396 (FAX)

You can also send e-mail to [email protected].

If you want to receive notification when the Harris SQL Server documentation is updated or
changed, send e-mail to the same above address.

Please specify the product you wish to receive documentation updates and changes for in the
Subject field of the e-mail.

NOTE Your e-mail address is kept confidential and is not shared with any other company. Also, it is
not used for any other purpose than what is specified in this guide.

5
INTRODUCTION
1 Your Feedback Requested

6
Chapter 2
SQL Server Installation

This chapter describes the procedures for installing and configuring Microsoft SQL Server
2000 to establish an ODBC database for use with the Media Client and Air Client
workstations. You must be familiar with the basic functions and operations of Microsoft
Windows NT 4.0 or later. If you are not familiar with this operating system, consult the
documentation that came with it.

NOTE OCTOPUS SUPPORT


Using SQL Server 2000 with an Octopus system requires a specific installation procedure and
additional changes to the Octopus setup to support SQL Server. Please refer to the Standby
Fileserver Manual for further details before installing SQL Server.

In this chapter, you will:

• Install the Microsoft SQL Server 2000 software, which provides the engine to use the Harris
automation system database.

• Create a new ODBC database using SQL scripts provided by Harris and then configuring
Client workstations to access the database.

System Requirements
SQL Server must be installed on the Harris Automation File Server PC.

Also, before installing the Microsoft SQL Server 2000 software, ensure the file server PC
meets the following hardware and software requirements:

Microsoft Windows NT Server 4.0 or later or Microsoft Windows NT 4.0


Enterprise Edition with Service Pack 5.0 or later
Internet Explorer 5.0 or later
Intel, or compatible, Pentium 166 MHz processor or higher
95-270 MB hard drive space (for typical installations)
SVGA (800x600) or higher resolution monitor
64 MB of memory
CD-ROM Drive
100-base T network interface card

PCs that exceed the minimum hardware requirements will achieve better performance.

SQL Server Reference Guide, Edition 1.5 7


SQL SERVER INSTALLATION
2 SQL Server Requirements

SQL Server Requirements


SQL Server 2000 is only compatible with the following client versions:

Media Client 2.1.2.5 and later


Air Client 1.10.0.12 and later

If you have older versions, please upgrade before installing SQL server.

Upgrading to SQL Server 2000


Some systems may be upgrading to SQL Server 2000, instead of starting with an empty
database. If this is the case additional considerations need to be made. Below is a list of
possible upgrade situations and their corresponding instructions. Before any upgrade is done,
the current database should be backed up before any other steps are taken.

If upgrading from a Btrieve database:


The database will need to be converted from Btreieve to SQL. This is done using the Database
Translator. Please see the Database Translator User Notes (listed in Chapter 1 under Other
Support Documents) for instructions on converting a database. The dbcalls.dll file in the client
directory will be needed to perform the conversion, so be sure to back it up before upgrading
the client software.

If upgrading from a previous SQL Server:


It is recommended to first backup the database (either to disk or to tape), and then to restore the
backup file into SQL Server 2000. The previous version of SQL Server (6.5) does not need to
be uninstalled to perform the upgrade, although doing so may reduce confusion. An upgrade
wizard is included with SQL Server 2000, which simplifies the upgrade procedure. It is found
in the Start Menu under Programs, Microsoft SQL Server – Switch. For further instructions on
upgrading from a previous SQL Server installation please see the Online Documentation
(Programs, Microsoft SQL Server, Online Books).

If installing or upgrading on a system running Octopus:


Additional changes need to be made to the Octopus system. Please see the Standby File Server
Manual for notes on how to setup Octopus for use with SQL Server.

8 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

Installing Microsoft SQL Server


When the File Server PC has been setup and checked to ensure that it meets the hardware and
software requirements, follow the recommended installation of the Microsoft SQL Server 2000
software as described in this section.

WARNING If you deviate from the recommended installation options, the SQL
Server product may not function properly.

To install the Microsoft SQL Server 2000 software:

1 Insert the Microsoft SQL Server 2000 CD in the CD-ROM drive of the SQL file server PC.

When the CD-ROM drive is mounted, the installer dialog box appears, allowing you to select
the components to install..

2 Click S Q L S e r v e r 2 0 0 0 Components .

SQL Server Reference Guide, Edition 1.5 9


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

3 Then click Install Database Se r v e r .

4 Read the information on the Welcome dialog box, then click Next to continue.

10 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

5 On the Computer Name dialog box, make sure Local Computer is selected, then
click Next .

SQL Server Reference Guide, Edition 1.5 11


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

On the Installation Selection dialog box, make sure that Create a new
instance of SQL server, or install Client Tools is the default selection,
then click Next .

12 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

6 Enter the name of the individual who may request technical support in the Name: field of the
U s e r I n f o r m a t i o n dialog box. Optionally, you can specify the name of the individual’s
employer. Click the Next button.

SQL Server Reference Guide, Edition 1.5 13


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

7 Read the Software License Agreement and click Yes if you agree to the terms of the
Agreement.

14 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

8 On the C D - K e y dialog box, enter the 25-digit CD-Key that came with the SQL Server 2000
software, then click Next .

SQL Server Reference Guide, Edition 1.5 15


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

9 On the I n s t a l l a t i o n D e f i n i t i o n dialog box, make sure that Server and Client


Tools is the default selection, then click Next .

16 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

10 On the Instance Name dialog box, make sure the Default box is checked, then click
Next .

SQL Server Reference Guide, Edition 1.5 17


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

On the Setup Type dialog box, make sure Typical is the default selection, then click the
Browse button next to Data Files . In the Choose Folder that appears, enter
"C:\Database " for the path and click OK. If a prompt appears asking to create the
directory, click Yes.

• Then click Next .

18 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

11 The Services Accounts dialog box should appear. Make sure the Use the same
account for each service. Auto start SQL Server Service radial button
is selected, then click the Use the Local System account radial button in the
Service Settings area. Then click the Next button.

SQL Server Reference Guide, Edition 1.5 19


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

12 On the Authentication Mode dialog box, make sure Windows Authentication


Mode is selected, then click Next .

20 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Installing Microsoft SQL Server

13 If you entered the settings correctly in the installation program, click Next on the S t a r t
Copying Files dialog box to complete the installation process. If you want to make
changes, click the Back button.

SQL Server Reference Guide, Edition 1.5 21


SQL SERVER INSTALLATION
2 Installing Microsoft SQL Server

14 After the files are copied to the SQL Server PC, the Choose Licensing Mode dialog
box will appear. Make sure P e r S e a t f o r is selected and enter the number of licenses you
have purchased in the devices box. Then click Continue .

22 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Creating the SQL Database

15 Finally the Setup Complete dialog box will appear. Click F i n i s h to restart the PC.

Creating the SQL Database


Two SQL scripts are provided by Harris to create a SQL Server ODBC-compliant database and
a user ID for use with the More Info windows in Media Client and Air Client.

Extracting the SQL Scripts


Harris provides a self-extracting zip file containing the scripts necessary to create a SQL
Server ODBC database.

To extract the SQL scripts onto the SQL File Server PC:

1 First, run the Harris scripts self-extracting zip file.

• Insert the HAS SQL Server Script File CD in the CD-ROM drive.
• From the S t a r t menu, click Run… which displays the Run dialog window:

SQL Server Reference Guide, Edition 1.5 23


SQL SERVER INSTALLATION
2 Creating the SQL Database

• In the “Run” dialog window, click the Browse… button and navigate to, and select,
the scripts.exe file on the CD, then click OK.

The self-extracting zip file will run.

2 When prompted, specify the folder on the SQL Server PC where you want to extract the scripts
to (the default is C:\Scripts\), and then click OK.

3 Two script files (Createdb.sql , Createusr.sql ) are then extracted to the specified
directory.

The scripts are used to create a database in the default location of “C:\Database” on the file
server with a default database username and password of “H a r r i s D B ”. If the location or
database login information needs to be changed, consult Appendix A - Editing Scripts at the
end of the manual before proceeding to the next section.

Running the Createdb.sql Script


To run the createdb.sql script:

1 On the S t a r t menu, point to Programs , then to Microsoft SQL Server and click
Query Analyzer .

When the Query Analyzer application launches, the Connect to SQL Server dialog
box opens.

2 On the SQL Server: dialog box, enter “local ”.

Verify that the Start SQL Server if stopped box is unchecked and the Use
Windows NT authentication button is checked.

3 Click OK to open the Query window.

24 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Creating the SQL Database

The Query window indicates the status of the script while it is running.

4 Click Open on the F i l e menu and, using the Open Query File dialog box, locate and
select the createdb.sql file. Click the Open button.

The script file appears in the Query window.

Figure 2-1 Createdb.sql script file open in the Query window

5 To run the script, click the P l a y button (indicated by a right-pointing triangle on the tool bar).
Alternatively, you can press F 5 .

NOTE If the location of the database needs to be specified, see Appendix A for details, otherwise, the
default path will be used.

SQL Server Reference Guide, Edition 1.5 25


SQL SERVER INSTALLATION
2 Creating the SQL Database

When the script runs, the Query window should look similar to the following:

Figure 2-2 Query window after the createdb.sql script runs

When the script is finished running, do not exit the Query Analyzer application. You will use it
in the next section to run the createusr.sql script.

Running the Createusr.sql Script


The createusr.sql script configures read and write permissions on the database you created in
“Running the Createdb.sql Script” on page 24 that allow the Client applications full access to
it.

To run the createusr.sql script:

1 Click Open on the F i l e menu.

2 Locate and select the createusr.sql file in the following directory on the Harris SQL
Server CD:

[CD drive letter]:\ODBC_Scripts\

3 Click the Open button.

The createusr.sql file appears in the Query window.

4 To run the script, click the P l a y button. Alternatively, you can press F 5 .

26 SQL Server Reference Guide, Edition 1.5


SQL SERVER INSTALLATION
Creating the SQL Database

When the script runs, the Query window should look similar to the following:

Figure 2-3 Query window after the createusr.sql script runs

The results window indicates that read and write access is granted to Client applications on the
Harris automation network that use the Harris ODBC database. When you are finished running
the SQL scripts, click E x i t on the F i l e menu.

SQL Server Reference Guide, Edition 1.5 27


SQL SERVER INSTALLATION
2 Creating the SQL Database

28 SQL Server Reference Guide, Edition 1.5


Chapter 3
SQL Server 2000 Overview

Once installed and fully setup, SQL Server 2000 will require almost no maintenance. However,
it does have a powerful database management system and useful tools to manage the data in
almost any way. This chapter gives an overview of the different components of SQL Server and
how they may be used to monitor, maintain and manipulate the data.

SQL Server 2000 Components


Once SQL Server 2000 has been installed, a new Program Group will be added to the Start
Menu containing links to several different components. The image below is an example of the
links added in the start menu, followed by a list of brief descriptions for each one.

• Books Online – The SQL Server 2000 online documentation.

• Client Network Utility – Allows the user to change the client network settings on this
machine (for connecting this machine to a database on another SQL Server).

• Configure SQL XML Support in IIS – Used to configure SQL Server for IIS.

• Enterprise Manager – The main SQL Server management program. This is explained
in more detail in the next chapter.

SQL Server Reference Guide, Edition 1.5 29


SQL SERVER 2000 OVERVIEW
3 Enterprise Manager

• Import and Export Data – Allows the user to import and export data to and from SQL
Server and virtual any other format (excel, access, DB4, text, etc.).

• Profiler – Allows the user to run traces and monitor the performance of the SQL Server.

• Query Analyzer – Allows the user to create and run SQL commands. This is used to
create the database and the username in Chapter 2.

• Server Network Utility – Allows the user to change the server network settings on this
machine (to allow clients to connect to the SQL Server on this machine).

• Service Manager – Utility to monitor the current status of the SQL Server and its
companion services.

Books Online is the documentation for SQL Server and can be used to gain in depth
knowledge about any component of the entire SQL Server system. A SQL Server
Administrator will probably use the Enterprise Manager and the Service Manager most often
and are further explained in the following two sections. The Import and Export Data utility is
used to move data from one database format to another. It is explained in more detail in the
Import and Export Data Utility (User Note). The Query Analyzer is used in chapter 2 for
creating the empty database and username for connecting to it.

Enterprise Manager
After the SQL Server 2000 is installed the Enterprise Manager may be used to monitor the
database and perform any necessary maintenance. This section briefly describes the different
sections and components of the Enterprise Manager and how they can be used to manage the
database.

30 SQL Server Reference Guide, Edition 1.5


SQL SERVER 2000 OVERVIEW
Enterprise Manager

Figure 3-1 SQL Server 2000 Enterprise Manager Layout

The Enterprise Manager consists of a single window with two panes and is used for accessing
and displaying information about the SQL Server system.

The menu and button bar at the top contain the different actions that can be performed for the
currently selected item. As different components are selected in the two panes, the icons and
menus will change accordingly.

The left pane displays a tree of the different components (or branches or items) in the SQL
System while the right pane displays the next level of components below the currently selected
component on the left pane. This can be see in Figure 3-1 above. In the left pane, the Databases
component has been expanded showing the different databases in the level below it. Since the
Databases component is also selected, the different databases in the level below it are also
displayed in the right pane.

SQL Server Reference Guide, Edition 1.5 31


SQL SERVER 2000 OVERVIEW
3 Enterprise Manager

When the Enterprise Manager is first started, only the Console Root and Microsoft SQL
Servers components are visible. The Microsoft SQL Servers must be expanded either by
double-clicking on the icon or by clicking once on the plus sign next to the icon. This will
show the SQL Server Group branch below it. Expanding this will show the SQL Server on the
local machine (MAIN_FS in Figure 3-1). When the MAIN_FS icon turns green (with the white
play indicator inside) it means that the Enterprise Manager has connected to it and the service
is running. From here the rest of the components of the local SQL Server can be accessed.
Closing the Enterprise Manager only disconnects from the SQL Server and closes the manager
- it does not stop the SQL Server.

Every type of component or item in the left and right panes has a specific popup menu
associated with it. This provides an easy way to access and perform the actions associated with
a specific icon. To access the popup menu, use the mouse to right-click on the item icon. When
the menu appears, use the mouse to select the required action. This is shown in Figure 3-2
below. The Jobs item under SQL Server Agent has been selected on the left pane displaying all
current jobs in the right pane. The popup menu for the ASDB backup job has been accessed to
display the properties about the job.

Figure 3-2 SQL Server 2000 Enterprise Manager Item Properties

32 SQL Server Reference Guide, Edition 1.5


SQL SERVER 2000 OVERVIEW
Service Manager

Service Manager
The Service Manager allows the user to monitor and start, stop, pause or continue all of the
SQL Server services. During installation, the Service Manager is added to the Startup folder so
that it is launched automatically when the computer is started. It resides as an icon in the
system tray displaying the status of one of the SQL Server Services.

The Service Manager window can be opened by double-clicking on the icon in the system tray,
or by selecting the Service Manager icon from the Start Menu under Microsoft SQL Server.

At the top of the SQL Server Service Manager is the name of the connected Server
(MAIN_FS). Below it is the selected service that is being monitored. Different services may be
selected using the dropdown button to the right. The large icon and the buttons next to it
display and control the selected service on the selected server. Their functionality and usage is
straightforward.

Each service has a corresponding icon, which is displayed both in the Service Manager
window and in the system tray when selected. It is important to understand that only one icon
is displayed at a time. Therefore, to know the status of all the services, each service has to be
selected and viewed from the Service Manager or from the system tray icon popup menu.

All of the controls in the Service Manager window may be done from a popup menu that is
displayed by right clicking on the icon in the System Tray. Figure 3-3 is an example of the
popup menu.

SQL Server Reference Guide, Edition 1.5 33


SQL SERVER 2000 OVERVIEW
3 Service Manager

Figure 3-3 Service Manager Control Popup Menu

For further information on the Service Manager, see the Books Online documentation.

34 SQL Server Reference Guide, Edition 1.5


Chapter 4
SQL Client Installation

In this chapter, you will setup Media and Air Client workstations to use the SQL Server
database by configuring an SQL Data Source driver. It assumes you have a working knowledge
of the Harris automation system, specifically the Media Client and Air Client applications.

SQL Server 2000 is only compatible with the following client versions:

Media Client 2.1.2.5 or later


Air Client 1.10.0.12 or later

If you have older versions, please upgrade before installing SQL server.

In this chapter, you will:

• Install the SQL Server 2000 Client Connectivity Tools.


• Configure the ODBC Driver
• Configure the Client(s) to use SQL Server

Installing the SQL Server 2000 Client


Connectivity Tools
Connection to the SQL Server 2000 database requires Microsoft Data Access Components
(MDAC) version 2.6, which includes the ODBC SQL server 2000 driver. After MDAC 2.6 is
installed, the ODBC driver must be configured according to the specifications outlined in this
chapter.

You may skip the installation of MDAC 2.6 if the correct ODBC SQL Server 2000 driver is
already installed.

To check the version number of the ODBC driver:

1 On the S t a r t menu, point to Settings and click Control Panel .

SQL Server Reference Guide, Edition 1.5 35


SQL CLIENT INSTALLATION
4 Installing the SQL Server 2000 Client Connectivity Tools

2 Double-click the ODBC Data Sources icon to open the ODBC Data Source
A d m i n i s t r a t o r control panel.

3 Click the User DSN tab, then click the Add… button.

4 On the Create New Data Source dialog box, locate the version number of the SQL
Server driver in the Version column.

The only version known to work at this point is:

SQL Server 2000.80.194.00 8/5/00 (03.80.0194)

If you do not have this driver, you should install MDAC 2.6. It can be installed directly from
the SQL Server 2000 CD or by downloading it from the Microsoft Internet website.

To install Microsoft Data Access Components (MDAC) 2.6 from the SQL Server 2000 CD:

1 Insert the Microsoft SQL Server 2000 CD-ROM in to the client PC CD-ROM drive. When the
CD-ROM drive is mounted, the installer dialog box appears, allowing you to select the
components to install.

2 Click S Q L S e r v e r 2 0 0 0 Components .

36 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Installing the SQL Server 2000 Client Connectivity Tools

3 Then click Install Database Se r v e r .

4 A Setup warning dialog will appear. Click OK.

SQL Server Reference Guide, Edition 1.5 37


SQL CLIENT INSTALLATION
4 Installing the SQL Server 2000 Client Connectivity Tools

5 Next the Welcome dialog box will appear. Click Next .

6 On the Computer Name dialog box, click Next ..

38 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Installing the SQL Server 2000 Client Connectivity Tools

7 Then, on the Installation Selection dialog box, click Next .

SQL Server Reference Guide, Edition 1.5 39


SQL CLIENT INSTALLATION
4 Installing the SQL Server 2000 Client Connectivity Tools

8 Next, make sure the user’s name is entered and optionally enter the user’s employer. Then click
Next to continue.

40 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Installing the SQL Server 2000 Client Connectivity Tools

9 Read through the Software License Agreement and, if you agree to the terms, click
Yes.

SQL Server Reference Guide, Edition 1.5 41


SQL CLIENT INSTALLATION
4 Installing the SQL Server 2000 Client Connectivity Tools

10 On the C D - K e y dialog box, enter the 25-dgiit CD-Key from the SQL Server 2000 CD case,
and then click Next .

42 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Installing the SQL Server 2000 Client Connectivity Tools

11 On the I n s t a l l a t i o n D e f i n i t i o n dialog box, select Connectivity Only and then


click Next .

12 The Start Copying Files dialog box will appear. To install the files, click Next .

SQL Server Reference Guide, Edition 1.5 43


SQL CLIENT INSTALLATION
4 Configuring the ODBC Driver

13 When the files are all installed, select Yes and click F i n i s h to restart the client PC.

To install Microsoft Data Access Components (MDAC) 2.6 from an Internet download:

1 Using the PC explorer, locate the executable file that you downloaded and double-click it.

2 When the installer runs, accept all the default installation options.

3 Restart the PC when prompted by the installer to complete the installation.

Configuring the ODBC Driver


To configure an ODBC driver on the Client:

1 On the S t a r t menu, point to Settings and click Control Panel .

2 Double-click the ODBC icon to open the ODBC Data Source Administrator
control panel.

44 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Configuring the ODBC Driver

3 Click the System DSN tab, then click the Add... button.

The Create New Data Source dialog box opens.

4 Click the S Q L S e r v e r d r i v e r and click F i n i s h .

The Create a New Data Source to SQL Server dialog box opens.

Type ASDB in
the Name: field

Click the network


name of the SQL
Server PC

Figure 4-1 Create a New Data Source to SQL Server dialog box

5 In the Name: field, type ASDB and click SQLServer on the S e r v e r : button. Click
Next .

6 To specify NT Authentication option, click the With Windows NT authentication


using the network login ID . Next, verify that Connect to SQL Server to
obtain default settings for the additional configuration options
button is unchecked.

SQL Server Reference Guide, Edition 1.5 45


SQL CLIENT INSTALLATION
4 Configuring the ODBC Driver

The dialog box should look like the following:

Specify this
authentication option
by clicking the button

Uncheck this
option by clicking
the check box

Figure 4-2 Specifying authentication options

NOTE To properly connect to the database, you must have a drive of the file server mapped in
explorer to establish NT Authentication. (i.e. D: on the client PC should be mapped to the C:
drive on the fileserver PC) If different users are used to login into the client and fileserver PC,
the client user will need to be added to the user manager of the fileserver PC.

7 Click Next and click the Change the default database to: button to check it. Type
ASDB in the corresponding field.

The dialog box should look like the following:

Check this
button and type
ASDB in the field

Figure 4-3 Assigning a default database

46 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Configuring the ODBC Driver

8 Click Next . The Create a New Data Source to SQL Server dialog box will
appear.

SQL Server Reference Guide, Edition 1.5 47


SQL CLIENT INSTALLATION
4 Configuring the ODBC Driver

9 Click F i n i s h —to open the ODBC Microsoft SQL Server Setup dialog box.

Displayed are the settings for the ODBC data source you just configured. The settings should
be identical to the following:

Figure 4-4 ODBC Microsoft SQL Server Setup dialog box

10 Click OK to close the ODBC Microsoft SQL Server Setup dialog box and then
click OK again on the ODBC Data Source Administrator control panel to close it.

Configuring the Clients to use SQL Server


SQL Server 2000 is only compatible with the following client versions:

Media Client 2.1.2.5 or later


Air Client 1.10.0.12 or later

If you have older versions, please upgrade before continuing.

For each client that connects and uses the SQL server, the following changes need to be made
in the following order:

• Update the Client with new connection files

48 SQL Server Reference Guide, Edition 1.5


SQL CLIENT INSTALLATION
Configuring the ODBC Driver

• Reconfigure the database path in the Client

These procedures are explained in detail below.

Updating the Client

1 If the client has not been installed, skip to step 7, otherwise continue with step 2.

2 Check if the client needs updating:

If the client is running, close it. Open an explorer window and navigate to the directory
where the client is installed.

If the directory contains the files DBCFILES.DLL, and DBCALLS.DBC, then the client
is up to date: skip to the next section, “Reconfiguring the Database Path” on page 50.

If the files are not present in the directory, the client needs to be updated. This can be done
manually or automatically. To manually update the client, you need the client ODBC files
(DBCALLS.DLL, DBCALLS.DBC, and DBCFILES.DLL).

If you have these files, continue with steps 3-5 to manually update the client. If you do not
have these files, or if you prefer, skip to steps 6-9 to automatically update the client.

3 Using the open explorer window, rename the DBCALLS.DLL file in the client directory to
DBCALLS BTRV.DLL.

4 Copy the three client ODBC files (DBCALLS.DLL, DBCALLS.DBC, and


DBCFILES.DLL) into the client directory.

5 The Client is now updated. Skip to the next section, “Reconfiguring the Database Path” on
page 50.

6 Backup the dbcalls.dll and the .INI files in the Client directory to a safe location, i.e.
C:\[Client Folder]\Backup and then uninstall the Client software.

7 Install the Client software and, when prompted, select SQL Server Installation .

8 If backup .INI files are available, copy them back into the Client directory.

9 The Client is now updated.

NOTE If you are using the Harris Admin Tool, the ADCOPTS.INI, ALLPRIVS.INI,
NOPRIVS.INI, and DBCALLS.DBC files need to be moved to the database directory on the
fileserver.

SQL Server Reference Guide, Edition 1.5 49


SQL CLIENT INSTALLATION
4 Configuring the ODBC Driver

Reconfiguring the Database Path


1 Launch the Client application and from the menu, select Help , then About … .

Make sure that in the popup About box one of the information lines has ODBC
DBCalls.dll xx.xx.xx . If it does, close the About box and continue with step 2.
If it does not have ODBC, then close the client and go to step 6 of “Updating the Client”
on page 49, making sure to use a compatible version of the client.

2 Click Environment… from the P r o p e r t i e s menu.

3 Click the System Directories tab.

4 To change the database path, click the Browse button next to the Database: field. The
Database dialog box opens.

5 Locate and select the Client application on the C: drive and click OK.

WARNING If you are using the Harris Admin Tool, locate the database
directory on the fileserver PC instead of the Client application
folder, or the Client will disregard permissions set up in the Harris
Admin Tool preference files. Unlike a typical Client application
install, the database directory specified on the System Directories
tab does not point to the actual database file (located on the SQL
Server PC).

6 If a backup fileserver (Octopus) is being used, also use the browse button next to the File
Server Path to find and select the directory where the SQL database resides on the file server.

7 Restart the Client for the changes to take effect.

50 SQL Server Reference Guide, Edition 1.5


Chapter 5
Adding Fields

Using the Microsoft SQL Server 2000 Enterprise Manager application, you can add custom
fields to the Harris ODBC database. To add fields, you will need administrator access to the PC
on which the Microsoft SQL Server 2000 software is installed. Since adding new fields will
require disconnecting the clients from the database, it is recommended to perform this
procedure during off peak times.

To add a field to the Harris ODBC database:

1 Ensure there are no Client applications connected to the Harris ODBC database before adding
fields by stopping, and then restarting the SQL Server service on the File Server PC. (Please
refer to “Service Manager” on page 33, if necessary, for more details). New fields cannot be
added if clients are still connected.

2 On the S t a r t menu of the SQL Server PC, point to Programs , then to Microsoft
S Q L S e r v e r 2 0 0 0 and click Enterprise Manager .

The Console Root/Microsoft SQL Servers/SQL Server Group window


opens in the SQL Server Enterprise Manager application.

3 On the left column, click the plus sign next to the following items:

SQL Server Group/[SQL server PC network name] (Windows


NT)/Databases/ASDB

4 Click Tables (located under ASDB) to display the tables in the Harris ODBC database in the
right column.

5 On the right-click menu of the ASEXT table (located in the right column), click Design
Table .

The Design Table window opens.

6 Click an empty field on the Column name column and type the name of the field you want to
add to the Harris ODBC database. When you are finished, press the Tab key to advance to the
Datatype field.

7 On the Database popup button, click the type of data the field will contain.

SQL Server Reference Guide, Edition 1.5 51


ADDING FIELDS
5

Although there are numerous choices, the Harris automation system will only support
t i n y i n t , s m a l l i n t , i n t , v a r c h a r and datetime data types.

Following is a description of each data type to assist in determining the appropriate one:

• tinyint. Integer data from 0 through 255. If the field data will only have a value between those
ranges, use this data type.

• smallint. Integer data from -2^15 (-32,768) through 2^15 (32,767). Use this data type if the
value may exceed that of the tinyint range, but will be less than the values in the int range.

• int. Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 (2,147,483,647).
The int range of numbers is the maximum value a field can display.

• varchar. Variable-length non-Unicode data with a maximum of 8,000 characters;


alphanumeric data, such as extra user information for a spot or event.

• datetime. Date and time data from January 1, 1753, to December 31, 9999, with an accuracy
of three-hundredths of a second, or 3.33 milliseconds.

8 Press Tab to advance to the length field, then specify the maximum number of characters you
will allow the field to hold.

9 Continue adding fields as described in steps 5 through 7. When you are finished, click Save —
then E x i t —on the Console menu to save your changes and exit E n t e r p r i s e
Manager .

The fields you created are now accessible from the ASEXT table by Media Client
workstations configured to access the Harris ODBC database, as described in Chapter 3, SQL
Client Installation.

52 SQL Server Reference Guide, Edition 1.5


Chapter 6
More Info Windows

MoreInfo windows display data from the Harris ODBC database. They are accessible from
both Media Client and Air Client. In Air Client, they display not only the standard fields, but
any fields you add to the database. In Media Client, they display only the fields you added.

This chapter provides instructions on how to use the MIBuilder software tool to create and
customize the appearance and content of MoreInfo windows.

MIBuilder Work Area


Before you create a MoreInfo window, you should become familiar with the MIBuilder work
area. To open the MIBuilder tool, click MoreInfo... on the Properties menu of either Media
Client or Air Client.

Insert
controls with
the tool bar

Design the
form in the
work area

Status bar
indicates
pointer
coordinates
Figure 6-1 MIBuilder window

There are three important components to the MIBuilder tool:

SQL Server Reference Guide, Edition 1.5 53


MORE INFO WINDOWS
6 MIBuilder Work Area

• Tool bar. The tool bar provides quick access to the various types of controls (e.g., fields,
buttons, group boxes, etc.) used to construct a MoreInfo window. For more information on
using the tool bar, refer to “Inserting a Control” on page 54.

• Work area. The work area is where controls are placed when constructing a MoreInfo
window. A grid composed of dots aids in the precise positioning of controls.

• Status bar. The status bar indicates the position of the pointer. It can be used in conjunction
with the work area grid to help precisely position controls in the work area.

Inserting a Control
You can use a tool bar button, the right-click menu and Control menu to insert controls on the
form.

To insert a control:

1 Click the tool bar button associated with the control you want to insert. Alternatively, you can
click the name of the control on the Control menu or right-click in the work area, point to
Insert a control and click the name of the control.

The associated tool bar button will depress indicating it is the active tool. Following is a list of
each button and the control it is associated with:

Inserts a label control.

Inserts an edit control.

Inserts a group box control.

Inserts a button control.

Inserts a result box control.

2 Position the pointer ( ) in the work area and click where you want the upper-left corner of
the control to appear. The pointer coordinates appear in the status bar to aid in aligning controls
evenly.

When you click, the upper left corner of the control is positioned on the grid point nearest to
the pointer and is selected.

3 The tool bar button will remain depressed until you click it again. If you want to reposition,
resize or edit the control’s properties, click on the tool bar button that is depressed to disable it.
If you click in the work area while the tool bar button is still depressed, another control is
inserted.

54 SQL Server Reference Guide, Edition 1.5


MORE INFO WINDOWS
MIBuilder Work Area

In the following sections, each control and its properties are explained.

Label
A label displays a caption which can be used to describe other controls in the work area. Using
a label, you can indicate the category of data displayed in a field control by inserting a label
beside it.

Label used to
identify a field

Figure 6-2 Label describing a field control’s contents

To change the label caption:

1 Select a label and click P r o p e r t i e s on the right-click menu.

2 In the Caption: field of the label’s properties dialog box, type the caption you want the label
to display in the MoreInfo window, then click OK.

Field
A field control displays a field value from an ODBC database. You can specify which database,
the table within the database and the field within the table to display information from.

Figure 6-3 Field properties dialog box

To specify what field data is displayed in the field control:

1 Select the field and click P r o p e r t i e s on the right-click menu.

2 On the field’s properties dialog box, click the Database: button, then click ASDB.

3 On the Table: button, you have two options:

SQL Server Reference Guide, Edition 1.5 55


MORE INFO WINDOWS
6 MIBuilder Work Area

• ASDB. This table contains all the Harris standard fields. The fields in this table are not
accessible to the MIBuilder window in Media Client.

• ASEXT. The external table contains the fields that are added, as described in Chapter 4,
“Adding Fields”.

• ASSEG. The segment table contains the fields that display information about segments of
multisegment spots and events.

Click the table which contains the field you want to insert.

4 On the Field: button, click the field you want to insert, then click OK.

Group Box
A group box control allows you to place a border around other controls to signify that they
belong to a certain category (as defined by a caption). When you reposition a group box, all
controls inside it are moved with it.

A group box
categorizes a
group of
controls and,
when moved,
moves the
controls with it

Figure 6-4 Group box surrounding controls

Before controls can be associated with a group box, the group box must be inserted first. You
cannot move controls into a group box if they were created before the group box.

To change the group box caption:

1 Select a caption and click P r o p e r t i e s on the right-click menu.

2 In the Caption: field of the group box’s properties dialog box, type the caption you want the
label to display in the MoreInfo window, then click OK.

56 SQL Server Reference Guide, Edition 1.5


MORE INFO WINDOWS
MIBuilder Work Area

Button
Buttons navigate between multiple MoreInfo windows, which are only used when a
multisegment event is displayed.

Enter a name
for the button
in the Caption:
field
Specify the
action of the
button on the
Action: menu
Figure 6-5 Button properties dialog box

When you create a button, you must assign an action to it via its properties dialog box.

To assign an action to a button:

1 Select the button whose action you want to assign (or modify) and click P r o p e r t i e s on the
right-click menu.

The button properties dialog box opens.

2 Click an action on the Action: button.

Following is a description of each action that can be assigned to a button:

• First. Displays the first result of a multiple result query.

• Last. Displays the last result of a multiple result query.

• Next. Displays the next result in a multiple result query. This button will not work if the
displayed result is the last result.

• Previous. Displays the previously displayed result in a multiple result query. This button will
not work if the displayed result is the first result.

• Close. Closes the MoreInfo window.

3 Type a name for the button in the Caption: field.

SQL Server Reference Guide, Edition 1.5 57


MORE INFO WINDOWS
6 MIBuilder Work Area

You should type a name that corresponds with the function of the button. For example, if the
function of a button is to display the first segment of a multisegment event, then the name
should be, “First,” or “1.”

4 When you are finished, click OK.

Result Box
When a MoreInfo window is displayed for a multisegment event, the result box displays the
number of segments, as well as the segment number being displayed. The format of the display
is:

[segment number] / [number of segments]

For example, is a multisegment event has three segments, the display in the result box would
be “1/3.” This means that the first segment is displayed and there are a total of three segments
in the multisegment event.

Deleting a Control
You can remove a control from the work area on the MIBuilder window.

To delete a control:

1 Click the control you want to remove to select it.

2 Press the Delete key.

The control is removed from the work area.

WARNING Once a control is deleted, you cannot recover it; you must insert
another control and reassign its properties.

Resizing a Control
A selected control can be resized by dragging the anchors surrounding the border.

To resize a control:

1 Click the control to select it.

58 SQL Server Reference Guide, Edition 1.5


MORE INFO WINDOWS
MIBuilder Work Area

A border and eight anchors appear around the control. The anchors are represented by small
squares located on the four sides and corners of the border.

Corner anchor

Side anchor

Figure 6-6 A selected control and its anchors

2 Position the pointer over the anchor you want to drag.

The pointer changes shape to indicate the directions in which you may drag the anchor.

3 Then, use one of two ways to resize the control:

• Drag a corner anchor. The diagonal pointer indicates that dragging the anchor will move the
corner anchor of the border diagonally. As you drag, the new border is represented by a grey
outline. The grey outline is replaced by the new border when you release the mouse.

The diagonal left pointer ( ) indicates the corner points on the left side of the border can be
dragged up or down, diagonally.

The diagonal right pointer ( ) indicates the corner points on the right side of the border can
be dragged up or down, diagonally.

• Dragging a side anchor. When you position the pointer over a corner anchor, the pointer
changes shape to indicate the direction (horizontally or vertically) you can drag the anchor to
resize. As you drag, the new border is represented by a grey outline. The grey outline is
replaced by the new border when you release the mouse.

The horizontal pointer ( ) indicates the right or left border can be moved right or left.

The vertical pointer ( ) indicates the top or bottom border can be moved up or down.

Repositioning a Control
When a control is selected, you can change its position in the work area by dragging it to a new
location.

To reposition a control:

1 Click the control to select it.

SQL Server Reference Guide, Edition 1.5 59


MORE INFO WINDOWS
6 MoreInfo Window in Media Client

A border appears around the control.

2 Position the pointer inside the border. Do not position the pointer over the anchors.

3 Drag the control to another location.

As you drag, the control is replaced by a dotted outline. When you release the mouse button,
the dotted outline is replaced by the control.

MoreInfo Window in Media Client


The MoreInfo window is accessible as a tab in the Single and Multi-Segment Prep windows of
Media Client. To display the MoreInfo window in Media Client, click the MoreInfo tab.

The MoreInfo
tab in the Prep
Window of
Media Client

Figure 6-7 MoreInfo tab in Media Client

On the tab, you can enter data in the fields that were created in Chapter 4, Adding Fields. When
you write the spot information to the database, the data entered on this tab is written to the
fields in the ASEXT table of the Harris database.

60 SQL Server Reference Guide, Edition 1.5


MORE INFO WINDOWS
MoreInfo Window in Air Client

MoreInfo Window in Air Client


To access the MoreInfo window in Air Client, double-click an ID number on a playlist or
transmission list window. When you click an ID number, the data of the event displays in the
MoreInfo window.

Double-click an
event to display
the MoreInfo
window

Figure 6-8 MoreInfo window in Air Client

If the event is a multisegmented event, then all segments are displayed, as well. To view data
specific to the multisegment event, you must insert segment data fields, as described in “Field”
on page 55. To navigate multiple results, you must insert navigation buttons, as described in
“Button” on page 57.

SQL Server Reference Guide, Edition 1.5 61


MORE INFO WINDOWS
6 MoreInfo Window in Air Client

62 SQL Server Reference Guide, Edition 1.5


Chapter 7
Database Backup &
Restore

The steps described herein are used to setup the SQL Server Agent to perform a complete,
daily tape backup of the entire database.

This chapter covers the following topics related to database backup and recovery:

• Creating an Automatic Backup Event


• Restoring the Database from a Backup
• Advanced Backup Settings

While this chapter covers steps needed to create and restore databases, SQL Server 2000
provides many more options and configurations to suit almost any backup design. Please
consult the SQL Server 2000 documentation for all other backup topics.

When using SQL Server with Octopus, always create the database and any backup procedures
identically on both the primary and backup Servers. Also, make sure to stop the SQL Server
services before creating and synchronizing any specifications. SQL Server does not (and
should not) run on the backup unless a fail-over occurs and therefore cannot make regular
backups until this time. Should a fail-over occur, restore the primary Server as soon as
possible.

Creating an Automatic Backup Event


The following steps are used to setup the SQL Server Agent to perform a complete, daily
backup of the entire database.

If additional files need to be backed up in addition to the database, please see “Backing up to
the disk” on page 90 under Advanced Backup Settings for additional notes. This section will
explain how to schedule SQL Server Agent to backup the database to the hard disk. Then have
the AT scheduler program backup the database backup and any other files to a tape backup.

• Open SQL Server Enterprise Manager.


• In the Enterprise Manager, Open the Management folder for the fileserver.
• Ensure that the SQL Server Agent is running.
• Create a backup device.

SQL Server Reference Guide, Edition 1.5 63


DATABASE BACKUP & RESTORE
7 Creating an Automatic Backup Event

• Create a reoccurring scheduled backup event for the SQL Server Agent.
• Review job under the SQL Server Agent.

1 Open SQL Server Enterprise Manager

• Click S t a r t -> Programs -> Microsoft SQL Server -> E n t e r p r i s e


Manager

2 In the Enterprise Manager , open the Management folder for the fileserver.

• On the left pane, click the “plus” (+ ) sign in the box next to:

Microsoft SQL Servers ,


then SQL Server Group ,
then MAIN_FS ,
then Management .

64 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Creating an Automatic Backup Event

If you are prompted to start the SQL Server, do so.

3 Ensure that the SQL Server Agent is running.

• Right click the SQL Server Agent in the Management folder and, if selectable,
click the S t a r t selection.

SQL Server Reference Guide, Edition 1.5 65


DATABASE BACKUP & RESTORE
7 Creating an Automatic Backup Event

• When the SQL Server Agent is running, the icon will change from a stop indicator

to a play indicator

4 Create a backup device.

• Make sure that the tape drive is installed, configured, and running properly in Windows
NT first.

• Right click on the Backup icon in the Management folder, and select New
Backup Device .

66 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Creating an Automatic Backup Event

This will display the Backup Device Properties window.

• Enter Tape Backup in the Name: field.

• Select Tape drive name and use the drop down list to select the tape drive that is
installed and setup in Windows NT. If no tape drives appear, check the SCSI adapter under
the control panel to ensure that it is functioning properly.

SQL Server Reference Guide, Edition 1.5 67


DATABASE BACKUP & RESTORE
7 Creating an Automatic Backup Event

• Click OK.

The new backup device will appear in the right panel.

5 Create a reoccurring scheduled backup event for the SQL Server Agent.

• Right click on the Backup icon in the Management folder, and select Backup a
Database... .

A SQL Server Backup dialog will appear.

68 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Creating an Automatic Backup Event

Selet ASDB
database

ASDB backup

select "Database - complete"

• Make sure the ASDB database is selected.

• Set the Name field to ASDB Backup .

• Select Database - complete .

• Under Destination , select Tape , then click the Add… button to the right. The
Select Backup Destination dialog window will appear.

SQL Server Reference Guide, Edition 1.5 69


DATABASE BACKUP & RESTORE
7 Creating an Automatic Backup Event

• Select Backup device: and select Tape Backup from the drop down box. Then
click OK to return to the SQL Server Backup dialog.

• In the window under Destination , select Tape Backup .

• Under O v e r w r i t e , select Overwrite existing media .

• Click the check box next to Schedule , and then click the button to the right to modify
the schedule.

The Edit Schedule dialog will appear.

• Enter Daily Backup in the Name: field and make sure the Enabled box is
checked.

70 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Creating an Automatic Backup Event

• Make sure that R e c u r r i n g is selected, then click the Change button.

The Edit Recurring Job Schedule dialog will appear.

• Select D a i l y

• Select Occurs once at: and edit the time field to 3 : 0 0 : 0 0 A M .

• Select No end date .

• Then click OK.

• Click OK again to close the Edit Schedule dialog.

• Finally, click OK again to close the SQL Server Backup - ASDB dialog.

6 Review the new job under the SQL Server Agent. Once the job has been created, it is
recommended to check and review the job.

SQL Server Reference Guide, Edition 1.5 71


DATABASE BACKUP & RESTORE
7 Restoring the Database from a Backup

• On the left pane of the Enterprise Manager, double-click on the SQL Server Agent icon
to list the components. Then click on the Jobs item under SQL Server Agent.

The newly created job will appear in the right pane.

• Review the job properties by either scrolling the right pane left and right to view all of
the fields, or right-click on the ‘ASDB backup’ job and select Properties. A properties
window will appear with several tabs displaying all of the information about the job.

• If there is more than one job named ‘ASDB backup’, a duplicate may have been created
by accident. If duplicate jobs exist, they will cause errors, and therefore should be deleted.

• To delete a job simply right-click on it and select Delete. Click ‘Yes’ on the confirmation
dialog.

Restoring the Database from a Backup


Should the database become corrupted due to some hardware or software failure, the database
may be restored from any backup you have created. The exact process will depend on the type
of backups you have created, which backup you wish to restore and the condition of the
database. The steps below outline the restore procedure, which is explained in detail below.

72 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Restoring the Database from a Backup

1. Close any clients that may be connected to the database (Air Client, Media Client, etc.).

2. Insert the tape that has the database backup into the tape drive and wait for it to become
ready.

3. Open the Enterprise Manager.

4. Make sure that the ASDB database exists.

5. Open the ‘Restore Database Dialog’.

6. Make sure a backup history exists.

7. Select a backup to restore.

8. Reconnect any clients.

To restore a backup, you must first have SQL server running and the database already created
in SQL server. If a reinstall of the SQL Server was required to restore the database server to
operational status, re-create the SQL database following the steps in “Creating the SQL
Database” on page 23 in the SQL Server Installation chapter. Once this is done, the database
can be restored to a previous state.

To restore a backup:

1 Close any clients that may be connected to the database (Air Client, Media Client, etc.).

2 Insert the tape that has the database backup into the tape drive and wait for it to become ready.

3 Open the Enterprise Manager.

• Click S t a r t -> Programs -> Microsoft SQL Server -> E n t e r p r i s e


Manager

SQL Server Reference Guide, Edition 1.5 73


DATABASE BACKUP & RESTORE
7 Restoring the Database from a Backup

4 Make sure that the ASDB database exists.

• Click on the Databases folder to display all the databases and make sure that the
ASDB database exists.

74 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Restoring the Database from a Backup

If it does not, re-create the SQL database following the steps in “Creating the SQL Data-
base” on page 23 in the SQL Server Installation chapter.

5 Open the Restore Database dialog.

• Right click ASDB under databases and select All Tasks , then select Restore
Database…

The ‘Restore Database dialog will appear.

6 Make sure a backup history exists.

If the database was not recently created (because of a failed server), then a history of back-
ups should be displayed in the window at the bottom. If the window is empty, then the
backup history must first be imported from the backup media. To do this:

• Select From Device and Read backup set information and add to
backup history .

SQL Server Reference Guide, Edition 1.5 75


DATABASE BACKUP & RESTORE
7 Restoring the Database from a Backup

• Then click Select Devices… button.

The Choose Restore Device dialog will appear.

76 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Restoring the Database from a Backup

• Click Tape and then click the Add button.

The Choose Restore Destination dialog will appear.

• Select either the Tape device itself, or the Backup device you created for the tape.

• Click OK three times to close the dialogs and import the backup history from the “tape”
you wish to restore from.

A progress window will appear during the import.

SQL Server Reference Guide, Edition 1.5 77


DATABASE BACKUP & RESTORE
7 Restoring the Database from a Backup

When the import is done, a popup dialog will indicate success.

A backup history may now be restored from the tape.

7 Select a backup to restore.

NOTE If needed, reopen the Restore Database window by repeating step 4.

78 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Restoring the Database from a Backup

• In the window at the bottom, select the database(s) that you wish to restore by clicking
on the check box next to them. Databases with a green check mark next to them will be
restored.

The icons represent the type of database backup in the following way:

Complete database backup (the entire database)

Differential database backup (only the changes from the last complete backup)

Transaction log backup (every transaction since the last complete or differential database
backup)

If you select a differential or transaction log backup to restore, be sure to select the last
complete backup as well.

SQL Server Reference Guide, Edition 1.5 79


DATABASE BACKUP & RESTORE
7 Restoring the Database from a Backup

Optionally, if you select a transaction log to restore, you may click P o i n t i n t i m e


r e s t o r e and select a specific date and time in the past to restore the database to. The
date and time must be within the time covered by the transaction log.

• After a backup has been selected to restore, click the Options tab.

• Make sure Force restore over existing database is checked and Leave
database operational. No additional transaction logs can be
restored. is selected.

80 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Advanced Backup Settings

• Finally, click OK.

• A progress window will appear during the restore.

When finished, a confirmation dialog will appear.

8 Reconnect any clients

The database has been restored and it is now OK to connect to it with any clients.

Advanced Backup Settings


SQL Server provides flexibility to adjust the backups to occur more or less frequently and in
different ways to give different levels of protection. However, as the level of protection
increases, there are generally drawbacks as well These may be one or more of the following:

• Added maintenance
• Additional media or hardware required
• Higher system usage
• Greater chance for system interruption or equipment failure

Several optional backup scenarios are listed below for customers that wish to have a different
level of protection for their database.

SQL Server Reference Guide, Edition 1.5 81


DATABASE BACKUP & RESTORE
7 Advanced Backup Settings

• Switching tapes
• More frequent backups
• Appending backups to the same tape
• Backing up the transaction log
• Labeling Media
• Combinations of the above
• Backing up to the disk

Switching tapes
One of the easiest ways to increase the protection against database corruption or loss is to use
one or more additional tapes and to switch them at regular intervals.

For example, Tape A would be used to make a backup on Monday, Tape B would be used for
Tuesday, Tape A would be used again for Wednesday, and so on. This increases the time that a
restoration can be done by 1 day. In the same way, if seven tapes were used, a restoration could
be made up to 7 days into the past. Additional tapes protect against the chance that the media
fails.

Table 1: Tape backup schedule


Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Tape A Tape B Tape A Tape B Tape A Tape B Tape A

Pros:
• Increased protection against media failure.
• Increased backup history to restore from (from 1 day to 2 or more days)

Cons:
• Higher maintenance
• Additional media required

An additional tape drive may be purchased to avoid the added maintenance of switching
tapes on a daily basis. An additional backup event would need to be created. Then each
event would be configured to backup the database on alternating days. This requires an
additional upfront cost of the tape drive but may out weigh the time and hassle of swap-
ping tapes on a daily basis.

82 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Advanced Backup Settings

NOTE Media should always be replaced on a regular basis according to how often they are used.
Check with the media manufacturer for specifications and suggested replacement frequency.

More frequent backups


The backup event schedule may be modified to backup the database on a more frequent basis,
such as every four hours. This is important if your database is very dynamic and the chance of
losing changes made throughout the day would be costly.

Pros:
• Less data lost when restoring a database
• Selection of backups to restore allows the database to be restored before a corruption
occurred

Cons:
• Added usage and wear to system and hardware

To change the backup event schedule:

• From the SQL Enterprise Manager, click the “plus” (+ ) sign in the box next to
Microsoft SQL Servers ,

• then SQL Server Group ,


• then MAIN_FS ,
• then Management ,
• and SQL Server Agent .

• Then click on the Jobs icon, which will show the current jobs in the SQL Server
Agent.

SQL Server Reference Guide, Edition 1.5 83


DATABASE BACKUP & RESTORE
7 Advanced Backup Settings

• Double click on the Backup Event you wish to modify.

A properties window for the event will open.

84 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Advanced Backup Settings

• Click the Edit button to open the Edit Job Schedule dialog.

• Click the Change button to open the Edit Recurring Job Schedule dialog.

• Under Daily frequency , click Occurs every: and increase the hours to 4.

• Also set the s t a r t i n g and ending times to 12:00:00AM and 11:59:59PM.

• Click OK to close the dialog.

• Click OK to close the Edit Job Schedule dialog.

SQL Server Reference Guide, Edition 1.5 85


DATABASE BACKUP & RESTORE
7 Advanced Backup Settings

• Click OK to close the Backup Properties window.

Appending backups to the same tape


Another way to keep additional past backups of the database is to append the backups to the
tape instead of overwriting the previous backup. This extends the duration of history from
which a backup can be restored.

Pros:
• Reduces the number of tapes used
• Increases the number of backups, and therefore, the duration of history to choose from
when restoring

Cons:
• Added wear and usage on the system, hardware, and media
• If a tape becomes corrupted it may prevent any backup from being restored from it

To create a backup that appends to the previous backup, follow the steps to create an auto-
matic backup event, but select Append to media on the Backup Database dia-
log.

select to append a backup

86 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Advanced Backup Settings

Appending backups works well if the database is not very large. It is important to make sure
that there is enough room on a tape to append another backup. If the database is large, then
fewer backups will fit on one tape.

NOTE Backups that are set to “Overwrite existing media” will erase all the backups on a tape and
create a new single backup.

Backing up the transaction log


When the database is very dynamic and each change is important and costly, the transaction
log should be backed up. When the transaction log is backed up, the database may be restored
to a specific time before the transaction log was backed up. For instance, this allows the
database to be recovered just before the database was corrupted by a transaction.

Transaction logs store only the transactions that have occurred since the last backup.
Therefore, the backups are smaller and more can fit on a tape. However, a complete backup
should always be done before a transaction log is backed up. Subsequent transaction logs may
be backed up after each other.

Pros:
• Reduces the amount of media used.
• Increases the number of backups, and therefore the duration of history to choose from
when restoring.
• Allows the database to be restored to a specific time.

Cons:
• Requires a complete database backup first.
• More time needed to restore the database.

To create another backup event that regularly backs up the transaction log after a regular
complete backup, follow the steps to create a backup event but select “Transaction log ”.

SQL Server Reference Guide, Edition 1.5 87


DATABASE BACKUP & RESTORE
7 Advanced Backup Settings

to backup the transaction log

Be sure to select Append to media and schedule the event to occur after a complete
backup event.

Labeling Media
A good practice when doing regular scheduled backups is to label all of the backup media (the
tapes). When labeling the media, at a minimum include a descriptive name and the date when
the backup was made.

If tapes are to be reused on a regular basis, the date may be replaced with a reoccurring time.
An example would be having one tape for each day of the week. Each tape label would include
the day it is used for (Monday, Tuesday, etc.). Another example would be names of months.

Combinations of the above


Each of the above options increases the functionality and/or protection of the database.
However, the options above may be combined for added protection.

88 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Advanced Backup Settings

For example, the backup schedule could look like this:

Table 2: Backup combinations

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Tape 1 Tape 1 Tape 1 Tape 1 Tape 1 Tape 1 Tape 1


Complete TX Log TX Log TX Log TX Log TX Log TX Log
Overwrite Append Append Append Append Append Append

Tape 2 Tape 2 Tape 2 Tape 2 Tape 2 Tape 2 Tape 2


Complete TX Log TX Log TX Log TX Log TX Log TX Log
Overwrite Append Append Append Append Append Append

Tape 3 Tape 3 Tape 3 Tape 3 Tape 3 Tape 3 Tape 3


Complete TX Log TX Log TX Log TX Log TX Log TX Log
Overwrite Append Append Append Append Append Append
Tape 4 Tape 4 Tape 4 Tape 4 Tape 4 Tape 4 Tape 4
Complete TX Log TX Log TX Log TX Log TX Log TX Log
Overwrite Append Append Append Append Append Append

Tape 1 Tape 1 Tape 1 Tape 1 Tape 1 Tape 1 Tape 1


Complete TX Log TX Log TX Log TX Log TX Log TX Log
Overwrite Append Append Append Append Append Append

Four tapes are used to store backups for an entire month of history of the database. Each of the
four tapes is used for a week period, starting with a complete backup that overwrites any
existing backups on the tape, followed by transaction log backups that are appended to the tape
each day.

The tapes could be labeled:


“Week 1 ASDB Complete + Log Backup”
“Week 2 ASDB Complete + Log Backup”
“Week 3 ASDB Complete + Log Backup”
“Week 4 ASDB Complete + Log Backup”.

For more protection, the transaction logs could be scheduled to backup up four times a day.

Another tape could be used to make a complete backup every year and labeled “Annual ASDB
Complete Backup”. Additionally, the four tapes would be replaced each year.

As shown above, as more options are used, backup becomes better protected but the backup
schedule gets more complicated adding more maintenance and system usage.

SQL Server Reference Guide, Edition 1.5 89


DATABASE BACKUP & RESTORE
7 Advanced Backup Settings

For the above system:

Pros:
• An entire month of history is backed up for the database.
• Only 4 to 5 tapes are used each year.
• Tapes are identified for simple rotation.

Cons:
• Tapes need to be manually changed once a week.
• If the database grows too large, the backups for one week may not fit on one tape.

Backing up to the disk


As an alternative to using tapes, the database may be backed up to a file on a hard disk. This
may be useful if the tape drive is being managed by another program or if other files need
regular backup as well.

To set the backup event to write the backup to a file on a hard disk, create a backup event as
usual, except select Disk under Destination , and then click the Add button.

90 SQL Server Reference Guide, Edition 1.5


DATABASE BACKUP & RESTORE
Advanced Backup Settings

• The Select Backup Destination dialog will appear.

• Enter the path to the directory and filename you wish to use. Make sure the path exists,
the file will automatically be created.

• Click OK to close the Select Backup Destination dialog.

SQL Server Reference Guide, Edition 1.5 91


DATABASE BACKUP & RESTORE
7 Advanced Backup Settings

92 SQL Server Reference Guide, Edition 1.5


Appendix A: Editing
Scripts

Editing the Createdb.sql File


Although Harris provides a complete script to add the SQL Server ODBC database to the
automation system, installing the database to an alternate location requires the script file to be
edited manually.

To edit the createdb.sql file using a text editor:

1 Launch any application that can edit text files. To use Notepad , the text editor included with
the Windows operating system, click S t a r t , point to Programs , then point to
Accessories. Click Notepad to launch it.

2 Click Open... on the F i l e menu and locate and select the Createdb.sql file in the
directory in which you installed the scripts, as described in “Extracting the SQL Scripts” on
page 23. Then, click the Open button.

The createdb.sql file is displayed.

Edit the directory


path on this line in
the Createdb.sql
script file

Figure 8-1 Notepad with the createdb.sql file opened

SQL Server Reference Guide, Edition 1.5 93


APPENDIX A: EDITING SCRIPTS
8

3 Scroll to the following line located near the end of the script:

declare @PathName varchar(132) set @PathName = N’[path]’

4 Specify the directory path of the folder where you want to store the Harris database file.

If you have not created the folder, you must do so before using the SQL Server.

5 Click Save on the F i l e menu, then click E x i t .

Editing the Createusr.sql File


To edit the createusr.sql file using a text editor:

1 Launch any application that can edit text files. To use Notepad , the text editor included with
the Windows operating system, click S t a r t , point to Programs , then point to
Accessories. Click Notepad to launch it.

2 Click Open... on the F i l e menu and locate and select the Createusr.sql file in the
directory in which you installed the scripts, as described in “Extracting the SQL Scripts” on
page 23. Then, click the Open button.

The createusr.sql file is displayed.

94 SQL Server Reference Guide, Edition 1.5


APPENDIX A: EDITING SCRIPTS

Figure 8-2 createusr.sql file

3 Scroll to the following line located near the end of the script:

execute #CreateUser N'ASDB', N'[username]', N'[password]'

4 Replace HarrisDB with the desired username and password to be used.

5 Click Save on the F i l e menu, then click E x i t .

SQL Server Reference Guide, Edition 1.5 95


APPENDIX A: EDITING SCRIPTS
8

96 SQL Server Reference Guide, Edition 1.5


Appendix B:
Troubleshooting

Symptoms/Problems
The database is running, setup, and configured properly, and the client can connect and use the
database, but it runs very slowly.

Check the data sources on the fileserver and client PC and ensure that tracing is turned off.

1 Click S t a r t , then Settings , and then Control Panel .

2 Select Data Sources (ODBC) from the control panel. The Data Sources dialog
opens.

3 On the Data Sources dialog, click the Tracing tab.

4 Make sure the button under When to trace says Start Tracing Now . If it doesn’t,
click it once.

5 Finally, click OK to close the Data Source dialog.

SQL Server Reference Guide, Edition 1.5 97


APPENDIX B: TROUBLESHOOTING
9

98 SQL Server Reference Guide, Edition 1.5

You might also like