This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Find Currently Running Query - T-SQL

SQL SERVER – Find Currently Running Query – T-SQL

January 7, 2009
Pinal Dave
SQL Performance
SQL Scripts, SQL Server Security

A short script to find a currently running query on your server using sys.dm_exec_requests, plus the KILL command to stop one that runs for too long.

Read More
SQL SERVER - 2008 - Change Color of Status Bar of SSMS Query Editor

SQL SERVER – 2008 – Change Color of Status Bar of SSMS Query Editor

January 4, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Server Management Studio, SQL Server Security, SQL Utility

Change the color of status bar in SSMS 2008 for each server, so a query meant for development never runs on production by mistake. Step by step with images.

Read More
SQL SERVER - Fix : Msg 15151, Level 16, State 1, Line 3 Cannot drop the login 'test', because it does not exist or you do not have permission

SQL SERVER – Fix : Msg 15151, Level 16, State 1, Line 3 Cannot drop the login ‘test’, because it does not exist or you do not have permission

December 28, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server Security

Msg 15151 said it cannot drop the login ‘test’, even for a sysadmin. The message was misleading: an open SSMS session for that login was blocking it.

Read More
SQL SERVER - Add Any User to SysAdmin Role - Add Users to System Roles

SQL SERVER – Add Any User to SysAdmin Role – Add Users to System Roles

December 27, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Server Security

How to add any user to the SysAdmin role in SQL Server, with a short T-SQL script using sp_addsrvrolemember, or the same steps in Management Studio.

Read More
SQL SERVER - Fix : Error : Msg 15151, Level 16, State 1, Line 2 Cannot alter the login 'sa', because it does not exist or you do not have permission

SQL SERVER – Fix : Error : Msg 15151, Level 16, State 1, Line 2 Cannot alter the login ‘sa’, because it does not exist or you do not have permission

December 26, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server Security

Msg 15151, cannot alter the login ‘sa’, comes from missing rights. Only a member of the sysadmin role can change SA, so add the user to that role first.

Read More
SQL SERVER - DISABLE and ENABLE user SA

SQL SERVER – DISABLE and ENABLE user SA

December 24, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Security

You cannot modify the permissions of the SA user, but you can disable and enable user SA with ALTER LOGIN. Log in with Windows authentication first.

Read More
Database column collation.

SQL SERVER – Change Collation of Database Column – T-SQL Script

December 20, 2008
Pinal Dave
SQL Performance
SQL Collation, SQL Scripts, SQL Server Security, SQL Utility

How to change collation of database column with ALTER TABLE ALTER COLUMN and COLLATE, then check it in sys.columns. A short test script shows each step.

Read More
Previous 1 … 41 42 43 44 45 46 47 … 56 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com