Configure the ArcSDE Server
 
 
 

You must configure the ArcSDE Server before you can execute the unit tests. The tests are actually run on the server. The unit tests can be run against an Oracle database or a Sql Server 2000 database. You must configure the ArcSDE server for running the unit tests against each type of database. Most of the configuration is done by a perl script called SetupTestData.perl. Before running the script on the server, you must edit it to change some hard-coded values and you must set the SDEHOME environment variable. Configuring the server to run tests in the Sql Server 2000 database requires some additional manual steps.

The first step is to copy the C:\OpenSource\Providers\ArcSDE\TestData folder to the machine hosting the ArcSDE server. This folder contains the test data and the SetupTestData.perl script. Alternatively, you can use subversion to checkout the fdoarcsde.osgeo.org repository on the server.

The second step is to install ActiveState perl on the server. This is available from http://www.activestate.com/ActivePerl.

The third step is to create two Sql Server databases. If you want to run the tests in Sql Server 2000, you must create a database called ‘testmultidb’ using the SQL Server Enterprise Manager tool and create a database called ‘testsingledb’ using the ArcSDE server post installation tool.

To create the ‘testmultidb’ database, do the following:

  1. Invoke the Enterprise Manager tool.
  2. In the explorer pane right-click Console Root\Microsoft SQL Servers\SQL Server Group\<SQL Server Name>\Databases and select New Database... from the pop-up menu.
  3. Type testmultidb in the text box labeled Name in the tab labeled General in the dialog box labeled Database Properties and click OK.

To create the ‘testsingledb’ database, do the following:

  1. Set the SDEHOME environment variable. The value is such that running the command dir %SDEHOME%\etc in a cmd.exe window results in a list including giomgr.defs and dbinit.sde. The value should be something like C:\ArcGIS\ArcSDE\sqlexe. You can set this variable permanently by using the Control Panel, or you can set it temporarily in a cmd.exe window. In the latter case you must then run the post installation tool from the command-line.
  2. Invoke the post installation tool. The menu path for this tool will be something like Start Programs ArcGIS ArcSDE ArcSDE for Microsoft SQL Server Post Installation. The equivalent filesystem path is something like C:\ArcGIS\ArcSDE\sqlexe\tools\ArcSdeSetupSql.exe.
  3. In the window labeled ArcSDE for SqlServer click the radio button labeled Custom. Click Next.
    NoteThe reason for doing a custom install is to disable the authorization step.
  4. In the window labeled Select ArcSDE Setup Wizard Option uncheck Authorize ArcSDE and leave checked Define Database and SDE User, Repository Setup, and Create ArcSDE Service. Click Next.
  5. In the window labeled User Information click the radio button labeled SQL Server Authentication. Fill in the text boxes labeled sysadmin user name and sysadmin user password. Click Next.
  6. In the window labeled Create Spatial Database fill in the text boxes labeled SDE user password and Database name. Click Next.
  7. In the window labeled ArcSDE configuration files leave the defaults selected. Click Next.
  8. In the window labeled User Information review the connection information. The values are either defaults or ones that you provided in previous screens. Click Next.
  9. A dialog appears displaying the text The ArcSDE Repository was successfully completed. Would you like to view the status?. Click No. If you are told that the repository was unsuccessfuly completed, try re-executing the operation (click Back to return to the previous screen and click Next. If you are not rewarded with success, you will have to view the status and debug the operation.
  10. In the window labeled ArcSDE service information review the information that will be used to create the service that listens for requests pertaining to the database that you just created. The service name and service port number values must be unique to the services file. On WINNT the services files is located in C:\WINNT\system32\drivers\etc. Click Next. This will cause the service name and port number to be added to the services file, and the service to be started. You will be notified by an information dialog that the service was successfully started. Click OK in this dialog, and the final screen of the wizard is displayed. If you get an error message, try re-executing the operation; doing this has been known to correct the problem.

The fourth step is to edit the “HARDCODED SETTINGS” section within the SetupTestData.perl script. If you wish to install test data in an oracle instance, set $INSTALLORACLE=”Y”. If you wish to install test data in a SQL Server instance, set $INSTANCESQLSERVER=”Y”. Verify the values of all of the settings; each setting is described within the script.

The fifth step is to run the SetupTestData.perl script from the command-line on the machine hosting the ArcSDE server. This requires that Oracle’s sqlplus.exe and Sql Server’s osql.exe must be in the PATH environment variable so that the script can find them.

NoteYou can install test data against both Oracle and Sql Server simultaneously.

The script will ask you to specify whether you want to install or uninstall test data. The test data in question is contained in the C:\OpenSource\Providers\ArcSDE\TestData folder.

The script will ask you to specify a test dataset name. This name is used to create RDBMS test users with names in the form “FDO_<datasetName>_<suffix>.” The test users will own the test data.

NoteDataset names may be no longer than five characters.

If you encounter any problems installing test users or test data, you can run the script again and type ‘U’ for Uninstall, when prompted, to undo all of the changes. After you have identified and solved the problem, you can try the install again.