Shrink Journal Database Question

We have SQLExpress and are nearing my size limit. We installed SQL Express because the we needed the extra space. When I was shrinking the database before SQLExpress, I would use the following instructions:

"You will need to do two things to shrink the database. I assume you are comfortable getting into Store Operations Administrator. If so, use the following instructions:

  1. Make a backup of the database.
  2. Enter Administrator | File | Connect.
  3. Connect to your database by selecting it and clicking OK.
  4. Go to Query | New
  5. Type: select * from journal
  6. Query | Run
  7. Write down the ID from the last journal you want to keep. This will be X.
  8. Go to Query | New
  9. Type: delete journal where ID < X
  10. Query | Run Next we need to shrink the database:
  11. Go to Query | New
  12. Type: dbcc shrinkdatabase (XXX) where XXX is the name of the database
  13. Query | Run

Would the same intructions apply for SQLExpress?

Reply to
Lance
Loading thread data ...

Lance, they should still apply. Just backup your database before you begin, yes? and then you could always go back to what it was, or?

Peter Johns> We have SQLExpress and are nearing my size limit. We installed SQL Express

Reply to
Peter Johnson w

You can also run this DELETE MyDatabaseName.dbo.Journal where time < getdate()-x Where X is numbers of days of journal you want to keep

after you delete the journal

dbcc shrinkdatabase (DatabaseName) then reindex (Store operations -->database-->reindex) I run this combination of shrink and reindex 3-4 times One time a ran some tests and each time i did it the database got a bit smaller , it stopped making a significant differance after about 5-6 run I don't know why it gets smaller on each run but it does and does not seem to affect the database

As always test all of this on your test system and backup before you run on live system

H> We have SQLExpress and are nearing my size limit. We installed SQL Express

Reply to
Robert

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.