Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2008-09-17 : 07:03:37
|
| hi friends,Command for identify objects name used inside the sp?Txs in Advance |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-17 : 07:10:18
|
| objects name? didnt get that. can you elaborate please? |
 |
|
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2008-09-17 : 07:15:19
|
inside the stored procedure some tables,views, were defined.I need to know what all the object names used inside the stored procedurequote: Originally posted by visakh16 objects name? didnt get that. can you elaborate please?
|
 |
|
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2008-09-17 : 07:32:27
|
quote: Originally posted by sent_sara inside the stored procedure some tables,views, were defined.I need to know what all the object names used inside the stored procedurequote: Originally posted by visakh16 objects name? didnt get that. can you elaborate please?
|
 |
|
|
ranganath
Posting Yak Master
209 Posts |
Posted - 2008-09-17 : 08:28:25
|
| hiTry with thisSELECT Distinct SODP.[Name] AS 'TableName', a.[Name] AS 'Viewname', Sc.name as 'Colname', t.name as 'Datatype', sc.length FROM SysObjects SOLEFT JOIN SysDepends SD ON SO.[Id] = SD.[Id]LEFT JOIN SysObjects SODP ON SODP.[Id] = SD.DepIdLeft join syscolumns sc on sc.id = SODP.[Id]Left Join (Select Id, name From sysobjects where Type = 'V')A on A.Id = So.IdLeft JOIN master..systypes t ON sc.xtype = t.xtypeWHERE SO.Xtype = 'P' AND SO.[Name] NOT LIKE 'dt_%' AND so.id = object_id('USP_AccessManagement_CheckTree')-- spnameORDER BY 1, 2 |
 |
|
|
|
|
|