SQL Server Admin Hacks
From Wiki
This will be categorized once we get 50 or so hacks/tips
Contents |
Setup
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. SQL 2000
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. SQL 2005
Fixing Cannot add, update, or delete a job that originated from an MSX Server Error after renaming a server
Security and Permissioning
Grant Execute/SELECT Permissions For All User Defined Functions To A User
Grant Execute Permissions For All Stored Procedures To A User
Find Out Server Roles For a SQL Server Login
Test SQL Server Login Permissions With SETUSER
Meta Data and Object Properties
Find Primary Keys and Columns Used in SQL Server
Get The Domain Name Of Your SQL Server Machine With T-SQL
Check If Auto Update Statistics Is Enabled By Using DATABASEPROPERTY
Three Way To List All Databases On Your Server
Generate A List Of Object Types By Using OBJECTPROPERTY
How to find all the tables and views in a database
Which Service Pack Is Installed On My SQL Server
Find All Tables Without Triggers In SQL Server
Find All Tables With Triggers In SQL Server
How To Get The Database Name For The Current User Process
How To Find Out Which Columns Have Defaults And What Those Default Values Are
How To Find Out If READ_COMMITTED_SNAPSHOT Has Been Enabled For Your Database?
Return all the columns in the database which allow NULLS
Maintenance and Automation
Compare Tables With Tablediff
Create Stored Procedures That Run At SQL Server Startup
Cycle The SQL Server Error Log
Find Recently Modified Stored Procedures
Finding Fragmentation Of An Index And Fixing It
Clear out the procedure cache
Importing and Exporting Data
Manipulating Tables, Indexes, Views, Functions and Procedures
SQL Compare Without The Price Tag
Use OBJECT_DEFINITION To Track SQL Server Stored Procedure Changes
Move A Table To A Different Schema
Backup and Recovery
Find Out The Recovery Model For Your Database
Profiling and Monitoring
Kill All Active Connections To A Database
SQL Server 2008: When Was The Server Last Started?
How to read sql server error messages
Find Out Who Is Connected To The Database
Getting The Database State For All The Databases In SQL Server
Find Out What The Active Node Of A SQL Active-Passive Failover Cluster Is


