This article contains examples of a few common administrative tasks that you an perform on your Cloud Site running a Microsoft SQL Server database.
Below are the query commands for some common administrative tasks:
Note: When entering your query, replace the text in the example, myDbHere, with the correct name of the database that you are working on, making sure to keep the value within brackets. The examples in this article have other variables that you will need to replace with actual values. These values have been highlighted below for your convenience. Only the highlighted values in the examples need to be modified.
USE [master]
GO
ALTER DATABASE [myDbHere] SET CONTAINMENT = PARTIAL WITH NO_WAIT
GO
USE [master]
GO
ALTER DATABASE [myDbHere] SET CONTAINMENT = NONE WITH NO_WAIT
GO
USE [myDbHere]
GO
CREATE USER [sqlUserName] WITH PASSWORD=N'ComplexPassHere'
GO
USE [myDbHere]
GO
ALTER ROLE [db_owner] ADD MEMBER [sqlUserName]
GO
Note: Run this for deleting a SQL user used within containment. If you created additional logins from the control panel, please use the control panel to delete them.
USE [myDbHere]
GO
DROP USER [sqlUserName]
GO
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

0 Comments
Add new comment