|
Posted by Erland Sommarskog on 03/30/07 21:29
raylopez99 (raylopez99@yahoo.com) writes:
> Thank you Erland. I see the problem is not as simple as I thought. I
> also see I have two problems: one is what you addressed, the other is
> more simple: how to use VS2005 from an account other than
> "Administrator" when working on databases. So far I've not been able
> to figure out this, and only use "Adminstrator" to code.
I did not answer that question, since I was uncertain of the scope of
your question. But it's fairly simple, although there are several options.
One is to enable SQL Server Authentication through Management Studio.
(Right-click the server itself in the Object Explorer, select Properties
and go the the Security tab. You need to restart SQL Server for the
setting to take effect.) Then you can connect as sa from VS and have
sysadmin rights. The good thing with this is that when you connect
through your application with Windows authentication, you are a plain
user and can test that you have granted that user the right permissions.
The other option is to add your Windows user to the sysadmin role:
sp_addsrvrolemember 'sysadmin', 'MACHINE\User'
(If command fails, try swapping the parameters; I may not remember the
order correctly.)
You would first have to grant MACHINE\User access to the SQL Server.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|