Video Screencast Help

Shrink the Symantec Endpoint Protection Manager 12.1 embedded database

Created: 26 Mar 2012 • Updated: 06 Feb 2013 | 79 comments
Elisha's picture
+19 19 Votes
Login to vote

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 79 CommentsJump to latest comment

Srikanth_Subra's picture

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)

0
Login to vote
Elisha's picture

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.

0
Login to vote
ken43's picture

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?

0
Login to vote
Elisha's picture

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

0
Login to vote
Srikanth_Subra's picture

Ok..Thanks for the reply.

Thanks & Regards,

 Srikanth.S

"Defeat the Defeat before the Defeat Defeats you"
(Swami Vivekananda)

0
Login to vote
LeeD's picture

Awesome Tool for SEP 12.1

Thank you,

Dorothy

0
Login to vote
consorcisg's picture

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

+1
Login to vote
Welsh's picture

This question needs to be answered!

0
Login to vote
Elisha's picture

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.

0
Login to vote
oxbow's picture

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?

 

 

0
Login to vote
Elisha's picture

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.

0
Login to vote
oxbow's picture

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.

0
Login to vote
Adrenaline_X's picture

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.

 

+1
Login to vote
Elisha's picture

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

0
Login to vote
PollockBP's picture

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.

0
Login to vote
Adrenaline_X's picture

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.

 

0
Login to vote
xbrandon's picture

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?

0
Login to vote
Elisha's picture

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.

0
Login to vote
xbrandon's picture

Thank you for your answer.

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

0
Login to vote
Elisha's picture

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.

0
Login to vote
Chetan Savade's picture

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

 

Chetan Savade
Sr 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.<

0
Login to vote
tombaby's picture

 

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

0
Login to vote
Ashish-Sharma's picture

hi,

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

Thanks In Advance

Ashish Sharma

 

 

0
Login to vote
tombaby's picture

Dear Ashish,

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

 

Best Regards

0
Login to vote
Welsh's picture

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

0
Login to vote
ub40's picture

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

 

0
Login to vote
Elisha's picture

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,

0
Login to vote
ttrodatt's picture

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.

0
Login to vote
Kaz Fernandes's picture

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)

0
Login to vote
Elisha's picture

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

0
Login to vote
Reisenberger's picture

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

0
Login to vote
pkecun's picture

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!

I'm guessing this is because the embedded database server has switched from "Adaptive Server Anywhere 11.0.1.2472" in SEPM 12.1.1101.401. RU1 MP1 to "Embedded (SQL Anywhere) 12.0.1.3551" in SEPM 12.1.2015.2015.
0
Login to vote
pete_4u2002's picture

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

0
Login to vote
pkecun's picture

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.

0
Login to vote
pete_4u2002's picture

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.

0
Login to vote
Elisha's picture

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

0
Login to vote
pkecun's picture

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

0
Login to vote
Elisha's picture

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

+1
Login to vote
Nguyen Cao's picture

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

0
Login to vote
Gai-jin's picture

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?

+1
Login to vote
pkecun's picture

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.

0
Login to vote
Elisha's picture

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.

0
Login to vote
dhenard's picture

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.

0
Login to vote
dowlingm's picture

I've also seen this this morning.

0
Login to vote
Elisha's picture

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.

+1
Login to vote
subhashsa222's picture

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 Savarkar

0
Login to vote
Elisha's picture

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.

0
Login to vote
M. Goud's picture

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?
+1
Login to vote
iamadmin's picture

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

0
Login to vote
FrankT's picture

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.

 

0
Login to vote
Elisha's picture

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.

0
Login to vote
Nguyen Cao's picture

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"

0
Login to vote
FrankT's picture

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

 

0
Login to vote
Sgeek's picture

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.

0
Login to vote
kshaetaa's picture

Will this be updated to work with RU3?

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

Thanks

0
Login to vote
spasq's picture

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.

0
Login to vote
omniTPA's picture

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.
 
0
Login to vote
nathans77's picture

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

Windows Server 2008 R2 Datacenter with Backup Exec 2010 R3 SP4 and iSCSI connection to QNAP.

SEP and SEPM 11.0.7200.1147 thru 12.1.3001.165

0
Login to vote
joash theory's picture

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.

0
Login to vote
joash theory's picture

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!

 

 

0
Login to vote
joash theory's picture

hi all,

 

does this thread still ok?

0
Login to vote
IMS-Dave's picture

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.

0
Login to vote
Yourim.Han@gmail.com's picture

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)

 

 

0
Login to vote
zebe-uncc's picture

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?

0
Login to vote
.Brian's picture

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

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

0
Login to vote
zebe-uncc's picture

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

Is that the correct spot?

0
Login to vote
.Brian's picture

No, needs to be on the SEPM itself

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

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

0
Login to vote
zebe-uncc's picture

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

 

0
Login to vote
.Brian's picture

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?

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

0
Login to vote
zebe-uncc's picture

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

0
Login to vote
.Brian's picture

yep, try that location as well.

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

0
Login to vote
zebe-uncc's picture

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

0
Login to vote
Steve.Lindsey's picture

does this work with RU4?

 

we have just updated & want to shirnk the DB

0
Login to vote
Steve.Lindsey's picture

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

0
Login to vote
Elisha's picture

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.

0
Login to vote
Lieb-EDV's picture

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?

0
Login to vote