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.

Deleting Existing Projects but Primavera Data Base is Full ('Primary' file Group is Full)

6 replies [Last post]
Glenn Dexter Ubaldo
User offline. Last seen 11 years 41 weeks ago. Offline
Joined: 17 Jun 2009
Posts: 23

Hi Guys,

I'm having a problem deleting projects inside primavera. Im using P6.2.1 Im deleting this because I want to create disk space inside the Data Base. the event code PRMDB-3725-4 keeps popping up everytime I try to delete existing projects and it even comes to the point that I cant even delete group of activities inside an existing programme. The event description is (PRM DBAccess Error: Database Server Error: Could not allocate space for object 'dbo.REFRDEL'_'refrdel_table_pk' in database pmdb$primavera' filegroup is full Create diskspace by deleting unneedeed files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the file group). I have gone inside the primavera sql server studio and tried to enlarge the existing database capacity which is 4096 mb but it is saying that the cummulative total should not exceed 4096 mb.I have one existing database inside the MSQL Server which is pmdb$primavera and when I select properties the size is 4105.94 and space available is 0.17mb .Is there any way I can delete existing project backdoor I mean not inside primavera so I can select specific projects to be deleted? Does anyone have an idea regarding this problem. I could not delete or add any project. Your help would be very much appreciated

Regards,

Glenn

Replies

Greg Parker
User offline. Last seen 11 years 10 weeks ago. Offline
Joined: 9 May 2013
Posts: 3
Groups: None

Old topic, I know, but I just had a user with this issue so I thought I'd post how I fixed.  Andrew, I got same error as Glenn on that command, but I took a look at it and got it working;

USE pmdb$primavera
declare @pret_val int, @pret_msg varchar(1000)
EXEC project_delete PROJECT-ID-HERE, @pret_val output, @pret_msg output, 0

However, as the primary database is full, you cannot process that straight away.  You have to make space first.  I tried a shrink, didn't help.  So, I ran an index defrag, using the script at the bottom of this page: http://msdn.microsoft.com/en-us/library/ms177571.aspx then ran a shrink, and that gave me 400mb to work with.  Now, I was able to run through the proj_id list I had and remove all the unused unwanted projects.  Afterwards re-ran the defrag and shrink, and now sitting at a happy 3gb and user is happy with speed/performance changes.

Greg Parker
User offline. Last seen 11 years 10 weeks ago. Offline
Joined: 9 May 2013
Posts: 3
Groups: None

-- double post

Glenn Dexter Ubaldo
User offline. Last seen 11 years 41 weeks ago. Offline
Joined: 17 Jun 2009
Posts: 23

Dear Ahmed,

Thanks for your reply, Actually I had increased the size of the database already, but although I had increased it, the space available did not change Im only left with 0.17mb of space and the event mentioned in my first post keeps popping up once I delete any existing project and even when I try to delete activities inside an existing project.

Regards,
Glenn

Ahmed Elassal
User offline. Last seen 11 years 22 weeks ago. Offline
Joined: 26 Apr 2008
Posts: 14

Dear Glenn,

                can you try to go to SQL server then  primavera database properties then files you will find the database file size , increase it.

 

Regards

Ahmed Elassal

Glenn Dexter Ubaldo
User offline. Last seen 11 years 41 weeks ago. Offline
Joined: 17 Jun 2009
Posts: 23

Hello Andrew,

Thanks for your reply, I have already executed the query but it is saying that "Mag 137, State 2, Line 1

Must declare the variable '@pret_val'. " I dont have any background in programming so I dont understand

the comment and I dont know what to do. I have already located the project IDs which I wanted to delete.

I would very much appreciate if you could help me on this matter.

Regards,

Glenn

Andrew Podolny
User offline. Last seen 1 year 1 week ago. Offline
Joined: 16 Nov 2004
Posts: 130

The only thing that came to me is to call stored procedure with project id.

 

Step 1: Get project id you want to delete from table dbo.PROJECT (field ‘proj_id’)

 

Step 2: Create new query and execute

         declare @pret_val integer, @pret_msg varchar(1000)

         USE pmdb$primavera        -- the name of db may be different in your case

         GO

         EXEC dbo.project_delete 50,@pret_val output, @pret_msg output, 0

         END

 

The 50 – is your project id number. So you have to put your value instead of 50 :-)

Don’t forget to backup db before doing this!

Regards,

Andrew