Help with Sybase DB

 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Help with Sybase DB
# 1  
Old 07-17-2013
Help with Sybase DB

Hi,

I'm facing an emergency situation, wherein I have to provide limited support to a Sybase DB temporarily as the DBA was fired. There is an urgent need of adding to users to the database. After some time on google, I was able to gather the below information on the database setup

Code:
ascent_pm

 Users_name        ID_in_db    Group_name        Login_name
 ----------------- ----------- ----------------- -----------------
 ascent_app                 46 users             NULL
 ascent_sis                 47 sis               ascent_sis
 dbo                         1 public            sa
 rpt_daemon                 45 users             NULL
 webascent                  44 users             NULL
(return status = 0)



ascent_salary

 Users_name        ID_in_db    Group_name        Login_name
 ----------------- ----------- ----------------- -----------------
 ascent_app                 10 salary            NULL
 dbo                         1 public            sa
 rpt_daemon                 11 salary            NULL
 webascent                  12 salary            NULL
(return status = 0)


 user_name
 ------------------------------
 dbo
 dtm_tm_role
 guest
 ha_role
 navigator_role
 oper_role
 probe
 public
 replication_role
 sa_role
 sso_role
 sybase_ts_role

I need to add a two users one similar to ascent_app and another similar to webascent. I have NO knowledge of sybase. Any help would be highly appreciated.

Thanks in Advance.
# 2  
Old 07-18-2013
In Sybase, users are not the same as schema names, but are a related set. A Sybase instance has many databases: master, model, tempdb, ... including application DBs. One user is each DB's DataBase Owner, dbo. Tables and other ovjects in the table can be owned by dbo or by a granted user. For that user, he sees his own tables if in name conflict with dbo, my_table_name is my_db_name.my_user_id.my_table_name first else my_db_name..my_table_name, but you can look at other users' tables if you use the long form and have permission. A DB has some system tables to store schema information, like syscomments holds the text of all sp among other things.

I use SQuirreL to peruse DB in a vendor-independent way using the always free JDBC jars. Sybase has them as JConnect in various revisions. I have to use old JConnect 2 for my hp roman8 character set. FreeTDS also works for most things, and supports MS SQL Server, too (MS bought it from Sybase and does some neat skins).

Sybase manages things by stored procedures, mostly, so expect to be executing something like sp_adduser. Lots of Sybase Manuals Online. http://infocenter.sybase.com/help/in...g1/sag1569.htm

Sybase DB seem to like "clustered index" tables, where a clustered index actually holds the table, really more like an indexed sequential file, and other indexes are like side tables with sorted lists of keys and row locations. Clustered index access is much faster, unless you can answer a query with another index and no table access. Space management on old Sybase tables demands a clustered index. Sybase tables work better if you update statistics often enough to keep them relevant, like after a big load. Most prod databases have only dbo tables. Dev and test DB might have user tables, so everyone can diverge their testing and schema. This requires all code to use unqualified table names, which is a problem if using tables in many db.

All users have access to tempdb to create ephemeral (connection life) #name tables (no qualifier needed, names guaranteed unique) or server-run tables with explicit names tempdb..whatever, name conflict quite possible but persistent between sessions, so you can create a table in one isql, run bcp to load it and use another isql to mod the real DB. TempDB has less logging and such, so it is faster. The query planner may generate tables there automatically, like for a union. Master has info on all users and db, model is used to make new DB as a template.

Sybase original tables have page not row locking, but to be competitive in bidding requirements with DB2, Oracle and such they later came up with tables that have row locking, which are surely a different beast.

Sybase has replication, very popular, where the logs are filtered, edited, abstracted and shipped to other DB. Overehead tothe feeding DB is low, just log file i/o, and there may be dedicated 'stable' servers to process the replication, which can go to many servers. The class case was a company with NY, London and Tokyo offices, where each had 2 db replicated around the ring, and changes anywhere go everywhere. Another popular configuration is to have one or more report DB, possibly with different indexes (more, which slows churn), so the reports do not slow the transactions.

Not that I am a certified Sybase DBA or anything.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sybase server

I have requirement to connect to different sybase server's and store the data into flat file and load into oracle using sqlloader for each day drop the table and re create it and load the data based on business date as parameter which was taking from parameter file.Any help on this should be... (0 Replies)
Discussion started by: mohan705
0 Replies

2. Shell Programming and Scripting

Sybase 12/15 compatability

This is more a database problem than a shell one, but we have a problem affecting our scripts, so I'm stretching the limits a bit! ;) We're in the process of migrating our application and a large number of associated scripts from Sybase 12.5.4 to Sybase 15. Scripts using 'isql' and 'bcp' include... (1 Reply)
Discussion started by: JerryHone
1 Replies

3. Shell Programming and Scripting

sybase::bcp

I am trying to bcp in using sybase::bcp perl module. I can find we can give user, pwd and server name in the parameters. How can I give database and table name? (1 Reply)
Discussion started by: Deei
1 Replies

4. AIX

Check Sybase installation

Hi, How do i check if Sybase is installed on aix..The sybase guy is doing remote installation and i need to check if he has installed sybase or not. ive tried the following approaches. #lslpp -L "*Sybase*" # tried other strings like "*ybase*" , "*base*" #lslpp -ha |grep syb # tried... (4 Replies)
Discussion started by: muzahed
4 Replies

5. Shell Programming and Scripting

Sybase Connection Issue

I am trying this >$ /usr/sybase/bin/isql -UABC -Pdef -SXYZ -b Getting the following error. Help is appreciated (1 Reply)
Discussion started by: pinnacle
1 Replies

6. Windows & DOS: Issues & Discussions

how to connect to sybase database?

hi, I'd like to connect to a Sybase ASE 12 through a a graphic user interface (GUI) that run on windows and solaris10, because i need to do some querys. The database is running on solaris 10. I'm not an expert using databases, but i know how to use some SQL commands through command line... (3 Replies)
Discussion started by: danin
3 Replies

7. Ubuntu

Sybase Installation on Ubuntu

Hi, Can any one please suggest me which version of Sybase 15.x I need to dowload for installing on my laptop(Dell Inspiron 1525) having Ubuntu8.1? Thanks & Regards, Siba Sankar Nayak (0 Replies)
Discussion started by: siba.s.nayak
0 Replies

8. Shell Programming and Scripting

sybase and shell

I am writing a shell script that verifies if a device is created on wrong mounts 1> sp_helpdevice 2> go | awk '{print $2}' | grep database | grep -v `df -k | grep /dev/dsk | awk '{print $6}'` So if things are ok, the output should return nothing If the result gives 1 or more entry, then... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

9. Solaris

Connect From VB to Sybase 11

Dear All I have a problem that I can't connect from VB to Sybase 11. Could you help me? (2 Replies)
Discussion started by: Than Chanroeun
2 Replies
Login or Register to Ask a Question