SELECT name, type_desc FROM sys.all_sql_modules s INNER JOIN sys.all_objects o ON s.object_id = o.object_id WHERE definition LIKE '%关键字%' ORDER BY type_desc, name; SELECT name, xtype FROM sysobjects o, syscomments s WHERE o.id = s.id AND text LIKE '%…
select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') where a.name='Storage Name or View Name ' order by a.[name] asc 如果找存储过程 sp_helptext 's…
代码:select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') order by a.[name] asc 从上面的SQL语句可以看出,主要用到了两个 sys.all_objects 和 sys.sql_modules 两个系统存…
1.检索关键字:sql server内置存储过程,sql server查看系统信息 2.查看磁盘空间:EXEC master.dbo.xp_fixeddrives , --查看各个数据库所在磁盘情况SELECT DB_NAME(df.database_id) as dbName, physical_name AS DataFile, size AS 'FileSize(MB)', volume_mount_point AS Drive, AS VARCHAR) + ' GB' AS DriveS…