Re: sp_detach_db when not using a system administrator role



Hi,

RUN AS is not supported in SQL Server 2000. The only way is to execute the
command from a user
with SysAdmin server side role.

THanks
Hari
SQL Server MVP


"Dave" <Dave@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:24635CF2-4059-4019-8FBB-F2326877D616@xxxxxxxxxxxxxxxx
Arnie,

Thanks for the reply.

I am using SQL 2000 in a legacy product. Does the RUN AS command work for
SQL 2000?

--
Regards,
Dave


"Arnie Rowland" wrote:

If you are using SQL 2005, you can create a procedure and give RUN AS
permissions.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"Dave" <Dave@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:856A3066-B973-4710-94E7-3AE47C11D278@xxxxxxxxxxxxxxxx
I am working on a system where I create an archive file using a modified
sp_create_removable that allows non sysadmin to run it.

The file can be created fine as db_owner but when I attempt to detach
using
sp_detach_db I cannot because I have to be a system administrator to
use
that
procedure which calls sp_updatestats and DBCC DETACHDB.

Anybody ever get around this before?
--
Regards,
Dave





.



Relevant Pages