Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shrink logs
Message
 
 
À
10/07/2009 15:27:24
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01411487
Message ID:
01411520
Vues:
54
The USE command has effect only for duration of EXECUTE command.

>I did not know that. I can do that now, but I also need to take care of the DBs already there. Any suggestions?
>
>>AFAIK, any new DB created uses the system model DB as template. Did you try to set the SIMPLE recovery mode for it?
>>
>>>There is probably a much better way to do this, but this is not working anyway.
>>>
>>>ShairPoint (MOSS) creates its own DBs. Evidently it can not be told to create them in SIMPLE recovery mode, and in this case, 100s of DBs have been created. I am trying to change the recovery mode to SIMPLE and shrink the log file for every DB (not system DBs) in a script. In the script (below) I try to change the DB focus using the USE command, but evidently it is not working as I thought, because I get errors that say the log file can not be found in the master.
>>>
>>>"Could not locate file 'ReportServer_log' for database 'master' in sys.database_files."
>>>
>><snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform