Permissions needed for Applying SQL Tuning Sets/SQL Plans 11g?
What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
The user has:
ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
If more information is needed in order to respond please advise.
Thank you
What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
The user has:
ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
If more information is needed in order to respond please advise.
Thank you
Similar Messages
-
A hypothetical question came up between dbas in the office. We regularly take tuning sets before making significant changes on the DB. Populate from cache. Great little way of checking to see if anything changed. Someone asked if a table T1 was accessed during a given day where we had a tuning set being populated from the cache (no reason for auditing to be on at the time). Well first thing to do is search the sql_statements
select * from DBA_SQLSET_STATEMENTS
where sqlset_name = 'my_sts'
and sql_text like '%select * from t1%'
but no rows returned, so next idea is to query the plan in case a synonym was used
select * from DBA_SQLSET_PLANS
where sqlset_name = 'my_sts'
and object_name = 'T1'
And yes, its there we had a select against the table, the main sql_text in the dba_sqlset_statments view was using a synonym. great, so now we might be able to use this as a alternative audit method (mmv depending on whether you have the diag pack).
Heres the question, can we always be guaranteed an object will be in a plan?Dom Brooks wrote:
Also, the presence of a SQL statement in the shared pool does not indicate it was run today - you'd need to check the relevant column, something like last_active_time.
More importantly, the absence of a SQL statement from the shared pool does not indicate that it was not run today.
Just that it's no longer in the shared pool.
I'm concious of that when running the populate, even in a busy period our pools last over an hour, with that in mind when Im populating my tuning set, I set the frequency to 10 minutes to poll the cache where distinct IDs and HASHes are overloaded in the tuning set if theyre already there.
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_sqltun.htm#CACJHDDC
Note that in production systems the time limit and repeat interval would be set much higher. You should tune the time_limit and repeat_interval parameters based on the workload time and cursor cache turnover properties of your system. -
ORA-13754: "SQL Tuning Set" "" does not exist for user "SYS"
While calling dbms_stats.seed_col_usage I got the following error. Can someone help me on how to resolve it
sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 14 14:37:38 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> show user
USER is "SYS"
SQL> begin
2 dbms_stats.seed_col_usage(null,null,400);
3 end;
4 /
begin
ERROR at line 1:
ORA-13754: "SQL Tuning Set" "" does not exist for user "SYS".
ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 17379
ORA-06512: at "SYS.DBMS_STATS", line 28451
ORA-06512: at line 2
Thank You
SarayuAccording to the documentation:
SEED_COL_USAGE ProcedureThis procedure iterates over the SQL statements in the specified SQL tuning set, compiles them and seeds column usage information for the columns that appear in these statements.
Syntax
DBMS_STATS.SEED_COL_USAGE (
sqlset_name IN VARCHAR2,
owner_name IN VARCHAR2,
time_limit IN POSITIVE DEFAULT NULL);>
It looks like you need to provide a SQLSET_NAME and OWNER_NAME to use this procedure correctly, to which you've provided NULLs. I don't see any exceptions in the documentation that indicate special processing when NULLs are provided. -
SQL tuning set for specific SQLID
Hi,
Is it possible to create SQL tuning set for specific SQLID's?
Advance thanks!do you have any code or some package to do this?As long as those statements are in AWR or the cursor cache then you can use
DBMS_SQLTUNE.SELECT_CURSOR_CACHE or
DBMS_SQLTUNE.SELECT_WORKLOAD_REPOSITORY For example something like this:
begin
DBMS_SQLTUNE.CREATE_SQLSET(
sqlset_name => 'my_tuning_set',
description => 'my tuning set');
end;
DECLARE
baseline_cursor DBMS_SQLTUNE.SQLSET_CURSOR;
BEGIN
OPEN baseline_cursor FOR
SELECT VALUE(p)
FROM TABLE(DBMS_SQLTUNE.SELECT_CURSOR_CACHE
(basic_filter => 'sql_id in (''1'',''2'',''3'')',
attribute_list => 'ALL'
)) p;
DBMS_SQLTUNE.LOAD_SQLSET(
sqlset_name => 'my_tuning_set',
populate_cursor => baseline_cursor);
END;
/ -
On a 10.2.0.4 database, is it possible to load SQL Tuning sets with SQL from a text file? I can't find anything in the documentation mentioning this but I could have simply missed it and this facility would be very useful to us.
Our reporting tool is MicroStrategy which operates by building lots of temporary tables: extracting the SQL via Top Activity EM page will put the CTAS statement into the tuning set which (I believe) is ignored by SQL Access Advisor - extracting the sql to a text file, editting to remove the "create table as" and executing in order to load the tuning set is very long winded for a set of queries - at least being able to load the tuning set directly with a set of SQL select statements directly from a text file would help significantly.
Many thanks for any advice
PeteI did not see a direct way to create the STS from a text file. From the docs:
"The standard sources for populating an STS are the workload repository, another STS, or the cursor cache"
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sql_tune.htm#i34915
But you could try a couple of things:
1) create one tuning task per statement, using DBMS_SQLTUNE.CREATE_TUNING_TASK, which can use plain text as input: http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sql_tune.htm#CHDJDHGE
2) create the STS with queries from cursor cache: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sqltun.htm#i1010615
Both approaches needs some PL/SQL programming, but it can be useful if you can identify your SQL statements some way.
Regards. -
Hi Experts
I have created a sql tuning set with all sqls from cursor cache referring table1. Now I have transported this sqlset to nonprod environment, now what I want to do is make table1 partitioned and test the impact. Instead of altering table1 I want create copy of table1 as partitioned table2. Is there a way I cancl change the sqls in my sqlset to refer to table2 in place of table1. So I basically want to update the sqls with table2 instead of table1. Is this possible and if yes how? If no any other way of doing it, sqlset has ~200 sqlsWhy ever not!
1. You create a new user with the appropriate privileges
2. Logon as the new user and create private synonmys (if public ones do not exist) for the objects you need to use
3. Either import a sql set or create a sqlset.
4. Create and execute an analysis task - this will be your baseline
5. Build test1 table as a partitioned table in the new schema - this will override the public synonym
6. Execute an analysis task - this will be your post change run
7. Compare results. -
I am hoping for a quick easy answer on this. grin
We have been generating a number of Sql Tuning Sets via Grid Control and now we want to export them. Of course, they all have these awful, non-descriptive names. How do we list them? I was unable to find any help in the "automatic SQL tuning" guide (Chapter 12) of the Performance Guide, and browsing the DBA_* and other fixed views has not revealed anything, yet.Does this help?
BANPROD_SQL > select id,name,owner,description,created from WRI$_SQLSET_DEFINITIONS order by 1 desc;
ID NAME OWNER DESCRIPTION CREATED
10 TUNING_SET_1141930799317 ORACLE Automatically generated by ADDM 09-MAR-06
9 TUNING_SET_1141921159123 ORACLE Automatically generated by ADDM 09-MAR-06
8 TUNING_SET_1141831053351 ORACLE Automatically generated by ADDM 08-MAR-06
7 TUNING_SET_1141826801391 ORACLE Automatically generated by ADDM 08-MAR-06
6 TOP_SQL_1141752418284 ORACLE Automatically generated by Top SQL 07-MAR-06
5 TOP_SQL_1141749589578 ORACLE Automatically generated by Top SQL 07-MAR-06
4 TOP_SQL_1141747575814 ORACLE Automatically generated by Top SQL 07-MAR-06
2 TOP_SQL_1141746930242 ORACLE Automatically generated by Top SQL 07-MAR-06
1 TUNING_SET_1141660362671 ORACLE Automatically generated by ADDM 06-MAR-06
9 rows selected. -
RAT - SQL Tuning Set from 9i trace in wrong order
Hi together
I want to test the impact of some staments on 9.2.0.8 in 11g with Real Application Testing, but the order in the tuning set seems to b wrong (not in the traced order). So i made a small Test Script who is creating a Table, insert Data with a loop and select all.
Steps :
* 9i enable trace level 4
* 9i run the script
* 9i stop the trace
* transfer to 11g
* make an sql tunnig set
* running in the Performance Analyzer Workflow
The first run Oracle makes performance datas from the trace files. In the second run I want to execute the statements from the tuning set in the 11g database. The traced Schema from 9i exists.
In the report after the second run I see the failure that the insert and select statement is not allowed. When i take a look in the SQL Tuning Set i see that the select and insert will be played before the create table ! Also on the view DBA_SQLSET_STATEMENTS.
Is there a way to get the correct order in the SQL Tuning Set like the statement order (create before insert,select) ? Or can Oracle not handle DDL-Statements in the trace ?
Regards MartinHi together
I want to test the impact of some staments on 9.2.0.8 in 11g with Real Application Testing, but the order in the tuning set seems to b wrong (not in the traced order). So i made a small Test Script who is creating a Table, insert Data with a loop and select all.
Steps :
* 9i enable trace level 4
* 9i run the script
* 9i stop the trace
* transfer to 11g
* make an sql tunnig set
* running in the Performance Analyzer Workflow
The first run Oracle makes performance datas from the trace files. In the second run I want to execute the statements from the tuning set in the 11g database. The traced Schema from 9i exists.
In the report after the second run I see the failure that the insert and select statement is not allowed. When i take a look in the SQL Tuning Set i see that the select and insert will be played before the create table ! Also on the view DBA_SQLSET_STATEMENTS.
Is there a way to get the correct order in the SQL Tuning Set like the statement order (create before insert,select) ? Or can Oracle not handle DDL-Statements in the trace ?
Regards Martin -
We have to inverstigate about a reporting solution where things are getting slow (may be material, database design, network matters).
I have red a lot in MSDN and some books about performance tuning on SQL Server 2008 R2 (or other) but frankly, I feel a little lost in all that stuff
I'am looking for practical steps in order to do the tuning. Someone had like a recipe for that : a success story...
My (brain storm) Methodology should follow these steps:
Resource bottlenecks: CPU, memory, and I/O bottlenecks
tempdb bottlenecks
A slow-running user query : Missing indexes, statistics,...
Use performance counters : there are many, can one give us the list of the most important
how to do fine tuning about SQL Server configuration
SSRS, SSIS configuration ?
And do the recommandations.
Thanks
"there is no Royal Road to Mathematics, in other words, that I have only a very small head and must live with it..."
Edsger W. DijkstraHello,
There is no clear defined step which can be categorized as step by step to performance tuning.Your first goal is to find out cause or drill down to factor causing slowness of SQL server it can be poorly written query ,missing indexes,outdated stats.RAM crunch
CPU crunch so on and so forth.
I generally refer to below doc for SQL server tuning
http://technet.microsoft.com/en-us/library/dd672789(v=sql.100).aspx
For SSIS tuning i refer below doc.
http://technet.microsoft.com/library/Cc966529#ECAA
http://msdn.microsoft.com/en-us/library/ms137622(v=sql.105).aspx
When I face issue i generally look at wait stats ,wait stats give you idea about on what resource query was waiting.
--By Jonathan KehayiasSELECT TOP 10
wait_type ,
max_wait_time_ms wait_time_ms ,
signal_wait_time_ms ,
wait_time_ms - signal_wait_time_ms AS resource_wait_time_ms ,
100.0 * wait_time_ms / SUM(wait_time_ms) OVER ( )
AS percent_total_waits ,
100.0 * signal_wait_time_ms / SUM(signal_wait_time_ms) OVER ( )
AS percent_total_signal_waits ,
100.0 * ( wait_time_ms - signal_wait_time_ms )
/ SUM(wait_time_ms) OVER ( ) AS percent_total_resource_waits
FROM sys.dm_os_wait_stats
WHERE wait_time_ms > 0 -- remove zero wait_time
AND wait_type NOT IN -- filter out additional irrelevant waits
( 'SLEEP_TASK', 'BROKER_TASK_STOP', 'BROKER_TO_FLUSH',
'SQLTRACE_BUFFER_FLUSH','CLR_AUTO_EVENT', 'CLR_MANUAL_EVENT',
'LAZYWRITER_SLEEP', 'SLEEP_SYSTEMTASK', 'SLEEP_BPOOL_FLUSH',
'BROKER_EVENTHANDLER', 'XE_DISPATCHER_WAIT', 'FT_IFTSHC_MUTEX',
'CHECKPOINT_QUEUE', 'FT_IFTS_SCHEDULER_IDLE_WAIT',
'BROKER_TRANSMITTER', 'FT_IFTSHC_MUTEX', 'KSOURCE_WAKEUP',
'LAZYWRITER_SLEEP', 'LOGMGR_QUEUE', 'ONDEMAND_TASK_QUEUE',
'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT', 'BAD_PAGE_PROCESS',
'DBMIRROR_EVENTS_QUEUE', 'BROKER_RECEIVE_WAITFOR',
'PREEMPTIVE_OS_GETPROCADDRESS', 'PREEMPTIVE_OS_AUTHENTICATIONOPS',
'WAITFOR', 'DISPATCHER_QUEUE_SEMAPHORE', 'XE_DISPATCHER_JOIN',
'RESOURCE_QUEUE' )
ORDER BY wait_time_ms DESC
use below link to analyze wait stats
http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/
HTH
PS: for reporting services you can post in SSRS forum
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
A SQL tuning issue-sql runs much slower in test than in production?
Hi Buddies,
I am working on a sql tuning issue. A sql runs much slower in test than in production.
I compared the two explain plans in test and production
seems in test, CBO refuses to use index SUBLEDGER_ENTRY_I2.
we rebuile it and re-gether that index statistcs. run, still slow..
I compared the init.ora parameters like hash_area_size, sort_area_size in test, they are same as production.
I wonder if any expert friend can show some light.
in production,
SQL> set autotrace traceonly
SQL> SELECT rpt_horizon_subledger_entry_vw.onst_offst_cd,
2 rpt_horizon_subledger_entry_vw.bkng_prd,
3 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
4 rpt_horizon_subledger_entry_vw.jrnl_id,
5 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
6 rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
7 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
8 rpt_horizon_subledger_entry_vw.crprt_melob_cd AS corp_mlb_cd,
rpt_horizon_subledger_entry_vw.onst_offst_cd, SUM (amt) AS amount
9 10 FROM rpt_horizon_subledger_entry_vw
11 WHERE rpt_horizon_subledger_entry_vw.bkng_prd = '092008'
12 AND rpt_horizon_subledger_entry_vw.jrnl_id = 'RCS0002100'
13 AND rpt_horizon_subledger_entry_vw.systm_afflt_cd = 'SAFF01'
14 GROUP BY rpt_horizon_subledger_entry_vw.onst_offst_cd,
15 rpt_horizon_subledger_entry_vw.bkng_prd,
16 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
17 rpt_horizon_subledger_entry_vw.jrnl_id,
18 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
19 rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
20 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
21 rpt_horizon_subledger_entry_vw.crprt_melob_cd,
22 rpt_horizon_subledger_entry_vw.onst_offst_cd;
491 rows selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=130605 Card=218764 B
ytes=16407300)
1 0 SORT (GROUP BY) (Cost=130605 Card=218764 Bytes=16407300)
2 1 VIEW OF 'RPT_HORIZON_SUBLEDGER_ENTRY_VW' (Cost=129217 Ca
rd=218764 Bytes=16407300)
3 2 SORT (UNIQUE) (Cost=129217 Card=218764 Bytes=35877296)
4 3 UNION-ALL
5 4 HASH JOIN (Cost=61901 Card=109382 Bytes=17719884)
6 5 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_ACCNT'
(Cost=2 Card=111 Bytes=3774)
7 5 HASH JOIN (Cost=61897 Card=109382 Bytes=14000896
8 7 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACC
OUNT' (Cost=2 Card=57 Bytes=1881)
9 7 HASH JOIN (Cost=61893 Card=109382 Bytes=103912
90)
10 9 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cost=
34 Card=4282 Bytes=132742)
11 9 HASH JOIN (Cost=61833 Card=109390 Bytes=7000
960)
12 11 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGE
R_ENTRY' (Cost=42958 Card=82076 Bytes=3611344)
13 12 INDEX (RANGE SCAN) OF 'SUBLEDGER_ENTRY_I
2' (NON-UNIQUE) (Cost=1069 Card=328303)
14 11 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_
LINK' (Cost=14314 Card=9235474 Bytes=184709480)
15 4 HASH JOIN (Cost=61907 Card=109382 Bytes=18157412)
16 15 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_ACCNT'
(Cost=2 Card=111 Bytes=3774)
17 15 HASH JOIN (Cost=61903 Card=109382 Bytes=14438424
18 17 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACC
OUNT' (Cost=2 Card=57 Bytes=1881)
19 17 HASH JOIN (Cost=61899 Card=109382 Bytes=108288
18)
20 19 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cost=
34 Card=4282 Bytes=132742)
21 19 HASH JOIN (Cost=61838 Card=109390 Bytes=7438
520)
22 21 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGE
R_ENTRY' (Cost=42958 Card=82076 Bytes=3939648)
23 22 INDEX (RANGE SCAN) OF 'SUBLEDGER_ENTRY_I
2' (NON-UNIQUE) (Cost=1069 Card=328303)
24 21 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_
LINK' (Cost=14314 Card=9235474 Bytes=184709480)
Statistics
25 recursive calls
18 db block gets
343266 consistent gets
370353 physical reads
0 redo size
15051 bytes sent via SQL*Net to client
1007 bytes received via SQL*Net from client
34 SQL*Net roundtrips to/from client
1 sorts (memory)
1 sorts (disk)
491 rows processed
in test
SQL> set autotrace traceonly
SQL> SELECT rpt_horizon_subledger_entry_vw.onst_offst_cd,
2 rpt_horizon_subledger_entry_vw.bkng_prd,
3 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
4 rpt_horizon_subledger_entry_vw.jrnl_id,
5 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
6 7 rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
8 rpt_horizon_subledger_entry_vw.crprt_melob_cd AS corp_mlb_cd,
9 rpt_horizon_subledger_entry_vw.onst_offst_cd, SUM (amt) AS amount
10 FROM rpt_horizon_subledger_entry_vw
11 WHERE rpt_horizon_subledger_entry_vw.bkng_prd = '092008'
12 AND rpt_horizon_subledger_entry_vw.jrnl_id = 'RCS0002100'
AND rpt_horizon_subledger_entry_vw.systm_afflt_cd = 'SAFF01'
13 14 GROUP BY rpt_horizon_subledger_entry_vw.onst_offst_cd,
15 rpt_horizon_subledger_entry_vw.bkng_prd,
16 rpt_horizon_subledger_entry_vw.systm_afflt_cd,
17 rpt_horizon_subledger_entry_vw.jrnl_id,
18 rpt_horizon_subledger_entry_vw.ntrl_accnt_cd,
rpt_horizon_subledger_entry_vw.gnrl_ldgr_chrt_of_accnt_nm,
rpt_horizon_subledger_entry_vw.lgl_entty_brnch_cd,
rpt_horizon_subledger_entry_vw.crprt_melob_cd,
rpt_horizon_subledger_entry_vw.onst_offst_cd; 19 20 21 22
no rows selected
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=92944 Card=708 Bytes
=53100)
1 0 SORT (GROUP BY) (Cost=92944 Card=708 Bytes=53100)
2 1 VIEW OF 'RPT_HORIZON_SUBLEDGER_ENTRY_VW' (Cost=92937 Car
d=708 Bytes=53100)
3 2 SORT (UNIQUE) (Cost=92937 Card=708 Bytes=124962)
4 3 UNION-ALL
5 4 HASH JOIN (Cost=46456 Card=354 Bytes=60180)
6 5 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACCOU
NT' (Cost=2 Card=57 Bytes=1881)
7 5 NESTED LOOPS (Cost=46453 Card=354 Bytes=48498)
8 7 HASH JOIN (Cost=11065 Card=17694 Bytes=1362438
9 8 HASH JOIN (Cost=27 Card=87 Bytes=5133)
10 9 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cos
t=24 Card=87 Bytes=2175)
11 9 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_
ACCNT' (Cost=2 Card=111 Bytes=3774)
12 8 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_LI
NK' (Cost=11037 Card=142561 Bytes=2566098)
13 7 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGER_EN
TRY' (Cost=2 Card=1 Bytes=60)
14 13 INDEX (UNIQUE SCAN) OF 'SUBLEDGER_ENTRY_PK'
(UNIQUE) (Cost=1 Card=1)
15 4 HASH JOIN (Cost=46456 Card=354 Bytes=64782)
16 15 TABLE ACCESS (FULL) OF 'SUBLEDGER_CHART_OF_ACCOU
NT' (Cost=2 Card=57 Bytes=1881)
17 15 NESTED LOOPS (Cost=46453 Card=354 Bytes=53100)
18 17 HASH JOIN (Cost=11065 Card=17694 Bytes=1362438
19 18 HASH JOIN (Cost=27 Card=87 Bytes=5133)
20 19 TABLE ACCESS (FULL) OF 'HORIZON_LINE' (Cos
t=24 Card=87 Bytes=2175)
21 19 TABLE ACCESS (FULL) OF 'GNRL_LDGR_CHRT_OF_
ACCNT' (Cost=2 Card=111 Bytes=3774)
22 18 TABLE ACCESS (FULL) OF 'HORIZON_SUBLEDGER_LI
NK' (Cost=11037 Card=142561 Bytes=2566098)
23 17 TABLE ACCESS (BY INDEX ROWID) OF 'SUBLEDGER_EN
TRY' (Cost=2 Card=1 Bytes=73)
24 23 INDEX (UNIQUE SCAN) OF 'SUBLEDGER_ENTRY_PK'
(UNIQUE) (Cost=1 Card=1)
Statistics
1134 recursive calls
0 db block gets
38903505 consistent gets
598254 physical reads
60 redo size
901 bytes sent via SQL*Net to client
461 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
34 sorts (memory)
0 sorts (disk)
0 rows processed
Thanks a lot in advance
JerryHi
Basically there are two kinds of tables
- fact
- lookup
The number of records in a lookup table is usually small.
The number of records in a fact table is usually huge.
However, in test systems the number of records in a fact table is often also small.
This results in different execution plans.
I notice again you don't post version and platform info, and you didn't make sure your explain is properly idented
Please read the FAQ to make sure it is properly idented.
Also using the word 'buddies' is as far as I am concerned nearing disrespect and rudeness.
Sybrand Bakker
Senior Oracle DBA -
Local NTFS permissions needed for Palm software?
Does anyone know the NTFS permissions needed on the local computer for a standard user to run the Palm software?
Post relates to: Palm TXHello Cajuntank and welcome to the Palm forums.
Palm Desktop needs to be installed with the local administrator priviledge during the install of Palm Desktop, the HotSync Manager, the first HotSyn sync, and the installation of any third-party conduits on the desktop.
After that, the local admin rights can be revoked.
Alan G -
Permissions needed for sql server job to execute stored procedure on linked server?
Hi all
I have a job step which attempts to call a stored procedure on a linked server.
This step is failing with a permission denied error. How can I debug or resolve this?
The job owner is sysadmin on both servers so should have execute permission to the database/proc I'm calling, right?
The error is:
The EXECUTE permission was denied on the object 'myProc', database 'myDatabase', schema 'dbo'. [SQLSTATE 42000] (Error 229). The step failed.
My code is:
EXEC [LinkedServer].myDatabase.dbo.myProc
Also tried:
SELECT * FROM OPENQUERY([LinkedServer], 'SET FMTONLY OFF EXEC myDatabase.dbo.myProc')
With the same result.
Any help appreciated.The job owner may be sysadmin on the remote server. The service account for SQL Server Agent may not. And it is the latter that counts, since the it the service accounts that logs in and impersonates the job owner. But the impersonation inside SQL Server
does not count much in Windows, and it is through Windows connection is made to the other site.
One way to resolve this is to set up a login mapping for the job owner. The login mapping must be for an SQL login on the remote server.
You can verify the theory, but running this query from the job:
SELECT * FROM OPENQUERY([LinkedServer], 'SELECT SYSTEM_USER')
By the way, putting SET FMTONLY OFF in OPENQUERY is a terrible idea. This has the effect that the procedure is executed twice. (Unless both servers are SQL 2012 or higher in which case FMTONLY has no effect at all.)
Erland Sommarskog, SQL Server MVP, [email protected] -
Hi,
I have a partioned table.I am spooling output of an sql which joins the partioned table and another referece table of minimal data.
each partion except 3 contains 5 milllion records on average
othere 3 partitions has 6.6 million records (each one).
The sql takes 3 mins if it is triggered against the partions with 5 million but
the same sql is taing 8 hrs if it is triggered against the partion with 6.5 million.
Please help me how can avoid this performace issue
Below are IO statistics for the two cases
(partion with 6.5 million)
BLOCK_GETS=9
CONSISTENT_GETS=89533761
PHYSICAL_READS=15746
(partion with 5.0 million)
BLOCK_GETS=8
CONSISTENT_GETS=1215131
PHYSICAL_READS=28848Hi,
post the select for the 2 SQL's and the EXPLAIN for each. -
Permissions needed for mobile account file sync
Hello,
I have set up my account as mobile account in an AD domain.
When FileSync syncs the files automatically, then I often get errors as follows:
File xyz could not be synced.
Permission denied.
What permissions does FileSync need to work correctly?
Regards
FlorianSCOM Action account does not required to be local administator of agent machine
The action account is used to gather information about, and run responses on, the managed computer (a managed computer being either a management server or a computer with an agent installed). The MonitoringHost.exe processes run under the action account or
a specific Run As account.
You may use local system or domain account for agent action account.
For Domain user agent's action account, you can use a low-privileged account by ensurin that the account have the following minimum privileges:
• Member of the local Users group
• Member of the local Performance Monitor Users group
•“Allow log on locally” permission (SetInteractiveLogonRight)
https://technet.microsoft.com/en-us/library/hh212808.aspx
Roger -
Permissions needed for user to define workflow variable
Hi all
im using a workflow on sharepoint designer 2007, running on list of customer orders. the workflow is trying to use data from customer list.
In the workflow i used the "define workflow variable" step on customer order list. the users who are using the order list have Contribute permission so they can add items. on the customer list they have read permission.
when an item is created, the workflow is suppose to generate the varieble by combining data from the two lists: selecting the customer from the current order item and suppose to combine it with data from the customer list for that specific customer
and keeps it in the variable.
for users with full control permission for the site, the workflow is completed ok. for the users with the contribute and read permissions it ends with an error and doesnt store the variable (i cheked it by storring the variables in the workflow history).
what are the permission needed to manage to do the action of storring the variable?
or any other ideas for the error?
Thanks in advanceHello Cajuntank and welcome to the Palm forums.
Palm Desktop needs to be installed with the local administrator priviledge during the install of Palm Desktop, the HotSync Manager, the first HotSyn sync, and the installation of any third-party conduits on the desktop.
After that, the local admin rights can be revoked.
Alan G
Maybe you are looking for
-
Can I recover data from a flash drive that is no longer readable?
A flash drive that I left plugged into my MacBook Pro is no longer readable. Are there ways to recover the files that were (are?) stored there?
-
External Mounted Hard Drive Icon Not Showing on Desktop nor on Sidebar
Bonjour, I have a portable drive that does NOT show up in the Sidebar nor on the Desktop. The only way I can see and navigate through it is by clicking in Disk Utility > Mount Point: <hyper-link> Then hard drive icon and its content show up fine. But
-
ITUNES Failure - Song download interuption - Windows XP
Installed ITUNES for Windows XP. Established ITUNES account. Purchased an albumn for download. First three tunes downloaded, then went into "processing" phase. I let this processing continue for ~5 minutes before manually shutting down the applicatio
-
Skype chat window suddenly turned portrait mode
I was chatting with my friend, and I tapped my trackpad a few times, then my chat window suddenly turned into a portrait-like mode. I'm not sure if this is a glitch, or if it's just a feature I don't know about. I can't figure out how to get it back
-
Hello, I just installed CR 2008 "Crystal Reports 2008 Fix Pack 3.3 - Redist Install" for the first time on a test box to try out my distribution. I was suprised to see that the DLLs were not installed in the GAC (they are for prior versions of CR) Di