SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 list all tables ans SP
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

magmo
Aged Yak Warrior

512 Posts

Posted - 05/25/2008 :  12:09:42  Show Profile  Reply with Quote
Hi

can I through a script retrieve a list af all tables and stored procedure in a database?

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 05/25/2008 :  14:11:50  Show Profile  Reply with Quote
select name from sys.sysobjects where xtype in ('u', 'p')

Edited by - rmiao on 05/25/2008 14:12:12
Go to Top of Page

mdubey
Posting Yak Master

USA
133 Posts

Posted - 05/26/2008 :  19:59:30  Show Profile  Reply with Quote
This is your expacted query

select * from sysobjects
where xtype = 'u'

Manoj
MCP, MCTS
Go to Top of Page

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 05/26/2008 :  20:40:07  Show Profile  Reply with Quote
That doesn't give you sps in the db.
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 05/26/2008 :  22:08:12  Show Profile  Reply with Quote
Looks like he doesn't see what other has posted.
Go to Top of Page

magmo
Aged Yak Warrior

512 Posts

Posted - 05/26/2008 :  23:46:54  Show Profile  Reply with Quote
Great, thanks for all help!
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22755 Posts

Posted - 05/27/2008 :  03:19:02  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
or

select * from sys.tables
select * from sys.procedures


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000