Endpoint Protection

 View Only

Shrink the Symantec Endpoint Protection Manager 12.1 embedded database 

Mar 26, 2012 09:51 PM

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.

Statistics
0 Favorited
20 Views
1 Files
0 Shares
3 Downloads
Attachment(s)
zip file
ShrinkEmbeddedDB.zip   12 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Mar 24, 2015 04:09 AM

Hi, I have tried to run this tool for SEPM 12.1.4 and have got the next error:

C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\Tools>Shrin
kEmbeddedDB.bat
java.io.IOException: Couldn't get lock for C:\Program Files (x86)\Symantec\Syman
tec Endpoint Protection Manager\Tools\..\tomcat\logs\scm-server-%g.log
        at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
        at java.util.logging.FileHandler.<init>(FileHandler.java:323)
        at com.sygate.scm.server.util.ServerLogger.<clinit>(ServerLogger.java:12
5)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.initLogger(ShrinkEmbededDB.ja
va:75)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.main(ShrinkEmbededDB.java:93)

Exception in thread "main" com.sygate.scm.server.util.ScmServerError: java.io.IO
Exception: Couldn't get lock for C:\Program Files (x86)\Symantec\Symantec Endpoi
nt Protection Manager\Tools\..\tomcat\logs\scm-server-%g.log
        at com.sygate.scm.server.util.ServerLogger.<clinit>(ServerLogger.java:17
0)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.initLogger(ShrinkEmbededDB.ja
va:75)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.main(ShrinkEmbededDB.java:93)

Caused by: java.io.IOException: Couldn't get lock for C:\Program Files (x86)\Sym
antec\Symantec Endpoint Protection Manager\Tools\..\tomcat\logs\scm-server-%g.lo
g
        at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
        at java.util.logging.FileHandler.<init>(FileHandler.java:323)
        at com.sygate.scm.server.util.ServerLogger.<clinit>(ServerLogger.java:12
5)
        ... 2 more

Mar 20, 2015 08:35 AM

Just shrank a version 12.1.5 sem5.db and it worked as expected.

Feb 17, 2015 12:46 PM

Disable the Symantec Embedded Database service in services.msc.

Two ways for next step - "Stop database service"

Open Task Manager > Services tab > Identify and stop Symantec Embedded Database service

or

Open a command prompt, enter: ' tasklist | find /I "dbsrv" ' and then ' taskkill PID# '  (PID from tasklist output).

Watch out for Symantec Management Client restarting the DB service. If so, you stop it by running smc.exe -stop command from Symantec Endpoint Protection install directory.

 

Jan 15, 2015 08:25 AM

Does this work for the Small Business Edition?

Nov 17, 2014 08:57 AM

Just shrank a version 12.1.4a sem5.db and it worked as expected.

Came across a second sem5.db in the \Symantec Endpoint Protection Manager\ASA\win32\ folder. Wondering what this other one is good for?

Nov 10, 2014 03:01 PM

I have never seen this before.  Have you tried stopping both the SEPM and the SEPM Web Server services first?  I wonder if you have some other application on SEPM that is preventing you from stopping the SEPM database service.

Nov 08, 2014 01:40 PM

Running SEP SBE 12.1.4.

I do not see any method of manually stopping the Symantec Embedded Database.  It is started automatically, and even "run as administrator" on Services does not provide a Start/Stop option.

Only the SEPM and SEPM Web Server have the option to be stopped. 

Now what?

Oct 22, 2014 04:13 PM

The Symantec Endpoint Protection Manager has three services.  You will need to stop all three before you can copy the db files as they are locked by the Endpoint Protection Manager database service.  Once you have finished all steps you can restart the three services again.

Oct 21, 2014 07:29 PM

The original instructions are not clear...it mentions to stop the SEP Manager Service only then copy the files for backup. By doing this is does not allow you to copy the db files?

Could you please verify if there are other services that should be stopped?

When do we start up the services again...at which stage?

Thank you.

Oct 21, 2014 07:05 PM

The original instructions are not clear...it mentions to stop the SEP Manager Service only then copy the files for backup. By doing this is does not allow you to copy the db files?

Could you please verify if there are other services that should be stopped?

When do we start up the services again...at which stage?

Thank you.

Oct 06, 2014 09:51 AM

Maybe I missed it mentioned in the above thread and if so, sorry....

After stopping the SEPM and Embedded database services to copy the SEM5.* files for backup...do these services get re-enabled BEFORE kicking off the tool, or do the services stay stopped?

 

 

Aug 06, 2014 05:27 AM

RU4a seems to have a problem with it.

If I run the batch file from the tools folder and have stopped the tasks, it still gets me an "Failed to unload DB"

What can be the reason for this? There are no further infos coming up, to diagnose the problem. I am not being asked a password - is it necessary?

May 19, 2014 06:15 PM

This will work with RU4.  Verify you have enough disk space and that you have stopped all 3 of the SEPM services.  This will usually take 2x to 3x of the embedded database size.  So if for example your embedded database is 2 GBs then I recommend having at least 4 GBs free.

May 12, 2014 04:52 PM

so i attempted to run this on RU4. All went well until the end when it starts adding the Dat files to the DB.

 

I recieved an error stating that it could not find the *.MT table & bombed out...'

 

anyone know what i can do do shirink this thing?

 

I was able to restore my backup & all is working well. but our DB is a bit bigger than it should be

May 12, 2014 01:24 PM

does this work with RU4?

 

we have just updated & want to shirnk the DB

Apr 14, 2014 04:48 PM

This is the only Tools folder I can find --> c:\Program Files (x86)\Symantec\Symantec Protection Center\Tools

Apr 14, 2014 04:44 PM

yep, try that location as well.

Apr 14, 2014 04:40 PM

Should it be under c:\Program Files (x86)\Symantec?

Apr 14, 2014 04:36 PM

Are you sure you're on the SEPM then? It has to be there if this is the SEPM.

Could it have been moved to another drive?

Apr 14, 2014 04:32 PM

I do not see a Tools folder under Symantec Endpoint Protection Manager on the C drive.

 

Apr 14, 2014 04:01 PM

No, needs to be on the SEPM itself

"..\Symantec\Symantec Endpoint Protection Manager\Tools\"

Apr 14, 2014 03:56 PM

It is located here --> c:\Program Files (x86)\Symantec\Symantec Protection Center\Tools

Is that the correct spot?

Apr 14, 2014 02:11 PM

Did you follow Step 2?

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\".

Run from the Tools folder

Apr 14, 2014 02:08 PM

I cannot get this to work for 12.1

All I get is a black command screen that appears for less than a half second.

Does it still work for 12.1?

Mar 31, 2014 03:21 PM

Nice Article..

Mar 13, 2014 04:20 AM

Hi

I ran batch file. but I can't see sem5.db.bak and sem5.log.bak file at 'D:/Symantec Enpoint Protection/db'

I think I failed to shrink Database. How can I do next?
 

SEPM12.1

Windows Server 2008 R2 (Vmware)

 

 

Jan 29, 2014 02:46 PM

Haven't seen an update to this since 12.1.2, and was running into the same trouble nathans77 posted about above.

In the error trace, it gives you the command line it's trying to do -- basically the same dbunload.exe instructions from http://www.symantec.com/business/support/index?page=content&id=TECH104278

I used the steps outlined below, and was able to shrink a 4.5 GB database down to 3.7 GB.  Not a lot of space reclaimed, but I'll take it.

DISCLAIMER:  while the steps worked fine for me, I make no guarantees that it will work for you.  YMMV, backup first, etc. etc.

1. Backup your SEPM database using the Database Back Up and Restore tool.  I also made a backup copy of the sem5.db file just in case...

2. Stop the services for:

  • Symantec Embedded Database
  • Symantec Endpoint Protection Manager
  • Symantec Endpoint Protection Manager Webserver

3. Open a command prompt as administrator, and run the following command.  Where I use <SEPMPATH> below, replace with the Path to your SEPM install (ex "C:\Program Files\Symantec\Symantec Endpoint Protection Manager")

<SEPMPATH>\ASA\win32\dbunload.exe -ar -c "UID=dba;pwd=<YOURPASSWORD>;dbf=<SEPMPATH>\db\sem5.db" "<SEPMPATH>\dbdump" -r "<SEPMPATH>\dbdump\reload.sql" -v -q -y -o "<SEPMPATH>\dbdump\unload.log"

4. Wait for the command to complete.  Grab a coffee or something.

5. Check the results of unload.log and make sure there weren't any errors.

6. Start the services you stopped in step 2, and resume using SEPM.

Dec 16, 2013 02:00 AM

hi all,

 

does this thread still ok?

Dec 12, 2013 01:39 AM

Also, just an additional question to all:

 

If I have multiple SEPM, replicated, do I need to apply it to all or just 1 SEPM server only then rereplicate them? Do I need to cut the replication before applying the tool? Any suggestions on how to clean the embedded database?

 

Thanks!

 

 

Dec 12, 2013 01:32 AM

any answers on the above queries? I want to try the tool but i want to make sure of the things i need to do before acting on the said issue. Been reading all the comments above but it doesn't seems to answer the questions being delivered by the users.

Dec 05, 2013 04:42 PM

SEPM 12.1.3

When running the bat file I get this...

Info: Before shrinking DB, Please backup DB first!! This tool will stop the SEPM service.

Here's the command info...

C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\Tools>Shrin
kEmbeddedDB.bat
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: ================== Server Environment ===================
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: os.name = Windows Server 2008 R2
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: os.version = 6.1
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: os.arch = x64
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: java.version = 1.7.0_21
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: java.vendor = Oracle Corporation
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: java.vm.name = Java HotSpot(TM) Client VM
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: java.vm.version = 23.21-b01
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: java.home = C:\Program Files (x86)\Symantec\Symantec Endpoint Protection
 Manager\jre
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: catalina.home = C:\Program Files (x86)\Symantec\Symantec Endpoint Protec
tion Manager\Tools\..\tomcat
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: java.user = null
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: user.language = en
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: user.country = US
Dec 05, 2013 3:39:42 PM com.sygate.scm.server.util.ServerLogger writeHeader
SEVERE: scm.server.version = 12.1.3001.165
Has valid SAV license
Info>> No SNAC license file in C:\Program Files (x86)\Symantec\Symantec Endpoint
 Protection Manager\Tools\..\tomcat\etc\license
Dec 05, 2013 3:39:43 PM com.sygate.scm.tools.db.ShrinkEmbededDB initLogger
INFO: logger initialized ...
Dec 05, 2013 3:39:43 PM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB
INFO: shrinkDB: Start to shrink DB.
Dec 05, 2013 3:39:43 PM com.sygate.scm.tools.db.ShrinkEmbededDB detectBackupFile

INFO: detectBackupFile: Detect bak DB file ...
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB stopTomcat
INFO: stopTomcat: Stopping Tomcat services...
Executing command - stop semsrv
The Symantec Endpoint Protection Manager service is not started.

More help is available by typing NET HELPMSG 3521.

Waiting for service termination: semsrv
Checking whether the service is stopped: semsrv
Retrieve status for service semsrv
The status for semsrv' service is 1
Service is stopped.
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB
INFO: shrinkDB: The OS is Windows 2008....
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB
INFO: shrinkDB: Stopping DB service....
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB stopDBServices
INFO: stopServices: Stopping DB services...
Executing command - stop SQLANYs_sem5
The Symantec Embedded Database service is not started.

More help is available by typing NET HELPMSG 3521.

Waiting for service termination: SQLANYs_sem5
Checking whether the service is stopped: SQLANYs_sem5
Retrieve status for service SQLANYs_sem5
The status for SQLANYs_sem5' service is 1
Service is stopped.
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB
INFO: shrinkDB: The DB vendor is:Embedded
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB unloadDB
INFO: unloadDB: [Thu Dec 05 15:39:51 CST 2013] Start to unload the DB....
Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB unloadDB
INFO: unloadDB: The command line is:"C:\Program Files (x86)\Symantec\Symantec En
dpoint Protection Manager\ASA\win32\dbunload.exe" -c "UID=dba;pwd=**********;dbf
=C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\db\sem5.db
" "C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\dbdump"
-r "C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\dbdump\
reload.sql" -v  -q  -y  -o "C:\Program Files (x86)\Symantec\Symantec Endpoint Pr
otection Manager\dbdump\unload.log"
Error occurred.Dec 05, 2013 3:39:51 PM com.sygate.scm.tools.db.ShrinkEmbededDB m
ain
INFO: Error occurred. The exception is: Executable name has embedded quote, spli
t the arguments
java.lang.IllegalArgumentException: Executable name has embedded quote, split th
e arguments
        at java.lang.ProcessImpl.isQuoted(ProcessImpl.java:160)
        at java.lang.ProcessImpl.getExecutablePath(ProcessImpl.java:201)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:242)
        at java.lang.ProcessImpl.start(ProcessImpl.java:133)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
        at java.lang.Runtime.exec(Runtime.java:615)
        at java.lang.Runtime.exec(Runtime.java:483)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.unloadDB(ShrinkEmbededDB.java
:358)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.shrinkDB(ShrinkEmbededDB.java
:160)
        at com.sygate.scm.tools.db.ShrinkEmbededDB.main(ShrinkEmbededDB.java:100
)

I've already backed up the db, but what else is it needing?

Thanks

Nov 15, 2013 10:33 AM

Hi: I followed the instructions for running the tool, and the command window is still open with the last command:

Waiting for service running: SQLANYs_sem5
Checking whether the service is running SQLANYs_sem5
'SQLANYs_sem5' service is running...
        STATE              : 4  RUNNING
The service SQLANYs_sem5 has already been started.
Executing command - start semsrv
The Symantec Endpoint Protection Manager service is starting.
The Symantec Endpoint Protection Manager service was started successfully.
 
Nov 15, 2013 9:11:29 AM com.sygate.scm.tools.db.ShrinkEmbededDB cleanupDump
INFO: cleanupDump: Cleanup dump files....
Nov 15, 2013 9:11:29 AM com.sygate.scm.tools.db.ShrinkEmbededDB shrinkDB
INFO: shrinkDB: End to shrink DB.
 
It has been sitting like this for the past hour...has it completed or is it still running? In the dB directory, I see:
 
sem5.db.bak -- 3.1 GB
sem5.log.bak -- 2.5 GB
 
sem5.db -- 2.5 GB
sem5.log -- 44 MB
 
I see the timestamps on the log and db files changing every couple of minutes, but they are not changing in size at this point.
 

Oct 17, 2013 01:46 PM

I'm having an issue with this tool running in 12.1.3 as well except I do not get an error. The tool stops the services then nothing happens. I just let the server sit there for 30 minutes without doing anything to see if I was going to get an error and nothing happened. Was this tool ever updated for 12.1.3? My drive is running low on storage and I would like to shrink this DB if possible. I really do not want to add more storage because, well, the DB will just keep growing.

Sep 18, 2013 03:56 PM

Will this be updated to work with RU3?

It very likely is an error in Java, something changed that requires " or ', maybe?

Thanks

Sep 12, 2013 01:44 PM

Same error here.

SEPM 12.1.3

Aug 22, 2013 01:02 PM

Is this something that can be run silently to allow it to be run as a scheduled task?  This would make it easier to automate the maintenance of the sem5.db.

 

Other than that, it is a very nice utility that I know I will keep handy.

Jul 31, 2013 11:51 AM

Thanks guys. Looks like I will have to manage this a little more closely....

 

Jul 31, 2013 10:21 AM

I can second the error that M. Goud describes above. If Elisha would be so kind as to update this great utility so that is supports SEP 12.1.3, we would all be very greatful. Ok...at very least, I would. :-)

Thanks for the support!!

-Mike

Jul 30, 2013 10:05 PM

Hi Frank,

Do you have multiple sites of SEPM? Please set the replicate option to replicate log only. Try to shrink the DB more often.

One more note: Sometimes the transaction logs grow too big and you can not truncate it on the SEPM. You have to stop the Manager service and also the embedded database, delete the log file mannually and start these 2 services again.

The log file located in: "Your SEPM Folder\db\sem5.log"

Jul 30, 2013 09:47 PM

Normally it gets that large because there are a lot of SEP client packages and AV definitions files in the database.  The database file size should show the 'peek' database size.  Once the database file consumes space it does not give up the space without manually shrinking it.  This is normal most databases.  Since yours is 100GBs it shows that most likly at one point in time you had 100GBs of data in the database (the peek usage).

SEP does not automatically shrink the database.  Shrinking the database requires SEPM to be turned off and the database to be unloaded.  However SEPM does automatically manage the database by truncating the transaction logs and rebuilding the index files.

Jul 30, 2013 03:00 PM

Hi. I see that Symantec has a "tool" to "shrink" the SEM5 database but I have a broader question. Why does it get so large in the first place? Is there an automatic routine that will keep this database manageable? The process ate up my hard drive in about 2 months (100G). Did I set this Endpoint Mgr. app up incorrectly?

Thanks.

 

Jul 08, 2013 08:18 AM

This tool doesn't work anymore after upgrading to 12.1 RU3.

When run, it stops the services and then terminates with the following error:

"Error occurred.Jul 01, 2013 10:35:17 AM com.sygate.scm.tools.db.ShrinkEmbededDBmain
INFO: Error occurred. The exception is: Executable name has embedded quote, split the arguments"
 
The tool seems to have problems with the newer JRE which comes with the new release.
 
As a workaround I restored the older version to the %CD%\JRE folder and adjusted the batch file.
 
Could you publish a new version?

May 17, 2013 09:10 PM

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.

May 07, 2013 06:34 PM

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.

Mar 28, 2013 11:10 PM

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.

Mar 18, 2013 11:07 AM

I've also seen this this morning.

Mar 16, 2013 05:24 AM

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..

 

-------------------------------------------------
--   Create tables
-------------------------------------------------
 
----CREATE TABLE "DBA"."mt" (
----    "id"                             integer NULL
----   ,"name"                           char(20) NULL
----)
----go
----

but further down it tries to load into the table..

 

LOAD TABLE "DBA"."mt" ("id","name")
    FROM 'C:/Program Files (x86)/Symantec/Symantec Endpoint Protection Manager/dbdump/703.dat'
    FORMAT 'TEXT' QUOTES ON
    ORDER OFF ESCAPES ON
    CHECK CONSTRAINTS OFF COMPUTES OFF
    STRIP OFF DELIMITED BY ','
    ENCODING 'UTF-8'
go
 

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.

Mar 14, 2013 01:36 PM

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.

Mar 14, 2013 09:07 AM

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

Mar 07, 2013 04:53 PM

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:

Error in file: "C:\program files (x86)\Symantec\Symantec Endpoint Protection Manager\dbdump\reload.sql" at line 9100 

Table 'mt' not found

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?

Feb 27, 2013 10:17 PM

Thanks Elisha for your update. It works properly on our SEPM 12.1.2 (RU2)

Feb 06, 2013 02:40 PM

Ok.  I reposted it.  This time without the password.

Feb 06, 2013 10:56 AM

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?

Feb 04, 2013 05:12 PM

I updated the tool to work with SEPM 12.1.2 (RU2).

Jan 04, 2013 02:25 PM

That's great to hear. Thanks for the update, keep up the great work!

Jan 03, 2013 07:59 PM

We are working on an update for this tool that works on SEP 12.1 RU2.

Dec 31, 2012 11:42 AM

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.

Dec 31, 2012 11:26 AM

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.

Dec 31, 2012 11:17 AM

this is fixed in latest version, why do you want to run on SEP 12.1 RU 2?

Dec 31, 2012 10:47 AM

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 27, 2012 10:15 AM

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

Nov 21, 2012 06:40 PM

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

Nov 17, 2012 11:42 PM

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)

Nov 09, 2012 01:57 PM

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.

Oct 03, 2012 01:08 PM

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.

Aug 31, 2012 12:07 PM

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,

Aug 30, 2012 10:35 PM

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

 

Aug 29, 2012 06:31 PM

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.

Aug 16, 2012 01:06 PM

This question needs to be answered!

Aug 16, 2012 12:58 PM

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...

Aug 05, 2012 03:08 AM

Dear Ashish,

Thanks for your quick response, request you to kindly go ahead to the new thread 

 

Best Regards

Aug 05, 2012 01:17 AM

hi,

Sure we will help you with that, But do you mind creating a new thread for this.

Aug 05, 2012 12:44 AM

 

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

Jul 24, 2012 02:58 PM

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.

Jul 24, 2012 06:27 AM

Thank you for your answer.

One last question, will the memory usage of the DBSRV9 reduce as well? 

Jul 24, 2012 02:46 AM

Thanks Elisha for providing this tool. It's great help to the support team.

 

Jul 23, 2012 02:04 PM

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.

Jul 22, 2012 02:07 AM

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?

Jun 19, 2012 03:40 PM

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.

 

Jun 19, 2012 03:29 PM

Try stopping the SEP Manager and copying the sem5.db and sem5.log files to a separate folder first before running the tool.

Jun 19, 2012 01:06 PM

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.

 

Apr 27, 2012 01:43 AM

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.

Apr 26, 2012 10:26 PM

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.

Apr 26, 2012 07:54 AM

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?

 

 

Mar 31, 2012 08:24 AM

this is awesome.

thank you

Mar 30, 2012 04:33 PM

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

Mar 29, 2012 12:40 PM

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.

Mar 29, 2012 09:58 AM

Awesome Tool for SEP 12.1

Mar 28, 2012 11:13 PM

Ok..Thanks for the reply.

Mar 28, 2012 05:13 AM

Thanks for sharing the tool, but having one doubt that shrinking of db will create any performance issues?

Related Entries and Links

No Related Resource entered.