Posted - 09/15/2006 : 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 things
1) Create a Database SECUREDB (Tables, Procedures etc).
2). create a new LOGIN
3) change database owner (sp_changedbowner) of SECUREDB to the new LOGIN
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