Quantcast
Channel: Primavera Online Interaction » Password
Viewing all articles
Browse latest Browse all 100

prim14224:How to backup / restore a Primavera Contractor 4.1 Database?

$
0
0
Solution ID: prim14224
How to backup / restore a Primavera Contractor 4.1 Database?
Status: Reviewed
Version(s): 4.1, 5.0

Problem: How to backup / restore a Primavera Contractor 4.1 Database?
Problem: Primavera Contractor 4.1 Database Backup Utility
Problem: Primavera Contractor 4.1 Database Restore Utility
Fix: SEE ALSO: prim33699 - Are there GUI tools available, to backup / restore Primavera 5.0 databases that run on MSDE 2000?
Fix: SEE ALSO: prim46035 - ”How to backup and restore a Primavera 5.0 database, running on MSDE 2000 (stand-alone)?”
Fix: GUI Method:

DISCLAIMER:

The Primavera Contractor Database Backup & Restore Utilities are provided for the convenience of the User and is not provided under warranty or supported as part of Primavera System Inc.’s Maintenance and Support Program.  Users who apply the Primavera Contractor Database Backup & Restore Utilities do so at their own risk.  Primavera Systems Inc. will not be responsible for any problems resulting from the use of this utility.


NOTE: The Primavera Contractor 4.1 Database Backup & Restore Utilities run with the following default parameters:



Server = localhost
Database = pcondb
SQL User = sa
sa password = sa


If the Microsoft SQL Server Desktop Engine (MSDE) password is not “sa”, please contact Primavera Customer Support.


Primavera Contractor 4.1 Database Backup Utility:



  1. Either:


  • CLICK HERE to download the Primavera Contractor 4.1 Database Backup Utility.
     (or)

  • Locate it on the Contractor 4.1 CD, inside of: <drive>\Support\pmconbackup.exe

  • Once saved / located locally, double-click: pmconbackup.exe
     

  • Click: Browse to select a destination folder for the database backup file.
     

  • If desired, enter a file name.  The default file name is: “pmconbackup.bak”
     

  • Click: Backup to begin the database backup.

  • Primavera Contractor 4.1 Database Restore Utility:



    1. Either:


    • CLICK HERE to download the Primavera Contractor Database Restore Utility.
       (or)

    • Locate it on the Contractor 4.1 CD, inside of: <drive>\Support\pmconrestore.exe
       

  • Once saved / located locally, double-click: pmconrestore.exe
     

  • Click: Browse to select a valid database backup file to restore.
     

  • Click: Advanced Options, and specify the correct Host name, (new) Database name, Username and Password.
     
    NOTE: If you wish to restore over an existing database, please backup the existing database first.
     

  • If you wish to overwrite an existing database, check the “overwrite database” option.
     

  • Click: Restore

  • NOTE: The Primavera Contractor 4.1 Restore Utility is hard-coded to place database files into the following location:



    C:\Program Files\Microsoft SQL Server\MSSQL\Data\


    If the location does not exist or is unavailable, an error will result.

    Fix:

    Script Method:


    Run the following commands from a command prompt:


    BACKUP:



    osql -U sa -P sa -S <machine_name or localhost>\primavera -d pcondb


    1>backup database pcondb to disk = ‘c:\<path>\pcondb.bak’
    2>go


    -where <path> is the directory where the backup file will be created.


    NOTE:  Once the backup file is created, it should be moved to a different location; by default upon running the script again, the “pcondb.bak” file will be appended to, rather than overwritten. To have the backup process overwrite and replace any existing c:\<path>\pcondb.bak file if one exists, modify the backup syntaxas follows (use caution, as once the current file is overwritten it is irreversible):
                
    backup database pcondb to disk = ‘c:\<path>\pcondb.bak’ with init


    RESTORE:



    osql -U sa -P sa -S <machine_name or localhost>\primavera


    1>restore database pcondb from disk = ‘c:\<path>\pcondb.bak’ with recovery,
    2>move ‘pcondb_dat’ to ‘c:\Program Files\Microsoft SQL Server\MSSQL$PRIMAVERA\data\pcondb_dat.mdf’,
    3>move ‘pcondb_log’ to ‘c:\Program Files\Microsoft SQL Server\MSSQL$PRIMAVERA\data\pcondb_log.ldf’
    4>go


    1>use pcondb
    2>exec sp_change_users_login ‘Update_One’, ‘pubuser’, ‘pubuser’
    3>go

    1>use pcondb
    2>exec sp_change_users_login ‘Update_One’, ‘privuser’, ‘privuser’
    3>go


    -where <path> is the directory where the backup file is located.


    NOTE: The ‘move’ statements above assume that Contractor was installed using CD’s with a Copyright date in 2005.  If the date was 2004, you may need to remove ”$PRIMAVERA” from both of the ‘move’ statements.  Contact Primavera Support if assistance is needed.


    Viewing all articles
    Browse latest Browse all 100

    Trending Articles