Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple questions for the gurus -- need your help 3

Status
Not open for further replies.

Sina

Technical User
Jan 2, 2001
309
CA
Can any one help with the following?

1. How can I get the list of all databases in sybase ver 12?
2. How to get a list of tabels from a database?
3. How to list all the table defenitions from a table?
4. How to List all views from a database?
5. How to list all the trigers from a table?
6. How to list all the stroed procs from a tables/database.
7. How to list all users in database?
8. How to get the rights of a user/security infomation / database owner?

Thank you all very much
 
1. How can I get the list of all databases in sybase ver 12?
sp_helpdb
2. How to get a list of tabels from a database?
select name from sysobjects where type = 'U' order by name
3. How to list all the table defenitions from a table?
sp_help <table_name>
4. How to List all views from a database?
select name from sysobjects where type = 'V' order by name
5. How to list all the trigers from a table?
select name from sysobjects where type = 'TR' order by name
6. How to list all the stroed procs from a database.
select name from sysobjects where type = 'P' order by name
7. How to list all users in database?
select name from sysusers
8. How to get the rights of a user/security infomation / database owner?

sp_changedbowner <user_name>

rgds,
 
Sina,

If you prefer a graphical user interface, this type of information and functions are available through Sybase Central (along with a lot of other very useful info that's harder to assemble from the stored procs). Sybase Central is part of the client install and should be available for your NT PC (which I assume you have from another post) regardless of what platform your server is.

See the install guide for your platform; instructions for adding it should be there. (It's kind of a stealth product; Sybase doesn't do enough to make folks aware of it.)

HTH,

John J M Craig
Alpha-G Consulting, LLC
nsjmcraig@netscape.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top