Guild of Project Controls: Compendium | Roles | Assessment | Certifications | Membership

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

P6 Unable to configure SQL Database after Computer Crash

6 replies [Last post]
Dewald de Vlamingh
User offline. Last seen 12 years 10 weeks ago. Offline
Joined: 6 Jun 2012
Posts: 3
Groups: None

Hi

My hard drive crashed & I am having a hard time setting up my database again. It was backed up & successfully restored, however, when I open P6 I have to set up the database. I then try logging in with - 
Host Name - PCNAME\PRIMAVERA
Database name - pmdb$primavera
Username - pubuser
Password - pubuser

I have also tried with username & password 'pivuser' without success.

I get the message that reads - >Bad public user name or password. Database Server Error: Login failed for user 'pubuser'. Cannot open database "pmdb$primavera" requested by the login. The login failed.;<

I am using P6.7

I would much appreciate any help.

Replies

adeline tunim-eke
User offline. Last seen 7 years 16 weeks ago. Offline
Joined: 19 Apr 2014
Posts: 8
Groups: None

Hello Please i had the same problem but i have lost all the sample data how do i restore the sample date? Any suggestions please

adeline tunim-eke
User offline. Last seen 7 years 16 weeks ago. Offline
Joined: 19 Apr 2014
Posts: 8
Groups: None

Hello Please i had the same problem but i have lost all the sample data how do i restore the sample date? Any suggestions please

muhammad maisum
User offline. Last seen 2 years 36 weeks ago. Offline
Joined: 21 Jul 2013
Posts: 3
Groups: None
hi i am facing the problem  regarding sql data base i am using login name:admin password:admin but it gives this message>Unable to connect to the database.  Would you like to configure the database connection now?<when i try to configure database connection , it gives >database logon failed<i would appreciate any help
Dewald de Vlamingh
User offline. Last seen 12 years 10 weeks ago. Offline
Joined: 6 Jun 2012
Posts: 3
Groups: None

Gentleman

 

Thank you for your reply!

I manage to sort out my problem.

Here are the steps I took - 

 

Open Microsoft SQL Server Management Studio Express Log in using SQL Server AuthenticationUsername - SAPSW - Prima123Vera Expand the Databases FolderRight Click 'pmdb$primavera'Choose >task > restore > DatabaseChoose the correct backup locationGo to 'Options'Under 'Restore Options' select 'Overwrite the existing database'Click OK for restore to start After restore - right click 'pmdb$primavera' & select 'new query' Copy & paste the below script & 'Execute' EXEC sp_change_users_login 'Update_One', 'pubuser', 'pubuser' EXEC sp_change_users_login 'Update_One', 'privuser', 'privuser'   After successful execution, start P6
Forest Peterson
User offline. Last seen 8 years 35 weeks ago. Offline
Joined: 22 Mar 2011
Posts: 33

These are the notes I use to reset database issues:

PMDB
database name: pubuser
database password: pubuser
alternate:
database name: privuser
database password: privuser

SDB (SQL database)
host: [localhost]\primavera
database name: pmdb$primavera
username: sa
password: prima (alt password: Prima123Vera)

Christopher Hall
User offline. Last seen 11 years 48 weeks ago. Offline
Joined: 17 May 2012
Posts: 42
Groups: None

Hi Dewald,

I presume your using PPM.  As I understand there are number of issues which can result in this error.  The most common could be due to your crash and you may need to re-establish your priv/pub login within SQL.  Copy of my help notes below;

 

1/ You will need to use the SQL Server Management Studio in order to get this to work. Default login details are typically; username = sa, password = Prima123Vera otherwise consult your DB Administrator.

2/ When you log into the SQL Mngment Studio, you need to locate and select the affected database. Right click and select: "New Query".

3/ In the right pane you will need to paste the following script:

Execsp_change_users_login 'Update_one','PUBUSER','PUBUSER'

Execsp_change_users_login 'Update_one','PRIVUSER','PRIVUSER'

4/ Once you've entered the query select "Execute" from the menu and the connection to the priv- and pubuser should be re-established.

 

It may also pay to check your Host Name. I.e.  PCNAME\SQLEXPRESS instead of PCNAME\PRIMAVERA.

It all depends on how you've set P6 up originally.

Let us know how you go.

Regards,

Chris Hall