Can anyone advise on a way to list all stored procedures along with their schema names in a database? Thanks!
相关问题
- What is the best way to cache a table from a (SQL)
- SQL to Parse a Key-Value String
- How to evaluate an input in the WHERE clause
- employee id automatic generate with prefix
- update user details, sql server 2008 sqlsrv
相关文章
- Code for inserting data into SQL Server database u
- SQL Server 2008 Change Data Capture, who made the
- How do we alias a Sql Server instance name used in
- How to do a UNION on a single table?
- SQL Server 2008: Joining results of STORED PROCEDU
- Is SaveChanges() Necessary with Function Imports (
- Can I lazy load a navigation property by delegatin
- SQL Group by Count of Counts
Try this:
This should list all stored procedures and their schema name as a result set.
Both views -
sys.procedures
andsys.schemas
- have quite a few more attributes - check them out, if you need them, include them in your query.or
For a specific database, you can just change the context to that database first, or change Marc's query slightly (my queries are no good in this case because they rely on functions that are context-sensitive):
If you want to do this for all databases:
The collate clauses are necessary in case you have databases with different collations.
this may help You..
You can use Script Generator to get them. In the left pan right click on the database for which you want to get Stored Procedures, Tasks->Generate Scripts Click Next and choose Select Specific Database Objects and select Stored Procedures and click on next, there you can customize as you need and generate the scripts.
Try this:
Or try this and also get all parameters:
Ok...you'll have to loop through all DB catalog names with this, but...