Friday, February 24, 2012

DBCC Commands

Hi

Can we use

DBCC CHECKIDENT ('dbo.MyTable', RESEED, 0)

Command in Stored procedure. Which executes daily.

Thanks

Sridhar K

yes u can very well do. You can create a sp and then schedule the sp though Job. else u can include the script directly in Job

what is the probelm u faced when u tried?

Madhu

|||

Thanks Madhu

I'm not having any problem. But I would like to know and as per my knowledge am not sure that these statements can execute daily on DB. Somebody said we have to use it periodically in maintenance.

Thanks

Sridhar K

|||

Yes there are dbcc commands which used for database maintenance. Those are generally used periodically like DBCC DBREINDEX/IndexDefrag/Checkalloc/CheckDB etc etc...

Madhu

No comments:

Post a Comment