Oracle Primavera - PM6 Member for 16 years 10 months Member for 16 years 10 months Submitted by António Faria on Wed, 2009-02-25 06:35 Permalink RE: P6 Standalone - Excessive SQL lag? 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 Member for 20 years 11 months Member for 21 years Submitted by Andrew Podolny on Tue, 2009-02-24 12:38 Permalink RE: P6 Standalone - Excessive SQL lag? 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 Member for 18 years Member for 18 years Submitted by Isagani Culaway on Tue, 2009-02-24 03:24 Permalink RE: P6 Standalone - Excessive SQL lag? 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, Member for 17 years 5 months Member for 17 years 6 months Submitted by Arend Kok on Thu, 2009-02-19 17:25 Permalink RE: P6 Standalone - Excessive SQL lag? No Problem! Member for 21 years Member for 21 years 1 month Submitted by David Kelly on Thu, 2009-02-19 08:59 Permalink RE: P6 Standalone - Excessive SQL lag? Thanks Member for 17 years 5 months Member for 17 years 6 months Submitted by Arend Kok on Thu, 2009-02-19 08:48 Permalink RE: P6 Standalone - Excessive SQL lag? 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 Member for 21 years Member for 21 years 1 month Submitted by David Kelly on Wed, 2009-02-18 14:45 Permalink RE: P6 Standalone - Excessive SQL lag? Arend, You dont have a similar script for the full V5 on Oracle? Member for 17 years 5 months Member for 17 years 6 months Submitted by Arend Kok on Thu, 2009-02-12 19:26 Permalink RE: P6 Standalone - Excessive SQL lag? 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 Member for 18 years 10 months Member for 18 years 10 months Submitted by Dieter Wambach on Thu, 2009-02-12 12:40 Permalink RE: P6 Standalone - Excessive SQL lag? 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 Log in or register to post comments
Member for 16 years 10 months Member for 16 years 10 months Submitted by António Faria on Wed, 2009-02-25 06:35 Permalink RE: P6 Standalone - Excessive SQL lag? 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
Member for 20 years 11 months Member for 21 years Submitted by Andrew Podolny on Tue, 2009-02-24 12:38 Permalink RE: P6 Standalone - Excessive SQL lag? 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
Member for 18 years Member for 18 years Submitted by Isagani Culaway on Tue, 2009-02-24 03:24 Permalink RE: P6 Standalone - Excessive SQL lag? 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,
Member for 17 years 5 months Member for 17 years 6 months Submitted by Arend Kok on Thu, 2009-02-19 17:25 Permalink RE: P6 Standalone - Excessive SQL lag? No Problem!
Member for 21 years Member for 21 years 1 month Submitted by David Kelly on Thu, 2009-02-19 08:59 Permalink RE: P6 Standalone - Excessive SQL lag? Thanks
Member for 17 years 5 months Member for 17 years 6 months Submitted by Arend Kok on Thu, 2009-02-19 08:48 Permalink RE: P6 Standalone - Excessive SQL lag? 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
Member for 21 years Member for 21 years 1 month Submitted by David Kelly on Wed, 2009-02-18 14:45 Permalink RE: P6 Standalone - Excessive SQL lag? Arend, You dont have a similar script for the full V5 on Oracle?
Member for 17 years 5 months Member for 17 years 6 months Submitted by Arend Kok on Thu, 2009-02-12 19:26 Permalink RE: P6 Standalone - Excessive SQL lag? 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
Member for 18 years 10 months Member for 18 years 10 months Submitted by Dieter Wambach on Thu, 2009-02-12 12:40 Permalink RE: P6 Standalone - Excessive SQL lag? 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
Member for
16 years 10 monthsRE: P6 Standalone - Excessive SQL lag?
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
Member for
20 years 11 monthsRE: P6 Standalone - Excessive SQL lag?
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
Member for
18 yearsRE: P6 Standalone - Excessive SQL lag?
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,
Member for
17 years 5 monthsRE: P6 Standalone - Excessive SQL lag?
No Problem!
Member for
21 yearsRE: P6 Standalone - Excessive SQL lag?
Thanks
Member for
17 years 5 monthsRE: P6 Standalone - Excessive SQL lag?
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
Member for
21 yearsRE: P6 Standalone - Excessive SQL lag?
Arend,
You dont have a similar script for the full V5 on Oracle?
Member for
17 years 5 monthsRE: P6 Standalone - Excessive SQL lag?
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
Member for
18 years 10 monthsRE: P6 Standalone - Excessive SQL lag?
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