Video Screencast Help

Dbunload does not work

Created: 15 Apr 2008 • Updated: 09 Oct 2010 | 63 comments
To use the Dbunload tool
  1. Stop the following services:
    • Symantec Endpoint Protection Manager
    • Symantec Embedded Database
  2. Make a backup copy of the following file:

    %SEPM_Installation_Folder%\db\sem5.db
  3. Start the service Symantec Embedded Database.
  4. Click Start > Run, click OK, and type the following two lines:

    cd %SEPM_Installation_Folder%\ASA\win32
    dbunload -c "uid=dba;pwd=dba_password" -ar

When I run the command I get an error message that says invalid username or password.

Ray

Comments 63 CommentsJump to latest comment

Paul Murgatroyd's picture
I presume where it says dba_password you are putting the actual DBA password and not "dba_password"?
 
The DBA password will either be what you specified during the install, or the same as your original admin account password.

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

Moorbo's picture
Hi Paul,
 
I'm also having trouble running the dbunload tool. When I attempt to execute the dbunload command it say "SQL error: Database Server Not found". Note: I am using the embedded database and running the dbunload via command prompt from the same box that is running SEPM (and the embedded db). Any help would be appreciated.
 
Thanks
RayM's picture
I've tried the admin password and that does not work. Where it says uid=dba is that supposed to be dba or should it be something else?
Paul Murgatroyd's picture
try it in capitals... I've tried it once and it worked ok for me in the past.  DBA is definitely correct though...

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

Paul Murgatroyd's picture
Moorbo, did you start the database service again after backing it up?

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

Moorbo's picture
Hi Paul,
 
Thanks for the response - yes, I stopped both the DB and the SEPM services, backed up the sem5.db database file, restarted the DB service, then I attempted the dbunload command..
 
I just followed the steps here (http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2008022616103648) and still get the same error. (FYI - assuming you need to run this via command line step 4 is missing cmd before hitting OK)
 
Any other help is appreciated
 
 
Thanks again
Paul Murgatroyd's picture

ok thanks... only thing I can think of is did you change the port for the DB?

I'll take a look at dbunload and see if I can get a better understanding

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

Moorbo's picture
Hi Paul,
 
No, I have not changed any of the default port numbers
 
Thanks
Paul Murgatroyd's picture

and this is an upgrade from RTM --> MR1 --> MP1 --> MR2 or something different?

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

Abhishek Pradhan's picture

Hi, the command is as follows -

dbunload -c "dbf=<%SEPM_Installation_Folder%>\db\sem5.db;start=dbsrv9;uid=dba;pwd=<password>" -ar

all in a single line.....give the appropriate path to the SEPM installation folder where its mentioned, and the password would be the password used for logging into the SEPM console

<Please note here that in case you have changed the admin password since the first time you logged in, the original admin login password would be the one that you need to type here for the command to be successful>

Also note that this take time from anywhere between 5 minutes to an hour depending on the Database size. Additionally, for example, if the DB size is 2 GB, there should be 2 GB or more free space on the drive where the SEPM is installed, since the tool first unpacks the DB, and then cleans it up to a more presentable size

Do let us know if this is helpful.

Abhishek Pradhan, PMP, MCT
Blog: http://blog.abhishekpradhan.net | SIG Lead - Pune IT Pro (Microsoft Pune User Group) | http://www.puneusergroup.org

Moorbo's picture
Hi Paul,
 
My initial install was MR1 - upgraded to MP1, then MR2
 
Thanks
Moorbo's picture
Hi Abhishek,
 
Thanks - I'll try your suggestion and let you know if it worked.
ynguldyn's picture

Abhishek, your suggestion works with both Manager and Database services stopped. Thank you.

Moorbo's picture
Hello,
 
Still having trouble - getting different error.
 
I ran the following command below and I received an error that the "specified database file already in use"
 
dbunload -c "dbf=C:\Program Files\Symantec\Symantec Endpoint Protection Manager\db\sem5.db;start=dbsrv9;uid=dba;pwd=XXXXXXXX" -ar 
 
Any other suggestions?
 
Thanks again
Moorbo's picture
Hi Ray,
 
Did you have the Embedded database service enabled when you ran the command?
 
Thanks
RayM's picture
Yes, it was running as per the instructions. I'm having trouble logging in to the SEPM, I restarted the service but when I try to log in it gives me an error. When I look at the service it has stopped running. Rebooting now to see if that helps.
 
Ray
Moorbo's picture
Hi Abhishek,
 
As mentioned in replies from other users, the command you supplied worked but only when the embedded database service is stopped. 
 
Thanks
Abhishek Pradhan's picture

No Problem. Anytime.....

:smileyvery-happy:





Abhishek Pradhan, PMP, MCT
Blog: http://blog.abhishekpradhan.net | SIG Lead - Pune IT Pro (Microsoft Pune User Group) | http://www.puneusergroup.org

oliversl's picture

Hi, anyonw can post their space savings after doing this procedure?

Thanks
Oliver

http://tinymailto.com/oliversl <-- my email after a captcha

A. Ross's picture

We just went from ~3.5GB to slightly under 1GB running about 75 clients.

grant604's picture

Is dbunload only available for MR2 installations?  If we're running MR1 and our database size is getting out of hand, do I *HAVE* to upgrade to MR2 to use this utility to compact it?

My current sem5.db size is about 12GB and growing, with about 225 clients... and I've already lowered much of the data retention dates from the defaults to 5-7 days.


Paul Murgatroyd's picture

we only provide dbunload on the MR2 CD (its part of the SEPM install)... you may be able to contact support and get a copy - alternatively there is the free to download developer version of Sybase ASA9 which has a full admin console and dbunload included.

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

fjorq's picture
Abhishek - When I run the command I get the following error:
 
C:\Program Files\Symantec\Symantec Endpoint Protection Manager\ASA\win32>dbunload -c "dbf=C:\Program Files\Symantec\Symantec Endpoint Protection Manager\db\sem5.db;start=dbsrv9;uid=dba;pwd=*****" -ar
 
Adaptive Server Anywhere Unload Utility Version 9.0.2.3347
Too many connections to database being replaced
 
I'm trying this with both the Embedded DB and SEPM services stopped
 
Any ideas?
Paul Murgatroyd's picture
I can only reproduce this when I have my SEPM service running, are you sure both services are definitely stopped?  (do you have any monitoring tool that might be restarting them?)
 
it that doesnt work, have you tried the command in the KB?

Paul Murgatroyd
Principal Product Manager, Symantec Endpoint Protection
Endpoint twitter feed: http://twitter.com/symc_endpoint

fjorq's picture
Paul -
 
I have checked and both services (Symantec Endpoint Protection Manager & Symantec Embedded Database) remain stopped.  Even after the error, checking and refreshing the services console still shows them stopped.
 
I tried the following command (from the KB) and get the following error:
 
C:\Program Files\Symantec\Symantec Endpoint Protection Manager\ASA\win32>dbunload -c "uid=dba;pwd=******" -ar
 
Adaptive Server Anywhere Unload Utility Version 9.0.2.3347
***** SQL error: Database server not found
 
 
kugumby's picture
Abhishek wrote: "Additionally, for example, if the DB size is 2 GB, there should be 2 GB or more free space on the drive where the SEPM is installed, since the tool first unpacks the DB, and then cleans it up to a more presentable size"
 
Unfortunately, I let mine run rampant.  I've upgraded to MR2, but the db is now 16.2gb (with less than 30 users) and I have 2.7gb of free disk space. (I already went into the console and set the log settings to lower numbers and removed what I can.) Is it still possible to run the dbunload routine given my situation?
 
Thanks, Todd
Raider1's picture

I ran dbunload -c "dbf=C:\Program Files\Symantec\Symantec Endpoint Protection Manager\db\sem5.db;start=dbsrv9;uid=dba;pwd=XXXXXXXX" -ar  with the database service stopped and it worked perfeclty. Thanks!

Raider1's picture

@ oliversl db went from 8.97gb to 1.94gb

jrudacille's picture
Hello-
 
 
I have about 30 users and my db has grown to over 6GB.  I have upgraded the management server to MR-2,  ran dbunload like the several people here have run...watched it make a copy of my DB and then when finished, hours later, leave the DB the same size (if not slightly larger) than before.  Anyone else run into this issue?  The Db was about 5GB when I upgraded to Mr-2 and has grown another 1.5GB over the last few weeks so the MR-2 upgrade has not stopped the growth either.
 
Thanks



Message Edited by jrudacille on 05-09-2008 07:37 AM

jrudacille's picture
As an update to this, I have achieved a smaller DB.  Here is how:
 
1- I ran dbvalidator on the DB and it had some errors surrounding file links to Live Update folders. 
2- So I uninstalled Live Update and then reinstalled it then ran a repair install on SEPM to register it with LU.  
4- Ran the lubfix tool. 
 
This left the database in better shape but still a few errors in dbvalidator so through some testing I found that if I ran the lubfix tool 4 times in a row, the errors were gone. 
 
 I was then able to run dbvalidator with no errors, I ran dbunload again and my 6.5GIG DB went down to 500MEG!  In only 30 minutes as well.
 
 



Message Edited by jrudacille on 05-12-2008 05:06 AM

MarketingGirl's picture
Does Content File = Embedded Database File?
 
Could someone please clarify for me; we are having problems with the size of the content file. It keeps filling up, and we thought that MR2 would take care of this. I have read this thread about the embedded database shrink plan using Dbunload.  Are these the same two files?  The "Content File" is the same as the "embedded database"?  If so, we will try the Dbunload tool.
 
Or is there some other way to get rid of all downloads in the "Content File." Thanks for your time; we are (very)small and try to do this all ourselves.
 
Thanks
mikewaldron's picture
My DB went from 3.2GB to 3.2GB.  Booo.
Knottyropes's picture
Marketinggirl
 
It is not the same thing.
 
Content folder is a nother issue all together. It holds the live updates.
 
 
Siegfried's picture

HI,

I've upgraded to SEP 11.0.2000.

I try dbunload, it steel working but when the job stop, my database has the same size (about 8Go with 50users).

Please have you got a tip to decrease the size?

Best regards,

Siegfried

Siegfried's picture

Hi,

I retry this morning.
The database doesn't decrease, it takes 7.9 GB on my server.

I've resolved login/logoff problems on my Citrix servers when i roll back to NAV 10.1.5 (unmanaged).

I'm thinking of revert all of servers (7 servers and 90 computers) and computers with this version.

It takes too much time for me to administer SEPM.

Regards.

Siegfried's picture

Hi,

My database grew up to 8.1Go today ... please help me!

Why it didn't decrease with dbunload?

Thanks a lot.

Siegfried

Siegfried's picture

HI,

Today database size is 8.2 Go ...

Have a good day.

I've just open a ticket ...



Message Edited by Siegfried on 06-04-2008 11:22 PM

grant604's picture

My 19GB and growing db (220 clients) did not shrink after going through the dbload process.  It ran through successfully, but the resulting database was the same size it started out as.... I'm running MR2.


Daryl Sensenig's picture
I currently have 12 users and my database in at 11 gigs. This seems ridiculous. Dbunload does not help. Symantec, where are you?
Daryl Sensenig's picture
Hi jrudacille, I'd like to try your method, but the link is broken and I'm not quite clear on all the details of what you did. Can you possibly describe it in more detail? Thanks a lot.
Siegfried's picture

Hi,

If you have upgraded from an older version to MR2, the hotline said i have to uninstall SEPM (just the console), delete the database and reinstall with MR2.
After that, you have to reconfigure you client with a script to change the sylink.xml file.

My Db was 8.6 Go large and now it is 0.6 Go.

Sorry for my english today, i had a bad night .... and cofee isn't in my veins :-)

Knottyropes's picture
Well I just ran it
 
dbunload -c "dbf=C:\Program Files\Symantec\Symantec Endpoint Protection Manager\db\sem5.db;start=dbsrv9;uid=dba;pwd=XXXXXX" -ar
 
and it took only 5 min to take my 4.5 g DB and shrunk it to 1.2
 
Not to shabby.
Also my CPU usage went down a bit. 30% to 10%
SEPM console is more responsive too.
 
Things are looking good at the moment.
In 2 weeks I will know for sure that this is going in the right direction.
 
YAY!:smileyvery-happy:
grant604's picture

This could be bad advice, please consider carefully before proceeding at your own risk, but it did work for me without any noticeable problems. 

I was able to shrink my database with dbunload eventually.... note I don't know the consequences of doing this but for me, there appeared to be no immediately noticeable side effects.

* Backup your database first *

1) I used dbisqlc.exe to connect to my sem5 database.

2) I ran "select count(*) as thecount from binary_file where deleted=1;" it resulted in approx 1500 records, however running "select count(*) as thecount from binary_file where deleted=0" resulted in 24....   this appeared to be cause of my large database.... whether or not this is normal I don't know.

3) So, next I ran "delete from binary_file where deleted=1;" to get rid of these 1500 massive records.

4) Then I re-ran dbunload as suggested many times in this thread...

My database went from nearly 20Gb down to 500Mb.... but is slow growing once again.   Hopefully it will plateau at a reasonable size.

Again, I don't know the side effects of clearing out the binary_file table manually like this, you are doing this at your own risk.






Message Edited by grant604 on 06-19-2008 01:19 PM

grant604's picture

I'm curious, if I just deleted my all SEP client install packages, then in SEPM, would the list of packages under Admin -> Install Packages be empty?  

Because on my SEPM, both MR1 and MR2 packages are still listed there, and I know that I'm able to use the MR2 one to upgrade portions of my network still.... so it still appears to be working normally.

Basically, I'm trying to figure out what (if any) are the consquences of what I did are, and I can't seem to find anything that has been affected.


Knottyropes wrote:
Grant:
 
 read page 68 it will explain it some.
Basically you just deleted your SEP client install packages
 
 



Knottyropes's picture
It said MR2 are hard to delete from it.
 
Hope all is well from what you deleted.
 
Did you make a backup just in case?
 
hokutovega's picture

C:\Program Files\Symantec\Symantec Endpoint Protection Manager\ASA\win32> dbunload -c "dbf=<%full path to%>\sem5.db;start=dbsrv9;uid=DBA;pwd=<%passwd%>" -ar
w/ both "Symantec Endpoint Protection Manager" and "Symantec Embedded database services" stop

it took 10 minutes or so and sem5.db became 23,235,496KB -> 1,224,208KB

perfect for us, thank you all.

Knottyropes's picture
wow 23 to 1.3 gig, bet your server is way faster now.
I k
Knottyropes's picture
wow 23 to 1.3 gig, bet your server is way faster now.
I kno
Knottyropes's picture
23 to 1.3 gig, I bet your SEPM server is a bit faster now.
jrudacille's picture
I had come back to the forum as my DB had gone from 500MB, in early May, to 2.5GIG now.  Ran the same process I did , in early May,  using lubdfix and dbvalidator...got the DB to where it was reporting no errors, ran dbunload...and waited for 1.5 hours to see it had not changed it at all after unloading it.  So the process I mentioned before does not work for me when trying it again.  Symantec Endpoint is, how you say, poo-poo. 



Message Edited by jrudacille on 06-26-2008 12:02 PM

alankevinr's picture

I have just taken over the IT department. I have had several issues with SEP 11 I have manged to migrate all our end user to the new MR2 version. I have noticed that the sem5.bd is 4.5GB i have tried using the below script to truncate the database, to which is fails on ***** SQL error: Invalid user ID or password I have spoken to the 3rd party that installed endpoint, is there any way to get around this password issue rather than a fresh install?

 

Also the C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Inetpub\content is up to 40gb can this be truncated as well?

Sergey Korshunov's picture

SEP Manager upgraded from 11.0.1000 to 11.0.2000

dbunload shrink sem5.db from 20GB to 21GB :smileysurprised:

PLEAS HELP!

Sergey Korshunov's picture

second pass

dbunload shrink sem5.db from 21GB to 21GB

Sergey Korshunov's picture

is it posible to reinstall SEP Manager without lost of client database (but with deleting sem5.db)?

Message Edited by Sergey Korshunov on 08-25-2008 01:31 AM

Nick Branstein's picture

I've followed these steps but my database keeps growing.  I only have ~ 40 users and I am up to 18GB now!

 

Does anyone know if swapping to a MSSQL database will help at all?  I can't imagine what is taking up so much room...

Niels Buitenhuis's picture

I was reading this topic, because I have a problem regadering de sem5.db-file.
I tried the dbunload-tool to shrink the database from the huge size of 45 GB.
After running dbunload the database hasn't shrunk a bit.

I tried de dbvalidator-tool to check the dabase, this check told me that several links for LuDownloadPackage are wrong.

Following file explains it: mail.n-tree.nl/download/sep11/dbvalidator.log

Can somebody explain the problem?

Grant's picture

I can't believe this! I was using kbase article: http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2008022616103648 to try and shrink a 1.2GB database for 400 clients in  a test VM system :)  MR4 MP1a - whatever the latest build is that's supposed to work OK

It's not precise!! THe article is just plain wrong in three places of precedure of starting/stopping services..

You have to start database access to do the backup then stop it to do the dbunload -- it's totally wrong but easy to fix!! Why dont Symantec do this - they are a largeish computer company and probably have people that can edit the kbase files so they are accurate, and then test them a few times to ensure accuracy.
 
I am sure that I am not the only person to find this particular article wrong, and then have to resort to using this confusing "forum" system to find a solution.   

Why do Symantec leave inaccurate kbase articles in the wild?

Better yet - why not fix this POS EndPoint product and all it's crazy 1980's add-in database systems and whacko webserver plugins once and for all??? 

You just about have to be a db-admin to manage this SEP product!   The fact I wasted another 15 minutes on typing this instead of is purely due to the fact  I am testing this latest MR4 MP1a *working* version "one last time" before  I contemplate migrating my last few thousand desktops over to S0ph0s. - Looks like the migration will go ahead!

as3c's picture

I'm urgently looking for a solution to get my sem5.db file smaller.  This is the embedded database of SEP 11 MR4.  I had some troubles to get the disk space larger but now I'm at the point that this SEP Management server must replicate with our other affiliate.  With a 20 GB size in the database, this is almost impossible over our communication line.
So I was looking for a way to get it smaller.
I used the DBunload tool but after running 10 hours, the new size was still 20 GB.  I don't understand why this database needs to be so big.
Does anybody have another suggestion to get the database smaller ?

Maddison's picture

Stop both "Symantec Endpoint Manager Service and Symantec Embedded Database Service"

Check your path to dbunload.exe is the same as below and the path to your sem5.db is the same
If they are not substitute your paths for the ones below.

NOTE! make sure the quotes are in the right place as shown below and replace YourDatabasePassword with your own password used when installing the database.

Make sure you have at least 1.5 times the size of your database in free disk space.

Place this command line in a batch file and ensure its just one line.

Depending on the size of the database it can take mins to hours to run, sometimes it looks like it has hung, if you check tasks you will see db9serv.exe using some cpu, if its not using any cpu at all then its probably hung, seek advice from Support.

Once its finished don't forget to start the 2 services you stopped at the beginning.
"C:\Program Files\Symantec\Symantec Endpoint Protection Manager\ASA\win32\dbunload.exe" -c "dbf=C:\Program Files\Symantec\Symantec Endpoint Protection Manager\db\sem5.db;start=dbsrv9;uid=dba;pwd=YourDatabasePassword" -ar
All the Best

shenen's picture

hello
i have try Abhishek advice it work
but the problem is that the SEM5.db almost fill my hard drive space
now the space just remain 400 MB
the sem5.db is 60 GB
if i run dbunload it still need space to create the sem5.dbR and sem5.LogR file

is there a way to redirect the  .dbr and .logr file to another harddrive??