Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Running select from V$ views from remote server Linux/Unix
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • Histogram Overview Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • Rman Notes -1 Oracle
  • How does one overcome the Unix 2 Gig file limit? Linux/Unix
  • switchover for primary database Oracle
  • Jai Shree Ram Oracle
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • S3 Basic info AWS
  • Check Oracle installed products using one command Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • To see how much time or progress of long transaction Oracle
  • Processes parameter and its dependencies on OS kernel parameters Linux/Unix
  • longtx.sql Oracle

DBMS_SQL for alter session.

Posted on 07-Jan-2009 By Admin No Comments on DBMS_SQL for alter session.

SQL>

SQL> CREATE OR REPLACE PROCEDURE AlterSession(

2 p_SessionString IN VARCHAR2) AS

3

4 v_CursorID INTEGER;

5 v_Dummy INTEGER;

6 BEGIN

7 v_CursorID := DBMS_SQL.OPEN_CURSOR;

8

9 DBMS_SQL.PARSE(v_CursorID, p_SessionString, DBMS_SQL.NATIVE);

10 v_Dummy := DBMS_SQL.EXECUTE(v_CursorID);

11 END AlterSession;

12 /

Procedure created.

SQL>

SQL> column sysdate format a30

SQL> SELECT SYSDATE FROM dual;

SYSDATE

——————————

Jun 19, 2008 20:38:44

1 row selected.

SQL>

SQL> DECLARE

2 sqlString VARCHAR2(100);

3 BEGIN

4 sqlString := ‘ALTER SESSION SET NLS_DATE_FORMAT = ‘ ||

5 ”’Mon DD, YYYY HH24:MI:SS”’;

6 AlterSession(sqlString);

7 END;

8 /

PL/SQL procedure successfully completed.

SQL>

SQL> SELECT SYSDATE FROM dual;

SYSDATE

——————————

Jun 19, 2008 20:38:44

1 row selected.

SQL>

Oracle, SQL scripts

Post navigation

Previous Post: get_vmstat_linux
Next Post: Sequence Resetting

Related Posts

  • Export With Query Another Example. Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • Database link password in user_db_links Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • Library cahe Latches and internal explaination Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AMC10 (0)
  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (150)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (151)
  • SQL scripts (349)
  • SQL Server (6)
  • Uncategorized (9)
  • Videos (0)

Recent Posts

  • Tutornet.US — Source of excellent learning14-Oct-2026
  • OCI Infrastructure Patching14-Oct-2026
  • Free API credits for AI models14-Oct-2026
  • AMC1020-Sep-2026
  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sh23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • runsql_once.ksh Linux/Unix
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • pvm_pre_change.sql Oracle
  • Finding locked objects Oracle
  • find checksum of a file. Linux/Unix
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • UNderstand and eliminate Latch contention. Oracle
  • V$transaction notes for finding XID composition. Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme