learner
11th November 2003, 13:42
Hello,

We are running BaaN IV c4 with sp10 on Win NT 4.0 and Ms-Sql Server 7 as database.

Currently the system has only 1 GB of free space.

Database total initial allocated is 70 GB and filled up size is 65 gb
now we plan to delete some tables in a co. 230 , since that co. is no longer required or to be more precise that data in those tables are no longer required.

So approximately 6 GB would be restored by deleting this data at database level.

but my problem is that free space will be created at database level rather than at Operating System Level.

How can i create free space at Operating System level. I tried reducing the initial size of the database through SQL Server enterprise Manager, but all in vain i was not able to reduce the initial database size.

How can i achieve it. How can i delete the data in sql server and retrieve space at O/S level ???

Regards

Learner

OmeLuuk
17th December 2003, 10:28
Buy new disks. The cost will be lower than when you try to accomplish what you want (cost of time and effort). For some 2 hours of work you can buy 120Gb disks ...

EdHubbard
18th December 2003, 00:15
In SQL Enterprise manager you need to run some database maintenance. I have SQL 2000 so it is slightly different but what I would do in SQL 2000 is:

1. Backup db
2. Under Management in SQL Ent. Mgr create a database maintenance plan for your baandb. On the optimizations tab select "remove unused space from database files". While you're at it "reorganize data & index pages".
3. Add a job that will run this plan - but make sure no users are on the system and especially make sure the backup is not running.
4. As a guess, I think this process will take 12 to 24 hours to complete on your system but this really depends on processors etc.

OmeLuuk is correct that buying more disk would be quicker in the short run but doing the above will improve performance I think.