filmov
tv
SQL Server DBA Tutorial 52 - How to Change the Ownership of a Database in SQL Server
Показать описание
*****************************************************************************************
* How to Change the Ownership of a Database in SQL Server *
*****************************************************************************************
--- get ownership of databases---
SELECT name,
suser_sname( owner_sid ) AS DBOwnerName
Learning:
1. How to change database owner using Store Procedure.
2. How to change database owner using Alter Statement.
/******script start********/
Use SalesOrders
--EXEC sp_changedbowner 'New Owner Login'
EXEC sp_changedbowner 'sa'
--Changing Database owner using Alter Authorization
ALTER AUTHORIZATION ON Database:: SalesOrders TO [CHIRAG-LAPPY\repl_distribution]
/******script ends********/
Note : Flow the Process shown in video.
😉Subscribe and like for more videos:
💛Don't forget to, 💘Follow, 💝Like, 💖Share 💙&, Comment
Tutorial Link :
Thanks & Regards,
Chitt Ranjan Mahto "Chirag"
_________________________________________________________________________________________
Note: All scripts used in this demo will be available in our website.
Link will be available in description.
#ChiragsTutorial
#DBATutorial
#DBATutorialLearning
#DBAEducation
#DBATutorialFree
#DatabaseTutorial
#SQLServerDatabaseTutorial
#SQLServerDBATutorial
#MicrosoftSQLServerDatabaseTutorial
#ChiragsDBATutorial
#ChiragsDatabaseTutorial
#ChiragsSQLServerDatabaseTutorial
#ChiragsSQLServerDBATutorial
#ChiragsMicrosoftSQLServerDatabaseTutorial
#CreateDatabaseinSQLServer
#CreateDatabasewithT-SQL
#SQLServerVulnerabilityAssessment
#OwnershipOfDatabaseInSQLServer
* How to Change the Ownership of a Database in SQL Server *
*****************************************************************************************
--- get ownership of databases---
SELECT name,
suser_sname( owner_sid ) AS DBOwnerName
Learning:
1. How to change database owner using Store Procedure.
2. How to change database owner using Alter Statement.
/******script start********/
Use SalesOrders
--EXEC sp_changedbowner 'New Owner Login'
EXEC sp_changedbowner 'sa'
--Changing Database owner using Alter Authorization
ALTER AUTHORIZATION ON Database:: SalesOrders TO [CHIRAG-LAPPY\repl_distribution]
/******script ends********/
Note : Flow the Process shown in video.
😉Subscribe and like for more videos:
💛Don't forget to, 💘Follow, 💝Like, 💖Share 💙&, Comment
Tutorial Link :
Thanks & Regards,
Chitt Ranjan Mahto "Chirag"
_________________________________________________________________________________________
Note: All scripts used in this demo will be available in our website.
Link will be available in description.
#ChiragsTutorial
#DBATutorial
#DBATutorialLearning
#DBAEducation
#DBATutorialFree
#DatabaseTutorial
#SQLServerDatabaseTutorial
#SQLServerDBATutorial
#MicrosoftSQLServerDatabaseTutorial
#ChiragsDBATutorial
#ChiragsDatabaseTutorial
#ChiragsSQLServerDatabaseTutorial
#ChiragsSQLServerDBATutorial
#ChiragsMicrosoftSQLServerDatabaseTutorial
#CreateDatabaseinSQLServer
#CreateDatabasewithT-SQL
#SQLServerVulnerabilityAssessment
#OwnershipOfDatabaseInSQLServer