Browse by Tags

SQL Server- TSQL to see which object reside under which file groups?
Published 24 December 7 4:40 AM | SSQA.net
To continue the FIND-FilegroupFull post on the filegroups, here is the most common question on the forums to get which object reside under which filegroup if there are multiple ones associated: select si.rows as 'Rows', SO.Name as Table, SI.name...
How do I find the CHECK constraints that depend on a specified CLR user-defined type?
Published 11 December 7 9:23 AM | SSQA.net
Here is the another TSQL script from BOL to find the CHECK constraints that depend on a specified CLR user-defined type? USE <database_name>; GO SELECT SCHEMA_NAME(o.schema_id) AS schema_name ,OBJECT_NAME(o.parent_object_id) AS table_name ,OBJECT_NAME...
Retrieve SessionID and batch information
Published 24 July 7 4:37 AM | SSQA.net
You may be aware using SP_WHO or SP_WHO2 statements you can get information about a session id and statement that is running since good olden days of SQL Server. Within SQL 2005 version you can take help of TSQL: SELECT session_id, text FROM sys.dm_exec_requests...
Enhancement to OBJECT_NAME metadata function and a new OBJECT_SCHEMA_NAME metadata function
Published 16 July 7 3:53 AM | SSQA.net
You may be aware OBJECT_NAME function can be use to return the database object name, I think since SQL 2000 when system functions are used the parameter of a system function is optional, the current database, host computer, server user, or database user...