Thursday, July 05, 2007

Change Default Database for Sybase User

Here is a quick way to change the default database for a user in Sybase. This is a fairly common database administration (DBA) task which I have done on several occasions. The change can be done with the sp_modifylogin stored procedure. In the SQL example below, the esofthub login is being assigned the esoftdb as its default database. Here is its syntax.

# isql -Usa -Ppassword
1> sp_modifylogin esofthub, defdb, esoftdb
2> go

No comments: