Shrink the Symantec Endpoint Protection Manager 12.1 embedded database
We have created a tool based on customer demand to shrink the Symantec Endpoint Protection Manager 12.1 embedded database. Here are the steps to use this tool:
1. Backup your database.
Before running this tool, please backup the DB manually by stopping the Symantec Endpoint Protection Manager service and copying the sem5.db and sem5.log from "..\Symantec\Symantec Endpoint Protection Manager\db\" to another folder. You can copy them back and start the SEPM service and embedded database service to restore the previous SEPM status.
2. Copy this tool into the "Tools" folder of the SEP Manager.
Copy the file ShrinkEmbeddedDB.bat and ShrinkEmbeddedDB.jar to folder "..\Symantec\Symantec Endpoint Protection Manager\Tools\".
3. Double click file ShrinkEmbeddedDB.bat or run it from a command window.
4. Follow the prompt of the tool to delete the sem5.db.bak and sem5.log.bak after shrinking the database successfully.
** Updated to work with SEPM 12.1.2 (RU2) **
Legal: Symantec shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with your use of or reliance of this tool.
Comments 48 Comments • Jump to latest comment
Thanks for sharing the tool, but having one doubt that shrinking of db will create any performance issues?
Thanks & Regards,
Srikanth.S
"Defeat the Defeat before the Defeat Defeats you"
(Swami Vivekananda)
No. Shrinking the database will not create performance issues. In fact in many cases it will make the database run faster. What happens is that over time data is added to the database and then removed from the database causing the database file to bloat. This bloat can cause performance issues. This tool will rebuild the database file, reducing the bloat and causing the data to be contiguous.
I downloaded the zip file to fun the program, but when I try to extract it is asking for a password to extract the files?
Ok. I reposted it. This time without the password.
Ok..Thanks for the reply.
Thanks & Regards,
Srikanth.S
"Defeat the Defeat before the Defeat Defeats you"
(Swami Vivekananda)
Awesome Tool for SEP 12.1
Thank you,
Dorothy
Thank you for the tool. Any way to specify another temp folder for the temporary files created by shrink? We have the HD absolutelly full by the DB, and the only way to have free space is using external disk.
Thank you
This question needs to be answered!
Unfortunately there is no way to change the temp folder for this tool. You need to make sure that you have enough disk space before running this tool.
this is awesome.
thank you
Shrinking stopped in the end with the message:
error at line 1 cannot open transaction log file -- sem5.log
Any info what could be the problem?
What version of the Symantec Endpoint Protection Manager are you using and what operating system do you have the SEP Manager installed on?
Try stopping the SEP Manager and copying the sem5.db and sem5.log files to a separate folder first before running the tool.
OS: Win2008R2 SP1
Manager: 12.1.1000.157 (RU1)
Manager was stopped and database service also.
Without stopping DB service i could not copy log file to separate folder.
I can't get this tool to work.
I did as the article suggested, made backup of log and db, but when i run the tool i get "failed to unload DB" error.
Shows the unloading DB gets to 55% and then dies.
Try stopping the SEP Manager and copying the sem5.db and sem5.log files to a separate folder first before running the tool.
I'm getting the same error. I stopped the SEPM service and the embedded database service. Created a subfolder (C:\Program Files\Symantec\Symantec Endpoint Protection Manager\db\Backup DB) and then copied sem5.db and sem5.log to that folder. When I run the tool it stops with the error "Failed to unload DB". SEPM service and the embedded database service are stopped after the error.
i did.
And copied the files to a different folder.. Not sure why copying the sem5.db and sem5.log files makes any difference.. the tool doesn't ask which files to load.
Unless you mean move the files.
Will it work in Symantec endpoint protection small business edition 12 (where SPC is the management console)?
Does it decrease the size of the database?
It will work on SEP 12.1 Small Business Edition (SBE). It will not work on SEP 12.0 SBE.
It can reduce the size of the database file in cases where the database file has gotten bloated. However it will not reduce the amount of data that is in the database itself.
Thank you for your answer.
One last question, will the memory usage of the DBSRV9 reduce as well?
No. This is not intended to reduce the memory usage of the Embedded database. The memory usage of the Embedded database is configured based on how many users you selected when you installed the product. Note: if using the SBE version it will be set to 256MBs.
Thanks Elisha for providing this tool. It's great help to the support team.
Chetan Savade
Technical Support Engineer, Endpoint Security
Enterprise Technical Support
CCNA | CCNP | MCSE | SCTS |
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.&
Dear All ,
Our SEPM 12.1 was working perfectly , from yesterday started the problem, Symantec Embedded Database services not starting ( no any error message) . I have downloaded the tool and run with the instruction , but I am getting error “ fail to unload DB”
Anyone can help us from this situation , it should be a great appreciate
Regards
Tom
hi,
Sure we will help you with that, But do you mind creating a new thread for this.
Thanks In Advance
Ashish Sharma
SEPM Knowledgebase Documents
Dear Ashish,
Thanks for your quick response, request you to kindly go ahead to the new thread
Best Regards
We also have this issue..
I have now run the shrink.dbf ansd its errored out onec with "lack of space"!!!!!
We have now deleted the two backups stored localy and re-run..
It is now stuck at 10% progress and the disk space is running out again!!!!!
Symantec, you need to provide more information on what this shrink actually does before advising users to rune it!!!
I am now stuck here waiting for it to fail again when the disk space has been depleted, again..
Any assistance ASAP would be greatly appreceated..
E.g How much space do we require to run this fix in the 1st instance is a good 1st question..
Regards,
DaveW...
I have negative experience....
For shrink db with size 12 999 MB toll was demanded 38 GB free disk space.
After completion tools work db size growth to 13 011 MB.
Regards.
Victor
Hello Victor,
This tool will free up unused space from the database file. Since your database file did not have any unused space it could not make the database file any smaller.
In your case it increased the size by 12MBs which is one tenth of one percent (0.1%). This is normal, as the tool will rebuild the database file from scratch and when this happens the database will reserve room between each table in the database to allow additional data to be inserted later, this way the tables won't get as fragmented when they grow.
Thanks,
Is there a way to rebuild the sem5.db from the unloaded data stored during the shrinkembeddeddb.bat process? I have a folder full of what seem to be juicy files and information waiting to be loaded back into a database...
I'm just not readily aware of a process list to do so.
No, during the backup process, the sem5.db.bak was lost, so I do not have that.
When I attempt to recover from the symantec recovery application it errors on the connection.
I've followed the instructions above, but when I run the ShrinkEmbeddedDB tool it halts at the "detectBackupFile" step, with the following message:
Detect bak DB file ...
(It's been stopped at this step for several hours now.)
The SEP software has used 264 GB of the 280 GB available on the hard disk, which (needless to say) is absolutely ridiculous. As a result, the mail server has stopped working and the customer is not receiving work-related emails - which is obviously having a serious impact on their business.
Is there a way to get this tool to run properly, or should we just uninstall the product and get the customer to use a less-bloated software security product? (such as Avira)
Hello Kaz,
The SEPM database should not be using that much disk space. It could be quite fragmented If the customer is using SEP 12.1 then you could follow these steps (note some customer data will get lost here):
1. Export each of the policies out of SEPM.
2. Uninstall SEPM and delete the database file. Make sure to to keep the Recovery File, this is needed to restore client communicating.
3. Install SEPM using the Recovery File.
4. Import the policies back into SEPM
If you are still having issue feel free to contact me offline by sending me a message via SymConnect. I can help you with this.
Thanks,
Elisha
I tried shrinking the dataqbase, receive the following error:
"C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\Tools>Shr
kEmbeddedDB.bat
java.io.IOException: Couldn't get lock for C:\Program Files (x86)\Symantec\Sym
tec Endpoint Protection Manager\Tools\..\tomcat\logs\scm-server-%g.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:372)
at java.util.logging.FileHandler.<init>(FileHandler.java:306)
at com.sygate.scm.server.util.ServerLogger.<clinit>(ServerLogger.java:
9)
at com.sygate.scm.tools.db.ShrinkEmbededDB.initLogger(ShrinkEmbededDB.
va:75)
at com.sygate.scm.tools.db.ShrinkEmbededDB.main(ShrinkEmbededDB.java:9
Exception in thread "main" com.sygate.scm.server.util.ScmServerError: java.io.
Exception: Couldn't get lock for C:\Program Files (x86)\Symantec\Symantec Endp
nt Protection Manager\Tools\..\tomcat\logs\scm-server-%g.log
at com.sygate.scm.server.util.ServerLogger.<clinit>(ServerLogger.java:
4)
at com.sygate.scm.tools.db.ShrinkEmbededDB.initLogger(ShrinkEmbededDB.
va:75)
at com.sygate.scm.tools.db.ShrinkEmbededDB.main(ShrinkEmbededDB.java:9
Caused by: java.io.IOException: Couldn't get lock for C:\Program Files (x86)\S
antec\Symantec Endpoint Protection Manager\Tools\..\tomcat\logs\scm-server-%g.
g
at java.util.logging.FileHandler.openFiles(FileHandler.java:372)
at java.util.logging.FileHandler.<init>(FileHandler.java:306)
at com.sygate.scm.server.util.ServerLogger.<clinit>(ServerLogger.java:
9)
... 2 more
"
I tried copying the sem5.db and .log for to a different directory (not sure what copying the file accomplishes in the first place, but hey).. made no difference.
Any help is appreciated
I've had success using this tool in the past but doesn't seem to work with SEP 12.1 RU2. Any chance of this being updated?
Dec 31, 2012 3:34:04 PM com.sygate.scm.tools.db.ShrinkEmbededDB initLogger INFO: logger initialized ...
Dec 31, 2012 3:34:04 PM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB INFO: shrinkDB: Start to shrink DB.
Dec 31, 2012 3:34:04 PM com.sygate.scm.tools.db.ShrinkEmbededDB getDBProperties INFO: getDBProperties: The JDBC driver class is: sybase.jdbc4.sqlanywhere.IDriver
Dec 31, 2012 3:34:04 PM com.sygate.scm.tools.db.ShrinkEmbededDB getDBProperties INFO: getDBProperties: The JDBC url is: jdbc:sqlanywhere:CommLinks=tcpip(dobroadcast=none;host=localhost;port=2638;verify=no);ServerName=localhost
Dec 31, 2012 3:34:04 PM com.sygate.scm.tools.db.ShrinkEmbededDB checkDBType INFO: checkDBType: The DB is not embeded DB
Dec 31, 2012 3:34:04 PM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB INFO: shrinkDB: The current DB is not Embeded DB! Cannot shrink this DB!
this is fixed in latest version, why do you want to run on SEP 12.1 RU 2?
Cheers!
Pete
Help Link: http://www.symantec.com/business/support/overview.jsp?pid=54619
Because once you've done numerous SEPM upgrades and removed the many (no longer needed) older installation packages, the DB file itself doesn't automatically shrink (unless there's another automated process somewhere, didn't see anything in the SEPM console)
It isn't a big deal most of the time, the re-index and truncate are working as expected, I was just trying to avoid database bloat as I have several installations I've inheritied that are installed on smaller partitions and for one reason or another (mostly politic) moving the installation to a different partition isn't feasible so I've got to keep the size down.
actually you have got the answer in your previous thread i.e. about different version.
with RU 2 you have to rely on the DB maintenance.
Cheers!
Pete
Help Link: http://www.symantec.com/business/support/overview.jsp?pid=54619
We are working on an update for this tool that works on SEP 12.1 RU2.
That's great to hear. Thanks for the update, keep up the great work!
I updated the tool to work with SEPM 12.1.2 (RU2).
Thanks Elisha for your update. It works properly on our SEPM 12.1.2 (RU2)
I've just tried running this tool on our server, and got an error when Reloading DB. The progress bar is at 80%, and a window came up titled dbisqlc, with this text:
The window has Continue, Stop, and Exit buttons. I hit continue, but it doesn't seem to be doing anything at this point, the progress bar hasn't moved since the error came up.
Edit: Okay, a few minutes after posting, the progress bar moved on and I got a notice that the shrink completed successfully. Based on that error message, should I restore the old db files at this point to avoid db issues related to this error, or is the shrunken db ok to use?
I've experienced the same thing but not at every site so not sure if it's DBUnload or a problem with the DB.
If you edit the reload.sql file after DBUnload has finished dumping, you can see that the section to create the mt table is commented out..
but further down it tries to load into the table..
Despite having that problem, I've kept a backup and left the shrunk DB in place. If I experience any strangeness, will let you know.
Hello pkecun, would you be able to send me a copy of your database that has this issue? Our development team would like to look at it to see what the issue is.
I too am having this issue although every time I would hit exit. I ended opening a case to try and solve it. The case number was 04182597, but is now closed and it was unresolved. Would you like me to also send you a copy of my database? I also have a screenshoot of the commandline as well. Thanks for your help.
I've also seen this this morning.
The tool is looking for a table called "mt". However this table is not needed and the tool will to run fine once you click "Continue" on this error. You can safely ignore the "Table 'mt' not found" error message.
Dear All,
please suggest what information contain sem5.log file.
in my condition its size is 159 GB. kindly suggest what i should do.
----subhash
Regards
Subhash
It looks like the transaction log has not been truncated. I recommend logging on to the management server console, going to the Admin --> Servers tab and clicking on the database node from the Servers tree. From there you can run the "Truncate Transaction Log Now" task. This should shrink that file.
Once you have done that I recommend that you click "Edit the Database Properties" and enable the two Database Maintenance Tasks and chose a schedule for them run on a regular basis. The recommended setting is to truncate the transaction log daily and rebuild the indexes once a week.
Would you like to reply?
Login or Register to post your comment.