Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Attach/Detach
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
00850954
Message ID:
00851073
Vues:
16
When I tried to duplicate this in Enterprise Manager, it worked. Are you trying to attach it as SA, or a different user?

Ultimately though you don't really want to do this. Detaching and re-attaching a DB will remove all of the security settings for a database. It would be better to backup and truncate the log, or use the "Shrink Database" option (which can be performed on either the MDF or LDF files separately).

One trick I have found is to change the logging option to "Simple", shrink the log file, then reset to "Full" logging. This can be done programmatically, and you could set up a SQL Agent task to do it.
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform