Manual Install of the Pharos Database

 

Installation Overview

 

1. Obtain the database install files
2. Create a Database and Database Login in SQL Server
3. Manually install the Pharos Database
4. Install the other Principal Server components
5. Prepare the services and database
a. Alter the Pharos registry entries
b. Set the Pharos services to start manually
c. Manually configure the Pharos Database
6. Configure Microsoft Server to control the Pharos services
7. Test the configuration
8. Install other Pharos services (optional)

 

Each procedure is detailed below.

 

1. Obtain the database install files

 

A number of files are required for a manual installation of the Pharos Database:

 

• dbinst.sql and p3static.sql – these files are located on the Pharos CD in the database\db directory.
• icons.dat and either bcp7.fmt (for SQL Server 7) or bcp2000.fmt (for SQL Server 2000) – (attached)
• DatabaseRegistryShell.reg – (attached)
• Your license information file – this is the text file supplied with your Pharos license.

 

Copy these files to the Server.

 

2. Create a Database and Database Login in SQL Server

 

To create a database, follow these steps using SQL Server Enterprise Manager:

 

1. Expand a server group, then expand the server.
2. Right-click Databases, then click New Database.
3. On the General tab, enter a name for the new database. This will usually be “pharos”. The default settings on the Data Files tab and Transaction Log tab are correct for a Pharos installation.
4. Click OK to create the new database.

 

**********************************************************************************************************************************************************************************
To add a login for the database, follow these steps using SQL Server Query Analyzer:

 

1. Start SQL Server Query Analyzer.
2. Log on as the 'sa' database user and make sure that the connection is against the master database.
3. Enter the following query into the query window:

 

Where:

 

use master
exec sp_addlogin @loginame = '<loginame>', @passwd = '<pwd>'
go
use <dbname>
exec sp_changedbowner @loginame = '<loginame>'
go
exec sp_defaultdb @loginame = '<loginame>', @defdb = '<dbname>'
go

 

• <dbname> is the name of the database you just created.
• <loginame> and <pwd> are the new login name and password for the database.

 

4. Execute the query.

 

**********************************************************************************************************************************************************************************

 

Before Continuing you need to check the collation SQL setting

 

SQL 2005

 

Run the Query below
select name, collation_name, compatibility_level from sys.databases
select serverproperty('Collation')

 

MSDE / SQL 2000

 

In the command window run the following command:

 

osql -Slocalhost -Usa -P<insert sa password here> -Q"select collation from syscolumns where name = 'name' and id = 1"

 

Query

 

select collation from syscolumns where name = 'name' and id = 1

 

Write down the name of the collation and when you create the Pharos database you need to make sure it has the same collation setting is the same

 

**********************************************************************************************************************************************************************************

 

3. Manually install the Pharos Database

 

1. Start SQL Server Query Analyzer.
2. Log on as the Pharos Database user, using the user name and password you created previously. (If SQL Query Analyzer is still open, select Connect from the File menu to log on with the new details.)
3. Ensure that the Pharos Database is selected as the current database.
4. Open the file dbinst.sql (File menu > Open) and execute it. This file can be found under the \database\db folder on your Pharos CD. This may take a moment to run. Make sure there are no errors (“Query batch completed” should appear in the status bar at the bottom of the window).
5. Insert the Pharos Icons into the database using the bcp command line utility and the icons.dat file provided: Execute the following command from the directory into which you saved the icons.dat and *.fmt file: Where:

 

bcp pharos..icons in icons.dat –S<servername> -U<loginame> -P<pwd> -f<bcpfile> –E

 

• <servername> is the name of the server SQL Server is installed on.
• <loginame> and <pwd> are the login name and password you created earlier.
• <bcpfile> is the name of the file you are using (either bcp7.fmt or bcp2000.fmt).

 

In addition, when installing on SQL Server 2000, check that the collation order in the bcp2000.fmt file (Latin1_General_Cl_AS) is the same as the default collation order for your SQL Server. Check this by looking at the Server Properties of the SQL Server instance using SQL Enterprise Manager.
6. Open and execute the file p3static.sql in SQL Server Query Analyzer.
7. Update the system table in the database with your license details. To do this, execute the following query in SQL Query Analyzer: Replace <sitename> with your site name and <clientcode> with your client code. This information can be found in your license information file (the text file supplied with your Pharos license key). The first two lines of this file contain your site name (after “Licensed to =”) and client code (after “Client code =”). Once the modifications are made, execute the query.

 

update system set licenced_to = '<sitename>', license_quick_key = '<clientcode>'

 

The Pharos Database is now installed.

 

4. Install the other Principal Server components

 

The servers can be installed with the standard setup program on the Pharos CD, but the registry on each node must be modified first so that the Pharos installers are aware that the database has been installed, and can access the name of the Server where database has just been installed.

 

To modify the registry, perform the following steps on each node:

 

1. Copy the registry file DatabaseRegistryShell.reg onto the node.
2. Open this file with a text editor, e.g. Notepad.
3. Make sure that the “Database Name”, “Password” and “User Name” values are the same as the values you created in step 2 above.
4. Replace the value of “Server Name” with the name of the virtual server running SQL Server.
5. Make sure that the “Path” value contains the directory where Pharos components will be installed, and that the “Pharos Database” value contains the build number of your release of Pharos (you can see the build number on the title bar of the first dialog that appears when you run Setup.exe on the Pharos CD).
6. Close the text editor and execute the registry file by double-clicking on it.

 

You can now run the Pharos setup program to install the Principal Server. Choose ‘Principal Server’ on the Select Role screen, then select all components on the Select Components screen (the Pharos Database should not be available for installation). When prompted for the SQL Server Machine Name, type in the name of the server running SQL Server. The installation of the services should proceed normally, with one exception: the second time you install the Distribution Service, an error message will appear, due to the fact that the installers attempt to insert an entry for a second Distribution Service into the Pharos Database, when there can only ever be one. This error message can be safely ignored.