The Guild of Project Controls - About | Career Path | Members | Sponsors | Join | Library | Submit Exam Question

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 2 years 10 weeks ago. Offline

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 1 year 31 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 1 year 31 weeks ago. Offline
Joined: 9 May 2013
Posts: 3
Groups: None

-- double post

Glenn Dexter Ubaldo
User offline. Last seen 2 years 10 weeks ago. Offline

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

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 2 years 10 weeks ago. Offline

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 15 weeks 1 day ago. Offline
Joined: 16 Nov 2004
Posts: 112

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