Wednesday, June 29, 2011

Hide Database details from the SQL Server Management Studio

Hide Database details from the SQL Server Management Studio

Hiding User Database in Object Explorer in SQL Server Management Studio

1.Create a user account (testuser)(make sure its not mapped to any Database)
2.Right Click on the upper section of the SQL (SQLSERVER Name)>Properties>Permissions>Click on the user account, and select Deny to view databases.
3.Right Click on the newly created DB, Properties,Files, and change the Owner to the newly created account.

Run the below query

USE TestDB

ALTER AUTHORIZATION ON DATABASE::TestDB to testuser


USE MASTER

DENY VIEW ANY DATABASE TO TestDB

Hiding System Objects in Object Explorer in SQL Server Management Studio

1.In SQL Server Management Studio, under Tools menu, click Options
2. In the Options dialog box, expand Environment and then select the General tab Select Hide system objects in Object Explorer and then click OK
3. In the Microsoft SQL Server Management Studio dialog box, click OK to acknowledge that the changes will come into effect once you restart SQL Server Management Studio
4.Close SQL Server Management Studio and reopen it again you will not see the System Objects in Object Explorer in SQL Server Management Studio

No comments:

Post a Comment