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 Standalone - Excessive SQL lag?

9 replies [Last post]
Eric Rivera
User offline. Last seen 6 years 51 weeks ago. Offline
Joined: 2 Jul 2008
Posts: 9
Groups: None
Hello all!
I am having an issue with P6 when working in a LOCAL database. When I open PM and select the database on my laptop (not the company server) and attempt to open any of the projects stored there, it seems to take FOREVER... When I look at my computer system resources, it shows SQL using over 1/2 the CPU.
EVENTUALLY the project(s) will open, sometimes after 30 minutes or more. Others tell me that they don’t have any lag at all.
Has anyone else had a simmilar experience, and if so, how did you over come it?

Thanks,
Eric

Replies

António Faria
User offline. Last seen 8 years 50 weeks ago. Offline
Joined: 5 Jan 2009
Posts: 40
Groups: None
You could also try this (update statistics in SQL Server Express):

http://www.planningplanet.com/forum/forum_post.asp?fid=1&Cat=8&Top=44886

It worked with me.

António
Andrew Podolny
User offline. Last seen 40 weeks 4 days ago. Offline
Joined: 16 Nov 2004
Posts: 130
Here is another script to reindex all tables with fill factor 90%:

USE pmdb$primavera --your database name might be different

DECLARE @TableName varchar(255)

DECLARE TableCursor CURSOR FOR
SELECT table_name FROM information_schema.tables
WHERE table_type = ’base table’

OPEN TableCursor

FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX(@TableName,’ ’,90)
FETCH NEXT FROM TableCursor INTO @TableName
END

CLOSE TableCursor

DEALLOCATE TableCursor
Isagani Culaway
User offline. Last seen 12 years 4 days ago. Offline
Joined: 23 Oct 2007
Posts: 9
Groups: None
good day,

Is anyone here knew how to install the P5 software cause my friend have one but we could not install the P5. May be anyone of you have an idea to install this and run it properly.

send me to my email if you know.
engr_gans@yahoo.com


Thanks,
Arend Kok
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 19 May 2008
Posts: 38
No Problem!
David Kelly
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 19 Oct 2004
Posts: 630
Thanks
Arend Kok
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 19 May 2008
Posts: 38
Hi David,

You can run this script to produce the script that will rebuild all indexes :

set head off pagesize 0 echo off verify off feedback off
spool reb.out
select ’alter session set sort_area_size = 36000000;’
from dual
/
select ’alter index ’ || index_name || ’ rebuild;’
from user_indexes
/
spool off
set head on pagesize 35 verify on feedback on
@@reb.out

Thanks to Guri Singh
Sr. Oracle DBA
David Kelly
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 19 Oct 2004
Posts: 630
Arend,

You don’t have a similar script for the full V5 on Oracle?
Arend Kok
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 19 May 2008
Posts: 38
Eric.

Have you tried rebuilding your indexes.
I run this script on my database regulary. It keeps it really fast.

Here it is :
DECLARE @Database VARCHAR(255)
DECLARE @Table VARCHAR(255)
DECLARE @cmd NVARCHAR(500)
DECLARE @fillfactor INT

SET @fillfactor = 90

DECLARE DatabaseCursor CURSOR FOR
SELECT name FROM master.dbo.sysdatabases
WHERE name NOT IN (’master’,’model’,’msdb’,’tempdb’,’distrbution’, ’mmdb$primavera’)
ORDER BY 1

OPEN DatabaseCursor

FETCH NEXT FROM DatabaseCursor INTO @Database
WHILE @@FETCH_STATUS = 0
BEGIN

SET @cmd = ’DECLARE TableCursor CURSOR FOR SELECT table_catalog + ’’.’’ + table_schema + ’’.’’ + table_name as tableName
FROM ’ + @Database + ’.INFORMATION_SCHEMA.TABLES WHERE table_type = ’’BASE TABLE’’’

-- create table cursor
EXEC (@cmd)
OPEN TableCursor

FETCH NEXT FROM TableCursor INTO @Table
WHILE @@FETCH_STATUS = 0
BEGIN

-- SQL 2000 command
--DBCC DBREINDEX(@Table,’ ’,@fillfactor)

-- SQL 2005 command
SET @cmd = ’ALTER INDEX ALL ON ’ + @Table + ’ REBUILD WITH (FILLFACTOR = ’ + CONVERT(VARCHAR(3),@fillfactor) + ’)’
EXEC (@cmd)

FETCH NEXT FROM TableCursor INTO @Table
END

CLOSE TableCursor
DEALLOCATE TableCursor

FETCH NEXT FROM DatabaseCursor INTO @Database
END
CLOSE DatabaseCursor
DEALLOCATE DatabaseCursor


All this will do is rebuild all indexes for all tables in your database.

Hope this helps.

Regards,
Arend Kok
Dieter Wambach
User offline. Last seen 6 years 52 weeks ago. Offline
Joined: 15 Jan 2007
Posts: 1350
Eric

Did you a backup and restore?
Did you run (in P6) Tools --> Check Project Integrity?
Did you check the event log?

I assume your pc has sufficient performance and your project below one million activities - or 4 GB.
Sorry just questions, no answer. It seems something wrong with the database.

Regards
Dieter