Hi guys,
I am having problems with attaching a new database. The database is basically blank, it is composed of a_DAT.mdf and a_LOG.ldf but i copied it so that the filenames now are b_DAT.mdf and b_LOG.ldf. however, when attaching the b_DAT.mdf, under the database name of the attach database dialogue box, it still says "a" (from the original a_DAT.mdf) and under the original filename column of the "a" database details (should be "b" database details by the way), the files a_DAT.mdf and a_LOG.ldf are present. How can I add the b databases? this database id to be used in P6 and i am using MS SQL Server Management Studio Express to attach the database.
Any help, appreciated.. Thanks in advance.
Hi again Jon.
I'm sorry if I left this thread for a very long time. Its just that my need for this information at the time I posted it has subsided and I got busy on other things. Honestly, I haven't got the chance to try your suggestions at all, until this time. I did the following as you suggested, but instead of using the dbconfig.bat, I used the configassist.exe, nonetheless, I was able to create a blank database and successfully attached it to primavera.
"If you require a copy of an existing database the best way i have found is to first create a blank new database then use the backup feature to create a .bak file then use the restore function to restore the .bak over the top of the newly created blank database. However when using restore function within SQL Server Management Express you will also have to go to the options tab (under general on the left hand side of the box) and make sure the "Restore database files as:" are pointed to your b.DAT and b.LOG. If you do not do this it will see that the database is a copy of a.dat and restore back over the top of that."
Regarding the pointing of the "Restore database as:" to b.DAT, I have also Checked the option to overwrite the existing database (b.DAT) since the SQL Server Management Express wont allow to restore database a.bak to b.DAT since it recognizes that the database is different.
Now, my question is that when I try to delete a project from the b.DAT, I get the following errors:
TINAT-2680-D
AVAA0-3406-1
and I am unable to proceed with the deletion. Have you encountered this problem, and how can I get the deletion to work?
Thanks and I am you guys have a solution.
Keyel
Thanks a lot Jon, I will try your sugesstions now and then i'll be posting the result later.
Regards,
Keyel
Keyel,
There are 2 ways you can go about this. If you just want a new blank database simply use the Primavera dbsetup.bat to create one for you. If you require a copy of an existing database the best way i have found is to first create a blank new database then use the backup feature to create a .bak file then use the restore function to restore the .bak over the top of the newly created blank database. However when using restore function within SQL Server Management Express you will also have to go to the options tab (under general on the left hand side of the box) and make sure the "Restore database files as:" are pointed to your b.DAT and b.LOG. If you do not do this it will see that the database is a copy of a.dat and restore back over the top of that.
Thanks
Jon