-
DBCC command in a stored procedure
Is it possible to execute a DBCC command in a stored procedures. I have try it and i always get a syntax error near DBCC event if i used the EXECUTE command before.
Thanks.
-
DBCC command in a stored procedure (reply)
On 6/26/98 2:16:55 PM, Christian Bellavance wrote:
> Is it possible to execute a DBCC command in a stored procedures. I have
> try it and i always get a syntax error near DBCC event if i used the
> EXECUTE command before.
Thanks.
You should be able to run dbcc commands. What specific command are you trying to run
-
DBCC command in a stored procedure (reply)
On 6/26/98 2:27:56 PM, DeltonBlackwell wrote:
> On 6/26/98 2:16:55 PM, Christian Bellavance wrote:
> Is it possible to
> execute a DBCC command in a stored procedures. I have
> try it and i
> always get a syntax error near DBCC event if i used the
> EXECUTE command
> before.
Thanks.
You should be able to run dbcc commands. What
> specific command are you trying to run
I`m trying to do something like this:
if @a > @b
begin
execute DBCC DBREINDEX(`MyTable`)
end
-
DBCC command in a stored procedure (reply)
On 6/29/98 8:53:03 AM, Christian Bellavance wrote:
> On 6/26/98 2:27:56 PM, DeltonBlackwell wrote:
> On 6/26/98 2:16:55 PM,
> Christian Bellavance wrote:
> Is it possible to
> execute a DBCC
> command in a stored procedures. I have
> try it and i
> always get a
> syntax error near DBCC event if i used the
> EXECUTE command
>
> before.
Thanks.
You should be able to run dbcc commands. What
>
> specific command are you trying to run
I`m trying to do something like
> this:
if @a > @b
begin
execute DBCC DBREINDEX(`MyTable`)
end
Try removing the execute before the DBCC so it reads...
if @a > @b
begin
DBCC DBREINDEX(`MyTable`)
end
That should work.
Levi Akers
-
DBCC command in a stored procedure (reply)
On 6/30/98 7:19:22 AM, Levi Akers wrote:
> On 6/29/98 8:53:03 AM, Christian Bellavance wrote:
> On 6/26/98 2:27:56
> PM, DeltonBlackwell wrote:
> On 6/26/98 2:16:55 PM,
> Christian
> Bellavance wrote:
> Is it possible to
> execute a DBCC
> command in a
> stored procedures. I have
> try it and i
> always get a
> syntax
> error near DBCC event if i used the
> EXECUTE command
>
>
> before.
Thanks.
You should be able to run dbcc commands. What
>
>
> specific command are you trying to run
I`m trying to do something like
>
> this:
if @a > @b
begin
execute DBCC
> DBREINDEX(`MyTable`)
end
Try removing the execute before the DBCC
> so it reads...
if @a > @b
begin
DBCC
> DBREINDEX(`MyTable`)
end
That should work.
Levi Akers
It works, Thanks you very much.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|