Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to shrink SQL Database thru VFP
Message
From
07/12/2004 08:25:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00967047
Message ID:
00967439
Views:
7
>How to shrink SQL database thru VFP ?

The trick I found somewhere involves three steps:

- detach database
sp_detach_db <your db name here>
- delete its logfile
- attach it as a single file:
sp_attach_single_file_db @dbname = '<your db name here>', 
   @physname = '<fullpath to>.mdf'
SQL will complain it's missing a logfile and will create a new one.

I've seen ten gig logfiles shrink to half a meg.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform