PDMWorks Stop Service Automatically for Backup

Discussion in 'SolidWorks' started by cadmgr2004, Jul 8, 2004.

  1. cadmgr2004

    cadmgr2004 Guest

    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
     
    cadmgr2004, Jul 8, 2004
    #1
  2. cadmgr2004

    matt Guest

    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


    (cadmgr2004) wrote in
     
    matt, Jul 8, 2004
    #2
  3. 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
     
    Evan T. Basalik, Jul 9, 2004
    #3
  4. cadmgr2004

    kellnerp Guest

    Went through this 6 months ago. There is a thread on the SW forum on how to
    Stop the PDMWorks server. We had it scripted for backup purposes. Any
    competent IT person can fix permissions so the CAD manager can start and
    stop these scripts remotely on the server.
     
    kellnerp, Jul 9, 2004
    #4
  5. cadmgr2004

    P Guest

    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.
     
    P, Jul 9, 2004
    #5
  6. cadmgr2004

    kellnerp Guest

    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"
     
    kellnerp, Jul 12, 2004
    #6
  7. cadmgr2004

    cadmgr2004 Guest

    Experience has taught us that it is important for a database to be
    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.
     
    cadmgr2004, Jul 16, 2004
    #7
  8. cadmgr2004

    P Guest

    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.
     
    P, Jul 19, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.