Video Screencast Help

dbdefrag.bat - how long can takes?

Created: 10 Jul 2012 | 6 comments
mrmadej's picture


I have a big NetBackup environment and there is a OPSCenter installed.

OPSCenter is working very slow and I received recommendation from support that I have to run dbdefrag.bat. That's ok. I ran this command but after stopping services nothing is happening. Only files are creating in defrag directory but very slow.

OPSCenter database is about 20GB.

And my questions are:

1. can I monitor the progress of defrag process?

2. It is possible to estimate time required for this operation?

3. What would be happend when the process hangs and will be killed by administrator?




Comments 6 CommentsJump to latest comment

RonCaplinger's picture

Sorry for the late reply.  20GB is a big database.  Mine is about 4GB and the defrag takes about 30-40 minutes.

You can monitor the progress in the C:\Program Files\Symantec\OpsCenter\server\db\data\defrag\vxpmdb\unload.log.  I don't see a way to estimate completion time.

I have this scheduled on a monthly basis during a time where none of my reports are scheduled to run and no one would likely be logged in to look at anything in OpsCenter.  Doing this monthly should reduce the time it takes to run.

I don't know exactly what will happen if you kill the process.  I think it depends on where it is in the defrag process; it is basically a SQL unload process.  If it is still unloading the database to flat files, it would make sense that you could stop it.  But if the unload is finished, you would have to wait until the restore is complete before you could start up the database.

For reference, here is what my defrag is doing now, after about 15 minutes of running:

C:\Program Files\Symantec\OpsCenter\server\bin>dbdefrag
Stopping the OpsCenter Web Console Service...
Stopping the OpsCenter Server...
Stopping the OpsCenter Database...
Unloaded vxpmdb
C:\Program Files\Symantec\OpsCenter\server\db\data\.\symcOpscache.db
C:\Program Files\Symantec\OpsCenter\server\db\data\.\symcopsscratchdb.db
C:\Program Files\Symantec\OpsCenter\server\db\data\.\symcsearchdb.db
C:\Program Files\Symantec\OpsCenter\server\db\data\.\vxpmdb.db
C:\Program Files\Symantec\OpsCenter\server\db\data\.\vxpmdb.log
        5 file(s) copied.
Initializing the new OpsCenter database files
SQL Anywhere Initialization Utility Version
CHAR collation sequence:  UTF8(CaseSensitivity=Respect)
CHAR character set encoding:  UTF-8
NCHAR collation sequence:  UCA(CaseSensitivity=UpperFirst;AccentSensitivity=Igno
NCHAR character set encoding:  UTF-8
Creating system tables
Creating system views
Setting option values
Database "C:\Program Files\Symantec\OpsCenter\server\db\data\.\vxpmdb.db" create
d successfully
Starting the new OpsCenter database
The Symantec OpsCenter Database Server service is starting.
The Symantec OpsCenter Database Server service was started successfully.

Authenticate the new OpsCenter Database
Starting DB Authentication
DB Authentication Done Successfully

Restarting the new OpsCenter Database Server Service...
The Symantec OpsCenter Database Server service is stopping.
The Symantec OpsCenter Database Server service was stopped successfully.

The Symantec OpsCenter Database Server service is starting.
The Symantec OpsCenter Database Server service was started successfully.

Importing OpsCenter Database....
mrmadej's picture


Thanks for reply.

My defrag process took about 5 hours and then finished successfully. It reduced my DB to 16 GB.

This process was recommended by support because we have a problem with data collecting from master servers and support decided to do defrag. I don't know why, but ok, perhaps it could help us. Unfortunately it doesn't help. We still have the same problem with disconnecting our OPS from master servers or connection is partially. Directly after the OPS restart it is working about 24 hours without problems, and then connectivity is changed to partially or disconnected. Maybe You have any experience with similar issue?

Many thanks


RonCaplinger's picture

Some of the earlier versions had connectivity issues.  The 6.5.x versions had issues through mutliple versions, but things got more stable in the last release before 7.x.

What version of OpsCenter is running on your server, and (if you are using it) what version of the agent is installed on your master server?

mrmadej's picture


OPS Center version is 7.0.1 (build 20100707). The same version like most important NBU master server. The another NBU master server is different version (7.0), but this one is less important. In both cases OPS Center behaves the same way.

About agent on mester server I have to ask administrator or check when I will be on site. But probably we are not using agent.



RonCaplinger's picture

The 7.0 versions were buggy when they first came out and required a number of calls to Symantec and mutliple EEB's for our OCA server to maintain full connectivity to NetBackup.  7.0 also had a number of reports that did not work correctly, tape drive reporting problems, and the forecast lines were incorrect.  These were resolved when we got to 7.1.0.x. 

I'd recommend you upgrade OpsCenter to at least  That's the last version we were on before going to 7.5 a few weeks ago.  You can have a higher version of OpsCenter than your NBU masters; in fact, you have to upgrade OpsCenter before you upgrade your NBU master.  If you find you are using the agent on the masters, you will need to upgrade that to the same version of OpsCenter, as well.

Be sure to back up your OpsCenter database using the "dbbackup" command before you upgrade, too.  I doubt you want to lose 16GB of historical data!

mrmadej's picture


Thanks a lot for explanation.

Tech support had said the same and gave me the patch to download. In next week I will apply the patch.

Thanks and regards