Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
majidbhutta
Starting Member
13 Posts |
Posted - 2006-09-15 : 23:55:14
|
Well Dears!I have a database script that i run from C# code , i Connect to sqlexpress via windows authentication or sa login, Script does the following things1) Create a Database SECUREDB (Tables, Procedures etc).2). create a new LOGIN3) change database owner (sp_changedbowner) of SECUREDB to the new LOGIN4.---------------?At the end i want to to revoke all rights of all logins including Windows Authentication from SECUREDB EXCEPT the one new LOGIN so that only new LOGIN should be able to connect to SECUREDB.i need help in this regard how to do that. Any Script example or article would be highly appreciated.I am using SQLEXPRESS.THNX IN ADVANCE |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-09-16 : 00:01:13
|
Any login in the sysadmin fixed server role, for example SA, will still be able to connect to the database.There is no way to prevent it if a login is sysadmin.CODO ERGO SUM |
|
|
|
|
|