Groups | Blog | Home
all groups > sql server (alternate) > december 2004 >

sql server (alternate) : Truncate Database Statement help


Little PussyCat
12/21/2004 11:57:46 AM

Hello,

I hope you can help me.
We have a SQL Server 2000 database at work, (which works with a VB6
frontend) which grew to a considerable size, so one of my past colleagues
sent me this truncate statement to use on the database.
I ran it like this, and all appeared to be well, it shrank the database,
Shortly afterwards, after I ran this I noticed something not quite right.
for example, one of the tables we keep is a User_Admin table which has 50
records in there, when I accessed this using the frontend it only showed 1
record, and this happened with every table in the database accessed by the
frontend.

The data in the tables is still there, but only shows one record through the
frontend.
Can anyone help me, and check this statement I ran, as its weird that all
this happened after I ran this statement.

Thanks,

Jayne Heger

sp_dboption PBTDEV,'trunc. log on chkpt.', true
checkpoint
--sp_dboption sadev,'trunc. log on chkpt.', false
sp_dboption PBTDEV,'autoshrink', true
--sp_dboption sadev,'autoshrink', false

John Bell
12/21/2004 12:28:46 PM
Hi

It is unlikely that your error is caused by this, although you may want to
run DBCC CHECKDB on the database. If you know the statement that you are
running (or use profiler to get it) you may find that you have deleted some
data that it is dependent on to get the expected results.

John

[quoted text, click to view]

jinjja NO[at]SPAM aol.com
12/27/2004 3:58:30 AM
I agree, the error is probably coming from the application or the sp which the
application runs.


[quoted text, click to view]

AddThis Social Bookmark Button