cancel
Showing results for 
Search instead for 
Did you mean: 

What's wrong with the input value for the Alter session in ST04?

Former Member
0 Kudos

Hello Team,

Could you pls have a look and give some recommendation?

Accepted Solutions (0)

Answers (3)

Answers (3)

Reagan
Advisor
Advisor
0 Kudos

Hello

From the screenshot you are entering EVENTS but it should be EVENT and also I believe it should be ALTER SYSTEM and NOT alter session.

Never tried setting event from SAP.

Cheers

RB

Former Member
0 Kudos

Place text for events in single quotes:

'10046 TRACE NAME CONTEXT FOREVER,LEVEL 4'

Regards,

Roman

Former Member
0 Kudos

Hi Cai,

the reason:

ORA-02248, 00000, "invalid option for ALTER SESSION"

the command is sent to db as:

ALTER SESSION SET "EVENTS" = "10046 TRACE NAME CONTEXT FOREVER,LEVEL 4"

You can change the session parameter from db level:

SQL> alter session set events '10046 trace name context forever, level 4'

Regards,
Shahab

Former Member
0 Kudos

Hello Aziz,

Since I have no privilege to run in the DB level.

And SAP give us the tool but I don't know what's wrong with my input in ST04 Alter session which I have uploaded in the attachment?

Thanks,

Neil

former_member188883
Active Contributor
0 Kudos

Hi Neil,

Could you define the parameter value as shown below.

"'10046 TRACE NAME CONTEXT FOREVER,LEVEL 4'".

I have added a single quote in addition to the required double quotes. Problem could be Oracle is not able to distinguish the comman before LEVEL 4.

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Neil,

As far as I know the ST04 transaction is only for analysis and you are not able to activate db tracing from application level (that is the DBA task).

The alter session input is to analyze the change for SQL execution plan. See a short example at the end of the following blog:

http://scn.sap.com/people/jim.spath/blog/2009/04/10/indexes-lose-weight-but-is-that-the-answer

For instance, you can set the OPTIMIZER_DYNAMIC_SAMPLING to value 6 for your analysis. for this you enter "OPTIMIZER_DYNAMIC_SAMPLING" in first column and the value "6" in second column.

alter session set "OPTIMIZER_DYNAMIC_SAMPLING" = 6

For db tracing please refer to the followings:

http://www.dba-oracle.com/t_10046_limitations_shortcomings.htm

http://www.dba-oracle.com/t_10046_enable_trace.htm

http://psoug.org/reference/trace_tkprof.html

I hope this helps

Regards,

Shahab

former_member188883
Active Contributor
0 Kudos

Hi Neil,

Hope you were able to execute the alter session command as per our suggestions.

Regards,

Deepak Kori