PDMWorks Stop Service Automatically for Backup

Experience has taught us that it is important for a database to be "quiet" (shut down) during backup, which has been confirmed by our SolidWorks VAR. We need to automatically stop the PDMWorks service each night before the backup starts, then automatically restart the service when the backup completes. I presume all PDMWorks customers have encountered this issue; can anyone provide us with the recommended method for automatically stopping and restarting the PDMWorks service? Running PDMWorks 2004 on Windows Server 2003.

Thank you in advance, Marc

Reply to
cadmgr2004
Loading thread data ...

There are two ways most people deal with this.

1) use back up software that can stop and restart services

2) don't back up the executables, only the vault data. you don't need to stop the service, but it would be a good idea to at least lock out the vault in the vault admin tool. I don't think there is any API access to lock out the vault through the PDMW API.

matt

snipped-for-privacy@yahoo.com (cadmgr2004) wrote in news: snipped-for-privacy@posting.google.com:

Reply to
matt

You could probably also quickly write a VB.net app to stop the service at say 1:00 am and then restart it at 3:00 am

Evan

Reply to
Evan T. Basalik

Reply to
kellnerp

Try NET START "PDMWorks Server"

I am not sure off the top of my head if the name of the service is right. There is a NET STOP also available. It is possible to use this over the network as well to remotely stop a service. Permissions will be the biggest problem if you do that.

Reply to
P

I found some stuff I wrote up a while back. You have to create three files named:

StartPDM.cmd StopPDM.cmd QueryPDM.cmd

After creating the files insert the following text. Change the reference to the server from \\PC3 to whatever is appropriate for your system. It is a good idea to test this stuff before using in production.

In StartPDM.cmd:

@ECHO OFF REM REM SET THE NAME OF THE SYSTEM REM SET PDMSERVER=\\PC3 REM REM DON'T MESS WITH ANYTHING BELOW THIS LINE REM echo %PDMSERVER% PDMWorks Start echo ******************* sc %PDMSERVER% start "PDMWorks Server" pause sc %PDMSERVER% query "PDMWorks Server"

In StopPDM.cmd put:

@ECHO OFF REM SET PDMSERVER=\\PC3 REM REM DON'T MESS WITH ANYTHING BELOW THIS LINE REM echo %PDMSERVER% PDMWorks Stop echo ******************* sc %PDMSERVER% stop "PDMWorks Server" pause sc %PDMSERVER% query "PDMWorks Server"

In QueryPDM.cmd

@ECHO OFF REM REM SET THE NAME OF THE SYSTEM REM SET PDMSERVER=\\PC3 REM REM DON'T MESS WITH ANYTHING BELOW THIS LINE REM echo %PDMSERVER% PDMWorks Status echo ******************* sc %PDMSERVER% query "PDMWorks Server" pause

Then if you want to change vaults you can create a .reg file and just change one line to point to wherever your vault is. You only have to change rootPath.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\DesignSource\PDM/Works\Server] "rootPath"="G:\\pdmworks\\" "Skip Structure Validation"="FALSE" "Skip Tree Info Build"="FALSE" "Skip Tree Build"="FALSE"
Reply to
kellnerp

IT determined their backup app supports pre- and post-backup scripts, which is ideal because otherwise we would have needed to constantly tweak the timing of our batchfiles with the duration of the backup.

We created two batchfiles that run on each end of the backup: pdmstop.bat: @ECHO OFF net stop "PDMWorks Server" pdmstart.bat: @ECHO OFF net start "PDMWorks Server" Not elegant, but insures PDMWorks is quiet during backup.

Thanks again for your suggestions.

Reply to
cadmgr2004

Make sure they wait till it is truly shut down and likewise truly up and running before use. That is one reason I put the query in my scripts. For large vaults startup and shutdown may take a bit of time.

Reply to
P

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.