![]() | ![]() |
Home |
|
|
Adaptive Server IQ Troubleshooting and Error Messages Guide |
|
| Chapter 1: Troubleshooting Hints |
|
| Solutions for specific conditions |
|
| Server operational issues |
This section contains information about problems with the operation of the server, including startup, shutdown, unresponsiveness, and abnormal termination.
Adaptive Server IQ won't startTransaction log file does not match the database.
Server cannot find the transaction log.
Operating system is not at proper patch level.
Network connections are not working.
Server name is not unique on your network.
Server port number is not unique on the machine.
Server is already running as a Windows service (Windows systems only).
Not enough available memory.
Environment variables are not set correctly.
You cannot run start_asiq.
Transaction log file does not match the database
The following messages appear in the server log file (.svrlog) and in the window where you are starting the server:
Starting database "dbname" (/dbdir/dbname.db) at Fri Oct 11 2002 10:53 Transaction log: dbname.log Error: Cannot open transaction log file -- Can't use log file "dbname.log" since the database file has been used more recently Cannot open transaction log file -- Can't use log file "dbname.log" since the database file has been used more recently Database server stopped at Fri Oct 11 2002 10:53
If these errors are reported when you are starting the server, check to be sure the server is using correct transaction log file. If you cannot find the correct transaction log file, then restore from the last valid backup.
Server cannot find the transaction log
If the server fails to start because it cannot find the transaction log, the following messages appear in the server log file:
Transaction log: /dbdir/dbname.log... Error: Cannot open transaction log file -- No such file or directory Cannot open transaction log file -- No such file or directory
If this error is reported when you attempt to start the server, find the transaction log file and copy the file to the same directory as the database .db file. If you cannot find the correct transaction log file, then restore from the last valid backup.
Server name is not unique on your network
If the server name is not unique on your network, i.e., multiple systems have a server with the same name, the following messages appear in the server log file (.svrlog) when you attempt to start the server using start_asiq:
DBSPAWN ERROR: -82 Unable to start specified database Server failed to start
If you see these errors in the server log file and the server will not start, try to start the server using the asiqsrv12 command. The asiqsrv12 command returns a more specific error message:
A database server with that name has already started
Once you have verified that the problem is a duplicate server name on your network, start the server with a name that is different from the names of servers that are already running.
Server port number is not unique on the machine
If an IQ server is running and you attempt to start another IQ server on the same machine using the same port number, the following messages appear in the server log file (.svrlog):
Trying to start TCPIP link ... TCPIP communication link not started Unable to initialize requested communication links ... DBSPAWN ERROR: -85 Communication error Server failed to start
If you see these messages in the server log file and the server will not start, run the stop_asiq command to display the names and port numbers of IQ servers already running on the machine. Then try to start your server, specifying either a port number that is not in use or no port number. When you start a server and do not provide a port number (and the default port number is already in use), IQ generates an available port number.
Here are the messages you see in the server log file, when you start the server and do not specify a port number:
Trying to start TCPIP link ... Unable to start on default port; starting on port 49152 instead TCPIP link started successfully Now accepting requests ... Server started successfully
Environment variables are not set correctly
If your database configuration file parameters differ from those used by start_asiq, make sure the correct parameters are used to start the server.
You cannot run start_asiq
If you cannot run the start_asiq command and you normally use a configuration file or other command line switches, try starting the server using only start_asiq with the server name and database name. If the server starts with this simple command, then the problem is probably caused by one or more of the switches or parameters entered on the command line or in the configuration file. Try to isolate which parameter or switch is preventing the server from starting.
If the server does not start with the most basic start_asiq command, try starting the asiqdemo demo database using your configuration file and command line switches. If the server starts with the asiqdemo database, there may be a problem with your database. Refer to the section "Database connection issues".
If you still cannot run the start_asiq command, use the Start Database Server utility in Sybase Central or the asiqsrv12 command.
Before running asiqsrv12, you must perform the following tasks (which start_asiq normally does for you):
Remove all limits, and then set limits on the stack size and descriptors. To do so, go to the C shell and issue these commands:
% unlimit % limit stacksize 8192 % limit descriptors 4096
Be aware that unlimit affects soft limits only. You must change any hard limits by setting kernel parameters.
Be careful to set all server options appropriately for your platform. For details about appropriate options and how to set them in a configuration file, see the Adaptive Server IQ Installation and Configuration Guide.
For any database created with a relative pathname, you must start the database server from the directory where the database is located.
Note what directory you are in when you start the server. The server startup directory determines the location of any new database files you create with relative pathnames. If you start the server in a different directory, Adaptive Server IQ cannot find those database files.
Any server startup scripts should change directory to a known location before issuing the server startup command.
Syntax for asiqsrv12 is as follows:
asiqsrv12 -n server-name -gm number [ other-server-switches ] [ database-file [ database-switches ] ]
On the asiqsrv12 command line, the last option specified takes precedence, so if you want to override your configuration file, list any options you want to change after the configuration file name. For example:
asiqsrv12 @asiqdemo.cfg -x 'tcpip{port=1870}' asiqdemoThe -x parameter here overrides connection information in the asiqdemo.cfg file.
When you start the server with the asiqsrv12 command, it does not run in the background, and messages do not automatically go to the server log. However, if you include the -o filename server switch, messages are sent to the named file in addition to the server window.
If the server fails to start when you run the asiqsrv12 command, then attempt to start again using the asiqsrv12 utility with minimal switches and parameters. For example:
asiqsrv12 -n <servername> <dbname>.db -c 32m -gd all -gl all
If the server starts with the minimum parameters and switches, then one of the parameters or switches normally used to start the server may be causing a problem. Try to isolate which parameter or switch is preventing the server from starting.
Chapter 2, "Running Adaptive Server IQ" in the Adaptive Server IQ Administration and Performance Guide for more information on server startup, including the section "Troubleshooting startup, shutdown, and connections."
Adaptive Server IQ stops processing or stops respondingThe following are the two most common causes of server unresponsiveness, which can be detected by looking in the IQ message file:
Insufficient disk space. See the section "Insufficient disk space " for actions to take.
Insufficient room in main or temp buffer cache. See "Managing buffer caches" in Chapter 12, "Managing System Resources" of the Adaptive Server IQ Administration and Performance Guide.
If your server seems to be prone to unresponsiveness, either while processing or during shutdown, use the start_asiq command line option -z and the IQ database option QUERY_PLAN = 'ON' to log useful information in the IQ message (.iqmsg) and server log (.svrlog) files. In addition to logging this information, there are other steps you can take to determine the cause of the problem:
Check both the IQ message file and the server log file for
"You have run out of ... dbspace"messages. If you have run out of IQ STORE (main) or IQ TEMPORARY STORE, add the appropriate dbspace with the CREATE DBSPACE command. See the section "Insufficient disk space " for more information on resolving out of space issues.
Setting the database options MAIN_RESERVED_DBSPACE_MB and TEMP_RESERVED_DB_SPACE_MB to large enough values to handle running out of space during a DDL COMMIT or CHECKPOINT is also important. A few hundred MB should be enough, but these options can be set higher for a large database. For more information, see the sections "Handling out-of-space conditions for DDL commands" and "Reserving space to handle out-of-space conditions" in Chapter 3, "Working with Database Objects" of the Adaptive Server IQ Administration and Performance Guide.
Determine if the IQ server process (asiqsrv12) is consuming CPU cycles by monitoring the CPU usage for a few minutes at the operating system level. Record this information. If the CPU usage changes, then the IQ server process should be processing normally.
If the IQ server CPU usage is normal, you can examine what the server is doing, i.e., what statement the server is currently executing. For details on capturing this information and logging server requests, see the sections "Finding the currently executing statement" and "Logging server requests".
If there are no out of space indications, use DBISQL on a new or existing connection to gather the information listed in the following table (in this order).
Command | Informational purpose |
select db_name() | database name |
checkpoint | checkpoint can succeed |
select db_property('FileVersion') | version of catalog |
set temporary option truncation_length=100 | increase output line length |
sa_conn_properties ># sa_conn_properties.out | connection information |
sa_conn_info ># sa_conn_info.out | connection information |
sa_db_properties ># sa_db_properties.out | database property information |
sa_eng_properties ># sa_eng_properties.out | server property information |
sp_iqstatus ># sp_iqstatus.out | database status information |
sp_iqconnection ># sp_iqconnection.out | connection information |
sp_iqtransaction ># sp_iqtransaction.out | transaction information |
If you cannot resolve this issue, contact Sybase Technical Support for assistance. The information you have just gathered can be used by Technical Support to help diagnose the problem. See the section "Reporting problems to Technical Support".
If you can connect to the database, run the IQ UTILITIES buffer cache monitor on the main and temp (private) buffer caches for 10 minutes with a 10 second interval:
Connect to the database or use the existing connection.
CREATE TABLE #dummy_monitor(c1 INT);
IQ UTILITIES MAIN INTO #dummy_monitor START MONITOR '-append -debug -interval 10 -file_suffix iqdbgmon';
IQ UTILITIES PRIVATE INTO #dummy_monitor START MONITOR '-append -debug -interval 10 -file_suffix iqdbgmon';Let the process run for 10 minutes, then stop the buffer cache monitor:
IQ UTILITIES MAIN INTO #dummy_monitor STOP MONITOR;
IQ UTILITIES PRIVATE INTO #dummy_monitor STOP MONITOR;
For more information on monitoring buffer caches, see the section "Monitoring the buffer caches" in Chapter 13, "Monitoring and Tuning Performance" of the Adaptive Server IQ Administration and Performance Guide.
Check near the end of the IQ message file for the message
"Resource count 0", which may be followed by an
"Open Cursor"message. These messages indicate a resource depletion, which can cause a deadlock. The immediate solution is to reduce the number of active connections using CTRL-C or the DROP CONNECTION command.
The long term solution to avoid a deadlock due to resource depletion is one or a combination of the following:
Restrict the number of users on the server by reducing the value of the -gm server startup option
Add another query server to a multiplex
Increase the processing capacity of the hardware by adding CPUs
Normally you should be able to shut down the server by running the dbstop utility or stop_asiq, by typing
qin the server window on UNIX, or by clicking Shutdown on the server window on Windows. If none of these methods works, see the Actions section below.
Various.
On UNIX systems:
Capture ps operating system utility output, so you can submit this output to Sybase Technical Support. On Sun Solaris two different ps options are available. Use both.
ps -aAdeflcj|egrep "PPID|asiqsrv12"
/usr/ucb/ps -awwwlx|egrep "PPID|asiqsrv12"
Try to kill the process at the operating system level to generate a core dump.
kill -6 pid
A small core file is created in the directory where start_asiq was run. If you are able to kill the server process in this way, skip to step 5.
If the server process still does not exit, capture ps output as in step 1. Retain the output from both times you run ps (before and after trying to kill the process). Then kill the process with a stronger signal:
kill -9 pid
If this method does not cause the process to exit, capture yet another set of ps output, and then reboot your system.
Submit all ps output, the core file (if generated in step 2), and the stack trace in stktrc-YYYYMMDD-HHNNSS.iq (server_name.nnn.stderr on HP-UX) to Sybase Technical Support.
On Windows systems:
Start the Task Manager by right-clicking the Task Bar and clicking Task Manager.
In the Processes tab, select asiqsrv12.exe and then click the End Process button to stop the database server.
If necessary, restart Windows.
Refer to the section "Reporting problems to Technical Support" for a full list of information to provide to Sybase Technical Support.
System failure/Adaptive Server IQ failureVarious.
Copy or rename the message log file (dbname.iqmsg) before trying to restart the database. This ensures that any useful information in the file will not be lost.
On UNIX, send a copy of the stack trace to Sybase Technical Support, along with the additional information listed in the section "Reporting problems to Technical Support". The stack trace should be in the directory where you started the database server, in a file named stktrc-YYYYMMDD-HHNNSS.iq, or server_name.nnn.stderr on HP-UX. If the database was open when the failure occurred, the stack trace should also be in the IQ message log (default name dbname.iqmsg). This information helps Sybase Technical Support determine why the failure occurred.
Restart the server with the start_asiq command. When the database restarts, recovery occurs automatically.
Try to start the server without starting a database. If you are able to start the server but not the database, check that database parameters are specified correctly on the startup line and/or in the connection profile.
"System recovery" in Chapter 8, "Transactions and Versioning" of the Adaptive Server IQ Administration and Performance Guide
|
|