Link to home
Start Free TrialLog in
Avatar of Amour22015
Amour22015

asked on

SQL Server 2008 - Stored Procedure break down

Hi and thanks,

I am very new to SQL Server...

I have 3 questions:

Were is sp_executesql located within the SQL Server 2008???
Like Stored Procedures are in DB > DB Name > Programmability > Stored Procedures
Just have trouble finding this System SP

It is also mentioned that (see attachments) there is a "DATABASE_TABLES"  but I can not find were it is being used within the SP's??? Maybe I just don't know were to look...


Also how do you find which tables are linked to a View???


Thanks
Proclaim-Purge-By-FileId.docx
sys-sp-updatestats.docx
Avatar of Zberteoc
Zberteoc
Flag of Canada image

all system stored procedures are located in the master database or in the msdb database if they are jobs related. Particularly they all start with sp_ prefix, which should never be used by the users.

It is not recommandable to try to modify them, actually starting 2008 you can't. You can always see the code for a procedure by running:

sp_helptext spname

but it will work only for SQL procedures and not the CLR or extended ones.
Avatar of Amour22015
Amour22015

ASKER

so there for, no one would be able to change sp_executesql to include "DATABASE_TABLES" .

With that said then how come I can not find "DATABASE_TABLES"  in the SP's attached???

No were do I see: "DATABASE_TABLES" yet someone mentioned:
DATABASE_TABLES
that will be the table that tells what dat is Ready for PURGE
if it is ready for purge the Status will be set to PURGE_ELIG

maybe I just don't know were to look??? Is there another way???

Also how do you find which tables are linked to a View???

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Zberteoc
Zberteoc
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great