Chapter 1
CSE Database Server

Currently the CSE department is using Sybase as its database server for instructional and production purposes.

Several of the courses offered at CSE use the database in their course work. Students taking these courses will have a database account generated for them automatically at the beginning of the quarter. This account will be removed at the end of the quarter.


 1.1 Database Accounts
 1.2 Sybase and the CSE environment
 1.3 Accessing the Database
 1.4 Changing your password
 1.5 What to do if you have problems
 1.6 More Information
 1.7 Alternatives to isql

1.1 Database Accounts

Accounts on the database server are generated on automatically. The login name will be the same name as your Unix login name. [NOTE: The one exception is if there is a dash (-) in the Unix login name. In this case, the Sybase login name will have the dash converted to an underscore (_).]

The same scheme that is used to generate initial Unix passwords is used for Sybase also (i.e., last four digits of your student’s ID number + initial character of firstname + initial letter of lastname).

1.2 Sybase and the CSE environment

Before accessing Sybase, you must subscribe to SYBASE using the subscribe command. This will ensure your environment is set correctly so that you can connect to the database server. To do this, type the following command at the Unix prompt:

% subscribe SYBASE

This will set the following environment variables to their required values:

PATH will contain /usr/local/sybase  
SYBASE = /usr/local/sybase  
DSQUERY = sybase

1.3 Accessing the Database

Sybase provides a utility called isql that can be used to connect to the database server.

% isql -X

The -X option encrypts your password when connecting to the server. If you have a Unix username that contains a dash (-) you will need to use the -U option when connecting to the database server since your Sybase login name will have the dash converted to an underscore (_).

% isql -X -U foo_bar

When you first connect to the Sybase server you are placed in your default database. Usually this is your course database. However, if you are in two courses which required use of a database, then only one can be your default. To use the other course database, you will need to know how to switch between databases. You can switch to a different database with the use command:

1> use c670aa  
2> go

1.4 Changing your password

After connecting to the server you can change your password using the stored procedure sp_password

1> sp_password old_password, new_password  
2> go

You may need to enclose your passwords in quotes (” or ’) depending on what characters you use in the passwords. Your passwords will not be hidden or encrypted when changing them with sp_password so it is best to make sure that no one is looking over you shoulder.

If you have forgotten your password you can visit the SOC lab and have it reset to the default.

1.5 What to do if you have problems

Read the online Sybase manuals listed in section 1.6 “More Information”.

If you are having a problem connecting to the server or with your account you should send email to help@cse.ohio-state.edu and state what the problem is and what your Sybase login name is.

If you have forgotten your password you should visit the SOC lab on the 8th floor of Dreese to get your password reset. You will need to have your id with you to do this.

If you are having problems running your course work, you should contact your instructor.

1.6 More Information

IICF has installed a subset of the Sybase manuals on http://database.cse.ohio-state.edu. You can reference those local manuals from the “SyBooks Web Server” option on the that page. “SyBooks-on-the-Web” option will take you to the complete set of manuals installed on Sybase’s web server (http://sybooks.sybase.com).

Documentation on isql is provided in the Unix Utilities Manual. The reference manuals and the manual on Transact-SQL are good sources of information.

1.7 Alternatives to isql

sqsh (pronounced squish) is a freeware replacement for isql. It is contributed software and not supported by the IICF staff. It has all of the functionality of isql plus a whole lot more including some scripting capability. If you do a lot of database work, it is definitely worth checking out. You will need /usr/contrib/man in your man path to access the man page for sqsh. You can subscribe to CONTRIB using the subscribe command to have your MANPATH and PATH set up correctly to access contributed software.

% subscribe CONTRIB