Solved

Pre-Compiler: how to execute an "alter session" statement?

Posted on 2002-07-01
4
659 Views
Last Modified: 2008-02-07
Oracle 7.3.3
PreCompiler: Pro Cobol

Does anyone remember how can I run this statement inside the ProCobol:

Alter session set sort_area_size=100000000;

I tried the following:
EXEC-SQL EXECUTE
  ALTER SESSION SET SORT_AREA_SIZE=100000000;
END EXEC


Iget the following compilation error:
UNDECLARE SQL IDENTIFIER "ALTER" at line...



Thanks
0
Comment
Question by:peledc
4 Comments
 

Expert Comment

by:rodchamberlin
ID: 7123319
Have you tried "EXECUTE IMMEDIATE":

EXEC-SQL EXECUTE IMMEDIATE "ALTER SESSION SET SORT_AREA_SIZE=100000000";
END EXEC

I don't know pro-cobol, but execute immediate usually just passes whatever string you put in quotes straight to the engine.
0
 
LVL 6

Expert Comment

by:M-Ali
ID: 7124056
Try,

EXEC SQL ALTER SESSION SET SORT_AREA_SIZE=100000000;

HTH

Ali
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8492240
PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question