sqsh-1.7 Copyright (C) 1995-1999 Scott C. Gray This is free software with ABSOLUTELY NO WARRANTY For more information type '\warranty' Password: Open Client Message Layer 6, Origin 8, Severity 5, Number 3 ct_connect(): directory service layer: internal directory control layer error: Requested server name not found. Open Client Message Layer 2, Origin 1, Severity 1, Number 31 cs_ctx_drop: cslib user api layer: external error: The context structure cannot be dropped because the application has not exited from ctYou have to execute the following command before starting sqsh.
source /local/etc/sybase.cshrc
sqsh-1.7 Copyright (C) 1995-1999 Scott C. Gray This is free software with ABSOLUTELY NO WARRANTY For more information type '\warranty' Password: Msg 4002, Level 14, State 1 Server 'CISE_DATASERVER_0', Line 1 Login failed. Open Client Message Layer 4, Origin 1, Severity 4, Number 44 ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed. Open Client Message Layer 2, Origin 1, Severity 1, Number 31 cs_ctx_drop: cslib user api layer: external error: The context structure cannot be dropped because the application has not exited from ctThen you mistyped the password. Type it again correctly.
I have seen you typing ';' at the end of command instead of 'go'. How do I enable it?
To enable the semicolon hack, you have to put the following line in .sqshrc. The file has to be created in your home directory\set semicolon_hack=1The file doesn't exist by default. You have to create a file and put above line in it.
How do I list the tables I created?
The following command lists the tables in databasesp_tables goIt only lists the tables you created or have access to. The table names starting with sys are system tables which you generally do not have access.
I am not able to access sybase through perl+dbi
Make sure that in the call to DBI connect you have given your password. You should be able to access the database with a statement like the following
$dbh = DBI->connect('DBI:Sybase:CISE_DATASERVER_0', 'username', 'password');
Substitue your username and password in the above statement for proper results.
sp_password "old password", "new password"The double quotes are required, if you have special characters in your password.
My project doesn't require sybase. Can I still use database and create table?
If you want to use it as a learning process, we welcome it. Register for the sybase account and mail me your CISE user id.Whenever you login, you will be logged in as a guest user. The tables you create will be with user name guest. If you want access to other teams tables, ask the creators team to grant permission. It's left to the creator team's discretion whether to grant permission or not.
Say you want to work on pubs2 database. The you would issue the following command
use pubs2 goNow onwards, the tables you create will be created in pubs2 database.
se<section number>c (or) se<section number>uThe group ending with 'c' contains students who will be creating tables. Students in the other group will be using the tables. If you don't know to which you group you should belong to, please see your recitation TA.
sp_helpuser <your user name> goThis prints your user name along with the group to which you belong to.
I am in the creators team, what should I do?
grant select, insert, update, delete on <table name> to se<section number>u grant all on <table name> to staff; goSay you are in section 6248 and created a table named demo then you give permission to access this table with following command
grant select, insert, update, delete on demo to se6248u grant all on demo to staff; goThe second command should be executed so that cen3031 staff (Dr. Cubert and his TAs) will be able to access your tables.
grant all on <table name> to se<section number>c goSay you are in section 6248 and created a table named demo then you give permission to do administrative tasks to your friends in the team with
grant all on demo to se6248c go
How do I specify wild cards in commands?
Wild cards can be used in certain commands for selecting multiple things in a command. For example, if you want to find out all the tables starting with the suffix 'sys', you would write the command as followssp_tables 'sys%' goThe percentage(%) character denotes a string of length 0 or more. Other wild characters commonly used are
|
Symbol |
Meaning |
|---|---|
|
% |
Any string of 0 or more characters |
|
_ |
Any single character |
|
[ ] |
Any single character within the specified range ([a-f]) or set ([abcdef]) |
|
[^] |
Any single character not within the specified range ([^a-f]) or set ([^abcdef]) |
How do I access sybase from C programs?
There are variety of ways through which you can access sybase database through 'C'. Follow this link for more information.I use bash as my default shell. Do you have a sybase.bashrc?
Yes !!! Follow this link for more information.