Database links must be defined on the Application Server to establish a connection to the database that resides on the back-end database engine. Each database to which you want to provide access is required to have its own database link. Each database link utilizes an ODBC data source to establish the connection to the database.
The next two subsections outline procedures necessary for creating database links and data sources. The last subsection describes how to start up/shut down database links managed by the Application Server.
In general, you should not need to create database links within the Application Server. Database links are created automatically by the Application Server installation program whenever a new DSM database is created on Microsoft SQL Server unless the installation program is being run on a different computer than the one on which the Application Server is installed.
To create a database link in the Application Server Shell:
- Select Database Links from the Configuration menu. This will open the Database Links Setup dialog box if it is not open or bring it to the front if it is already open.
- Click New to create a new database link. A Create Database Link dialog window will appear, allowing you to define the new database link you want to create.
Note: The following instructions may be used to modify an existing database link by selecting an existing database link and clicking Update.
- Type the name of the new database link in the Name field. The database link name should be something understandable to end users of the client applications, since they will need to select a database link to use the first time they run a client application. Example names could include “Company_Database” or “Training_Database.”
- Select an existing data source from the Data Source popup or click New to create a new data source. If you need to create a new ODBC data source for Microsoft SQL Server, refer to the “Creating ODBC Data Sources For Microsoft SQL Server” subsection for the instructions.
- After the data source has been selected (or created), type the Login ID and password to be used with the data source in the corresponding fields. The Login ID and password should be the ID and password initially used to create the database on SQL Server. If you are unsure of this information, please consult the Database Administrator.
- Click OK to add the new database link. The Application Server will attempt to connect to the database using the new data source. If the attempt succeeds, the new database link will be listed in the Database Link Setup window.
- Click Close to close the Database Links Setup window and make the new database link available for use by the client applications.
Creating ODBC Data Sources For Microsoft SQL Server
The previous section described the creation of database links within the Application Server. As previously noted, each database link requires an ODBC data source to connect to the database. This section discusses the steps required for creating a new ODBC data source for use with an Application Server database link.
To create an ODBC data source for Microsoft SQL Server:
- While creating (or updating) a database link, click New in the Create/Update Database Link dialog. A warning dialog will appear, instructing you to create a new system data source.
- Click OK. A Create New Data Source wizard will appear, allowing you to create a new data source for use with Microsoft SQL Server.
- Select the System Data Source option and click Next. This indicates you are going to create a system data source specific to the machine you are currently using.
- Select SQL Server as the driver for the new data source and click Next. This tells the setup wizard you want to create a data source for the Microsoft SQL Server database engine.
- Click Finish to create the new data source for Microsoft SQL Server. An ODBC SQL Server Setup dialog box will appear, allowing you specify the configuration of the data source you just created (by supplying the data source name, server name, etc.).
- Type the data source name, description (optional), and the name of the SQL Server where the database resides and click Next.
- Select the With SQL Server authentication method and type the appropriate Login ID and Password for connecting to SQL Server. Optionally, you may also click Client Configuration to confirm the data source will be using a TCP/IP connection to SQL Server. When finished, click Next.
- Click the Change the default database to check box, select the appropriate DSM database name from the drop-down menu and click Next. If you are unsure of the database name, please consult your Database Administrator.
- If the settings are correct, click Test Data Source to confirm that the new data source is configured properly. If the test was successful, click OK to return to the data source settings, then click OK again to add the new data source.
Starting Up and Shutting Down Database Links
The Database Links window (available from the Activity menu of the Application Server Shell) provides a listing of each database link defined on the Application Server, its current state ( — online and active;
— offline and inactive;
—non-fatal errors), and the number of users currently connected via each database link. The Database Links window also indicates the date and time the database links were brought online.
In the normal course of operation, you should rarely have to manually start up or shut down database links in the Application Server. There may be cases, however, when this is necessary. For example, if a database link does not start up properly (is offline), it may be because the Application Server cannot communicate with the database for some reason (unable to find it on the network, SQL Server is not running, etc.). In these situations, you may need to manually start up and/or shut down the database links using the Database Links Status window.
To shut down database links in the Application Server Shell:
- Select Database Links from the Activity menu. This will open the Database Links window if it is not open, or bring it to the front if it is already open.
- If the database links are currently started, click Shutdown Links. This will instruct the Application Server to take the database links offline and make them unavailable to the client applications.
Note: Steps 3-4 are skipped if there were no users connected to the Application Server at the moment of shutdown.
- If the Application Server detects that there are users currently connected, you will need to confirm your intention to shut down the database links.
- In the Shutdown Server window, specify the amount of time the Application Server should wait before shutting down the links and type the message to be broadcast to all end users.
- Select Database Links from the Activity menu. This will open the Database Links window if it is not open, or bring it to the front if it is already open.
- If the database links are currently shut down, click Startup Links. This will instruct the Application Server to start the database links and bring them online for use by the client applications.
- Review the statuses of the database links:
Only the database links that start up successfully (signified by a green status light ) are made available to the client applications.
A yellow warning sign indicates that non-fatal error occurred when starting up the link(s). For detailed error descriptions, see the Application Server log (refer to the “Utilizing the Server Log” section) and the Application Log in the Event Viewer program provided with the Windows Server operating system.
A red light indicates the database links that were left offline due to fatal errors. For detailed error descriptions, see the Application Server log (refer to the “Utilizing the Server Log” section) and the Application Log in the Event Viewer program provided with the Windows Server operating system.