Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Change all of your database owners

By @STLSQLGuy,

Scenario: DBA1 left the company and never removed him/herself as the owner of databases all over the company. You are DBA2 and just got hired to replace DBA1. They plan to disable DBA1's account tomorrow.

You can either walk through every database on every server or connect to each server, choose your desired new owner login (in this case I choose SA) and run this script to save the day.

In later version of SQL Server you can run this against several instances at one time.

enjoy.

 

E Hendrix

Total article views: 2225 | Views in the last 30 days: 2
 
Related Articles
FORUM

Rename SQL server Server

Rename SQL server Server

FORUM

Server to server backup

Server to server backup

BLOG

SQL Server 2012 ???? ??????? ????? ??

??????? ??????? ?? ??????! ?????? ????? ? ???? ???? ? ?????? ???? ??? ???? ??????? ????? ?? SQL Serv...

FORUM

SERVER NAME

SERVER NAME

FORUM

VM SERVER

VM SERVER

Tags
 
Contribute