Discussion Locked

SQL 6.5 Problem

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Big problem with SQL 6.5 SP 3 on NT 4.0 SP 6a.
DATA Directory is 26 Gigs & LOGS Directory is 34.7 Gigs, How do I reclaim the LOG Space?
(Please give answers in detail (I'm a novice to SQL SERVER)or E-Mail Me with your response)

11 replies

by jmiller1

Unfortunately, there is no easy way to do this in SQL 6.5. The only way to accomplish this is to export your data (using BCP), drop and recreate the db with the appropriate sizes, and reload the data. In SQL 7.0 there are functions to resize a particular device, but not in 6.5.

jm

by spydergst1

The question itself is NOT clear. We can put the database files in the directory and the whole directory doesn't mean it is pertaining to one database.There might be some unwanted files sitting in that directory?. Ask them to check the data and log sizes of that database.

Check whether it is SQL 6.5 question or not. Because the sp3 ( 6.50.258) on 6.5 is one of the oldest, it is not even Y2K complaint.

If it is SQL 6.5, in database EDIT option, there is a shrink button

If it is SQL 7.0, the database properties has shrink option to shrink the database.

But be careful, before doing anything backup master and as well as the databases which you are going to shrink.

by spydergst1

The first answer is correct. You can also create another database on the same server and move all the objects from the old DB to the new DB. Because you are new to SQL I feel the need to mention if you delete the log you lose the database. The only way to reclaim the log space is via answer 1 or moving all objects to a new database.

by singhjunk

I guess the above answer looks right to me. Altough you can shrink databases in sql 6.5 but there is hardly anything with the database device you can do.

by gutridgesj

make sure you have a backup of your db before trying stuff.

all from the ent mgr, you could shrink the db, you could truncate log file.

using qyery analyzer, i have done this before

1. Within Query Analyzer:
? Choose the master db
? sp_detach_db ?xxx?, ?true?
? run the query

2. Within Windows Explorer
? Move the db files to the proper dir and rename to whatever want (in this case PDDB)

3. Within Query Analyzer
? Choose the master db
? sp_attach_db @dbname=N?xx?, @filename1=N?c:\mssql\data\xxx? (note: if you had a log file would add ??.., @filename2=N?c:\?\log??
? run the query

This discussion is closed to new replies.