Contents
Connect to Database
Windows Authentication
SQL Server Authentication
Add New Database User: SQL Server Authentication
Add New Login
* Login as a privileged user, e.g. sa
* Right click Database Connection > Security folder (Note: not the Security folder under individual database)
* Select New > Login…
* On Login – New screen, enter:
– Login name: test_user
– Select SQL Server authentication
– Password:
– Confirm password:
– Default database: test_db
* Click OK.
Turn on SQL Server Authentication Mode
* Right Database Connection and select Properties
* On Server Properties screen, select Security:
* Select SQL Server and Windows Authentication mode
* Click OK.
Add Login as Database User
* Right click Database Name > Security folder (Note: not the Security folder under database server)
* Select New > User…
* On Database User – New screen, enter:
– User name: test_user
– Login name: (browser for Login name and select test_user)
– Database role membership: db_datareader, db_datawriter (as needed)
* Click OK.
Add Permission on Database Objects to User
* Open Database Name > Security folder (Note: not the Security folder under database server)
* Right click the user name and select Properties…
* Select Securables
* Search and browse for Database objects to grant permissions, e.g. Stored Procedures
* Select database object, e.g. sp_ActiveDirectory_obj and check the Execute Grant permission
* Click OK.
Login Database as New User
* Right click Database Connection and select Connect…
* Select Authentication: SQL Server Authentication
* Enter:
– Login: test_user
– Password:
* Click Connect.
Create New SQL Server Compact Database
* Start SQL Server Management Studio
* On Connect to Server screen, select
– Server type: SQL Server Compact
– Database file:
* On Create New SQL Server Compact Database screen,
– Enter database file name: D:\Users\Jianming.Li\Documents\SqlSvrCompact
– New password: Welcome1
* Back on Connect to Server screen, click Connect:
* Connected to new db: