Contents
How do I see the content of a stored procedure available in some other Databases?
In Object Explorer, connect to an instance of Database Engine and then expand that instance. Expand Databases, expand the database in which the procedure belongs, and then expand Programmability. Expand Stored Procedures, right-click the procedure and then click View Dependencies.
How do I find a list of stored procedures in SQL Server?
Get list of Stored Procedure and Tables from Sql Server database
- For Tables: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES.
- For Stored Procedure: Select [NAME] from sysobjects where type = ‘P’ and category = 0.
- For Views: Select [NAME] from sysobjects where type = ‘V’ and category = 0.
How are system stored procedures used in SQL?
Let us see some of the Useful System Stored Procedures in SQL. These procedures will help you to extract the definition and dependencies of the existing stored procedures. The following three Sql Server System stored procedures are useful to deal with user-defined procedures:
Is it possible that stored procedures exist but I can’t?
Once that’s done, you cannot script out the proc, or access it’s definition in any way through SQL Server. The only way to have access to the source is to retain the original script. As Ashwani indicated, the “disappearing procs” is likely a permissions issue.
What to do if SQL Server can’t see procedure?
Make sure you are in the right database / right instance – seems simple and silly but it happens all the time. This also includes not using things like AttachDbFileName in your connection string – this means that two different programs will actually have two separate copies of your database, so if one adds a procedure, the other will never see it.
Do you have to restart the database after adding a stored procedure?
You should not have to restart the database after adding a new stored procedure, although you will need to refresh your object explorer to see it there. The next time you add a stored procedure try running the right click execute option from the object explorer and enter your parameters and see if it runs.