Browse by Tags

Ways to make best use of INFORMATION_SCHEMA Views - Stored procedures & Functions?
Published 15 October 7 7:59 AM | SSQA.net
How many of you took help from using INFORMATION_SCHEMA views in SQL Server? Have you ever wondered in returning the informaiton of a Stored procedure or function, you may be thinking using SP_HELPTEXT would get you. Parts of the solution is yes with...
TSQL to generate GRANT statements from a database
Published 17 August 7 5:45 AM | SSQA.net
select p . state_desc + ' ' + p . permission_name + ' OBJECT::' + s . name collate Latin1_general_CI_AS + o . name collate Latin1_general_CI_AS + ' TO ' + u . name collate Latin1_general_CI_AS + 'GO' , p .* from sys.database_permissions...
TSQL methods to display the owner of schema in a database.
Published 15 August 7 4:23 AM | SSQA.net
You can use 2 methods to get information about owner of a particular schema or set of schema(s) within the database. Using INFORMATION_SCHEMA views method (which I prefer most of the times): USE <DBName> GO SELECT * FROM INFORMATION_SCHEMA.SCHEMATA...