Re: EXEC Command problem
From: Andrea Montanari (andrea.sqlDMO_at_virgilio.it)
Date: 12/29/04
- Next message: Mike Bacher: "MSDE 2000 Installation Fails"
- Previous message: Andrea Montanari: "Re: TCP/IP Problem"
- In reply to: BobCo: "EXEC Command problem"
- Next in thread: Girish Sundaram: "RE: EXEC Command problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Dec 2004 16:22:53 +0100
hi,
"BobCo" <BobCo@discussions.microsoft.com> ha scritto nel messaggio
news:3B1E774A-0376-4CE3-B7D3-6BF054155724@microsoft.com
> Tried to do a search on EXEC and got a lot of hits, but none that I
> saw addressed my problem.
>
> I'm trying to move a DB, but when I type,
> EXEC sp_detach_db 'database'
> I get the unrecognized command error.
> I did a search for EXEC, but couldn't find it.
>
> Any suggestions/assistance?
>
> Thanks.
EXEC is just execute the stored procedure (the system stored procedure, in
this case), and is required when the call to stored procedure is not the
very first line of the current Transact-SQL batch
so the problem is not EXEC ...
actually you usually should get
Server: Msg 229, Level 14, State 5, Procedure sp_detach_db, Line 50
EXECUTE permission denied on object 'sp_detach_db', database 'master', owner
'dbo'.
if your current user has not been granted membership to sysadmins server
fixed role, as only relative members are allowed to execute that system
stored procedure... further details at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_da-di_83fm.asp
-- Andrea Montanari (Microsoft MVP - SQL Server) http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1 (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual interface) --------- remove DMO to reply
- Next message: Mike Bacher: "MSDE 2000 Installation Fails"
- Previous message: Andrea Montanari: "Re: TCP/IP Problem"
- In reply to: BobCo: "EXEC Command problem"
- Next in thread: Girish Sundaram: "RE: EXEC Command problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|