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.
Printable View
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.
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
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
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
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.