Troubleshooting the Configuration for Sybase
Note: Sybase database servers may be used for demonstration, training. and development; they are not tested for production deployment.
If the database service and application server service do not start or stop as expected, or if you would like to establish and run these services without using the Smart Client, use these procedures.
Verify your Installation
First, verify that your installation is correct. In particular check that:
- Sybase Adaptive Server Anywhere is installed.
- You installed Sybase Adaptive Server Anywhere before you installed Archibus.
Creating the Services from the Command Line
From the command line or from a desktop icon, you can follow the same steps in creating the Windows services as the Smart Client does. You can access the Windows command line on XP by selecting Start/Run and then entering command
. On Windows, type command
in the "Search programs and files" control. In either environment, you can use the icon at the top-left of the dialog to paste statements like those below to the command line.
Create the Sybase Database Service
To create the Sybase service, execute a statement like the following. Substitute your own location for the Sybase Adaptive Server Anywhere program file and your own database file location and name. Also, update "Archibus_xxx" with the appropriate version number, such as Archibus_211.
"c:\Program Files\Sybase\win32\dbsvc.exe" -y -as -i -sn SybaseASA_for_Archibus_xxx -sd SybaseASA_for_Archibus_201 -w SybaseASA_for_Archibus_xxx -n SybaseASA_for_Archibus_xxx -c 300M -gp 4096 "C:\Documents and Settings\All Users\Archibus\projects\hq\data\hq.db"
To delete the service, first stop the service, then execute a statement like the following.
c:\Program Files\Sybase\win32\dbsvc.exe" -d SybaseASA_for_Archibus_xxx -y
To get the full list of switches that are available, invoke the command above with no command-line arguments.
Create the Jetty Application Server Service
To create the Jetty Service, execute a statement like the following.
"C:\Program Files (x86)\Archibus\xxx\Jetty\Bin\Jetty-Service.exe" --install "C:\Documents and Settings\All Users\Archibus\WEB-INF\config\jetty-service.conf"
To remove the Jetty Service, first stop the service, then execute a statement like the following.
"C:\Program Files (x86)\Archibus\xxx\Jetty\Bin\Jetty-Service.exe" --remove "C:\Documents and Settings\All Users\Archibus\WEB-INF\config\jetty-service.conf"
To get the full list of switches that are available, invoke the command above with "-?" instead of "--remove". Useful switches are --start and --stop.
You must start your Sybase database service before running the Jetty application server service. If you rename your Sybase database service, update the service dependencies in the Jetty configuration file (WEB-INF\config\jetty-service.conf
).
Starting and Stopping the Services
You can start and stop the services from the Windows Services Manager. You can also change the services from automatic (meaning that they will restart automatically when you restart your workstation) to manual (meaning that the services will not retart until you do so yourself).
To access the Windows Services Manager, execute services.msc
at the Windows command prompt.
Creating the Sybase Service from Sybase Central
You can use the Sybase Central management utility to create, start, and stop the Sybase database service.
To do so:
- Open Sybase Central using the Start / All Programs / SQL Anywhere / Sybase Central menu item.
- Navigate to the Services tab.
- Right-click within the Services tab, select "New/Service..."
- For the Service Name enter
SybaseASA_for_Archibus_xxx
. (Enter the appropriate version number for "xxx". - For type of service select "Network Database Service".
- For executable, accept the default (such as,
dbexe10.exe
). - For parameters for the executable, specify
-gp 4096 -x tcpip (PORT=2639)
"C:\Documents and Settings\All Users\Archibus\projects\hq\data\hq.db"
-- however, substitute your own database and database location for the sample "hq" database. - Select a Windows account that will run the service.
- Start the service.
You can create the Jetty service using the method described above. Be sure to update (or remove) the services dependencies from the Jetty configuration file (jetty-service.conf
), as the Sybase Central utility names the service as "Adaptive Server Anywhere - SybaseASA_for_Archibus_xxx".
Or, you can use the database with Apache Tomcast as described in the Enterprise Installation topics.
Test your Connection from Interactive SQL
If the server is running, but you still cannot connect, verify that you can log into the program and query data.
- Start the Sybase Central utility by selecting Programs / Sybase / Adaptive Server Anywhere / Manage Adaptive Server Anywhere.
- Select Utilities/Interactive SQL. For the login dialog, use
AFM
as the user name. - In the Command window, type a select statement such as
SELECT * FROM afm_tbls
and choose the Execute button. You should see a list of Archibus tables.
If this check fails, your Sybase server is not installed properly, the server is not started, or the server did not load the database file itself. Recheck your installation or server startup steps.
Pinging the Server
While the particular connection details of each site's network differ, it is worthwhile to point out one or two common diagnostic strategies for TCP/IP networks.
One common test to use is the "Ping" utility that comes with most operating systems that support the TCP/IP protocol. This will help you to determine if the client workstation can communicate with the database server computer using the same low-level protocol that the database client and server use. For instance, if the IP Address of the database computer is 193.182.9.2, you might enter the following command line to see if you could get a response.
Ping 193.182.9.2
If this test shows no response on a TCP/IP network, there is an underlying network issue involved, not a database server issue.
Sybase uses a broadcast strategy to find the server. On mid-sized or large networks, this broadcast will often be stopped at an intermediate router, which is designed to limit the flow of traffic between subnets.
If this is the case at your site, you can still connect to the server by explicitly specifying the IP address of the database server. You do this by using the HOST parameter in the connection parameters switch, for example,
-x tcpip(HOST=kangaroo;HOST=197.75.209.222:2369)
Refer to the Adaptive Server Anywhere online reference material for more information on configuring the broadcast and server connection communication links.