Sei sulla pagina 1di 1

Open the SQL Query Analyzer and execute the following command:

First:
1. DBCC SHRINKFILE (PDB_log,TRUNCATEONLY)
2. Second:
DBCC SHRINKFILE (LOG_Log,TRUNCATEONLY)
3. Third:
DBCC SHRINKFILE (SS_Log,TRUNCATEONLY)
4. Open the SQL Query Analyzer and execute the following command:
sp_helpdb
Now you can see all available databases. We need the LOG, PDB and SS dababases.
5. The next step is now to get the FileIDs:
Execute the following command in the SQL Query Analyzer:
sp_helpdb 'PDB_LOG' (in our testlab it´s called mc_pdb)
Now you can see the output like in the attached screenshot 1.
What is relevant for us is the FileID of the mc_pdb_LOG (name in our testlab fo
r the pdb logfile)
6. Repeat step one and two with the LOG and SS database also to get the Fi
leID of the logs of them.
7. Now we start to shrink these files
Please perform the following in the query analyzer.
1. Select the PDB Database on top of the SQL Query Analyzer
2. Execute the Query: DBCC SHRINKFILE (<FileID of PDB_LOG,<Filesize i
n MB>)
3. Select the SS Database on top of the SQL Query Analyzer
4. Execute the Query: DBCC SHRINKFILE (<FileID of SS_LOG,<Filesize in
MB>)
As example this could be: DBCC SHRINKFILE (2,2000)
Now the PDB_LOG should be shrinked to 2GB
8. Start the backup jobs manually
Open the SQL Enterprise Manager --> Management --> SQL Server Agent --> Jobs.
Look in the tab "Last Run Status" which jobs are failed. To start the job manual
ly again, right click on the first failed one and select "Start".
You have to run the failed jobs one by one.
The UpdateI2Table_PDB you can disable because there is no need for them

Potrebbero piacerti anche