Switch to standard view
Sybase logo  
Sybase logo  
Products | About Sybase | Support



Get The FAQ's on using ASA for UNIX Part 2

Using the Database Engine

    Q14. How should I shut down the server?
    Q15. How do I port my database from Windows to Unix?
    Q16. How do I connect to my server through the firewall?
    Q17. Which ODBC driver manager should I use on Unix?
    Q18. How do I use ASA with one or more of: Apache,
            PHP, perl, DBD and UnixODBC?

Common Problems and Error Messages

    Q19. When trying to install ASA on Linux, I get "dbinstall:
            error in loading shared libraries: libstdc++.so:
            cannot open shared object file: No such file or
            directory
    Q20. When trying to start a server, I get: Error in
            command near "x" followed by the usage screen.
    Q21. The ALT key does not work in dbisql (or dbisqlc).
    Q22. The function keys F1 to F10 do not work in dbisql
            (or dbisqlc).
    Q23. On RedHat 7.0 or Mandrake Linux, dbisqlc fails to
            start, with the message "Unable to initialize screen
            routines:".
    Q24. I can create a database with a very long name, but I
            cannot start an engine on it
    Q25. How do I reduce the amount of data ASA places
            into my messages file?

Using the Database Engine

Q14. How should I shut down the server?
A14. There are several ways to shut down the server cleanly:

  • From a shell prompt, use the command 'dbstop'. Note: stopping the network server requires adding a connection string with a user ID that has permission to stop the server (by default: DBA authority). For example: dbstop -c"uid=DBA;pwd=SQL".
  • While connected to the server (for example, from within dbisql), issue the STOP  ENGINE statement.

  • (SA network server) in the server console, select the menu item File (or use ALT-F), and choose Quit.

  • (SA personal server, ASA server) hit 'q' on the server console.

  • From a shell prompt, use the kill -1 command to stop the server's process. Do not to use kill -s KILL, kill -9, or kill -s STOP as the server cannot catch these signals and is forced to exit without cleaning up its resources. If it is absolutely necessary to use kill -9, then you must clean up any un-freed semaphores and undeleted server temporary files, and kill any zombie processes before restarting the server. Using kill -9 may cause data to be lost from the database.

Q15. How do I port my database from Windows to Unix?
A15. The database files are binary compatible between Windows and Unix. You can copy the files between platforms. Ensure that you use a binary copy when moving files between machines. Be aware of case-sensitivity on Unix. You may need to run dblog if you have absolute file names in the database.

Q16. How do I connect to my server through the firewall?
A16. If your firewall blocks UDP packets, then you will need to specify UDP=NO in your connection string. Also, you may need to specify DoBroadcast=NO and Host=x.x.x.x. Here is an example of how to set up a dsn:
dbdsn -w mydsn -c "eng=myengine;links=tcpip{udp=no;dobroadcast=no;host=1.2.3.4}"

Here is an example of a connection string:
dbisqlc -c "uid=dba;pwd=sql;links=tcpip{udp=no;dobroadcast=no;host=1.2.3.4};eng=asademo"

Q17. Which ODBC driver manager should I use on Unix?
A17. ASA can be accessed through ODBC either with or without a driver manager. If you use a driver manager, then you must set up a section for the ASA ODBC driver inside of the file .odbcinst.ini. Two versions of the ASA driver are available: the non-threaded dbodbc7.so, and the threaded dbodbc7_r.so. See the documentation for your driver manager for details on how to set up .odbcinst.ini. Also, make sure that the ASA driver is inside a directory in your library path. If you use asa_config.sh (see above), this will be set automatically. On the other hand, if you wish to run ASA without a driver manager, .odbcinst.ini is not required. In both cases, you must place your DSN definitions in .odbc.ini, which is located by default in your home directory, or in the locations specified by ODBCINI and ODBCHOME (see above). The dbdsn utility can help you create a dsn. Please refer to the html help for dbdsn for more information about this.

Q18. How do I use ASA with one or more of: Apache, PHP, perl, DBD and UnixODBC?
A18. We are currently preparing a white paper outlining the steps needed to set up an ASA-based web site. It will appear soon on my.sybase.com.

Common Problems and Error Messages

Q19. When trying to install ASA on Linux, I get "dbinstall: error in loading shared libraries: libstdc++.so: cannot open shared object file: No such file or directory
A19. You must first install libstdc++ from your Linux distribution in order to install and run ASA.

Q20. When trying to start a server, I get: Error in command near "x" followed by the usage screen.
A20. Braces ( '{' and '}') must be escaped or quoted if used in the csh or tcsh shells. Braces are special characters which need to be proceeded by a \ (backslash) in order to be taken literally. For example:
dbsrv7 -x tcpip\{host=portal\} asademo.db

Q21. The ALT key does not work in dbisql (or dbisqlc).
A21. Some terminals do not allow dbisql to distinguish when the ALT key is being used. To enter an ALT- key in dbisql, use CTRL-A followed by the key to which the ALT modifier is to be applied. For example, to see the File menu, type CTRL-A f. If you are using dbisql from a remote terminal such as a VT100 emulator you may be able to configure the terminal to use "emacs mode" so that it will send ALT-<key> as ESC <key>. dbisql will also recognize these escape sequences. You can type ESC <key> yourself but they must be typed in quick succession otherwise the keys will be interpreted individually.

Q22. The function keys F1 to F10 do not work in dbisql (or dbisqlc).
A22. On terminals for which function keys do not appear to be supported in dbisql, you can use CTRL-F followed by a single digit for the function key number. For example, you can enter F4 by typing CTRL-F 4. Use CTRL-F 0 for F10. If necessary, key sequences can also be defined for SHIFT and CTRL to be applied to the next key (so that SHIFT-<FunctionKey> or CTRL-PgDown can be entered). These sequences are controlled by a terminfo extension (tix) file. dbisql first looks for ${TERM}.tix in ${HOME}, /opt/SYBSasa6/tix, /opt/SYBSasa6/bin, and then throughout ${PATH}. If ${TERM}.tix is not found, dbisql will search for default.tix in the same directories.

Q23. On RedHat 7.0 or Mandrake Linux, dbisqlc fails to start, with the message "Unable to initialize screen routines:".
A23. These distributions shipped with libncurses.so.5, and dbisqlc expects libncurses.so.4. To fix this, either install the latest EBF, or obtain libncurses.so.4 and put it into your ASA lib directory. This problem is fixed in version 6.0.3 (build 2993 and later), version 6.0.4, and all later versions.

Q24. I can create a database with a very long name, but I cannot start an engine on it.
A24. Long engine names are truncated to 32 characters on Unix (not 40 as documented) and if no name is specified, by default it becomes the filename (without the extension). You can get around this by giving the engine a shorter name, for example:
dbeng7 -n ashortname a12345678901234567890123456789012345678901234567890.db

Q25. How do I reduce the amount of data ASA places into my messages file?
A25. To prevent any messages being logged to /var/log/messages you can start the server using the switch -s none. For example:
dbsrv7 -s none asademo.db
Or, you can use the -o <filename> switch to dump the messages to the file <filename>.

Q26. ASA6 server on Linux with Win clients hanging during queries
A26. There were some TCP/IP problems in Linux that impacted users both of ASA and of the free distribution of ASE for Linux in a similar way. The TCP/IP problem on Linux was fixed in one of the more recent stable Linux kernel releases.



[#]Home  [*]Top

© Copyright 2008, Sybase Inc.