Solved

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

Posted on 2002-07-01
4
652 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.

Join & Write a Comment

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now