Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Wait Based Tuning Step by step with SQL statement Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • To find all disk io ( EMC as well as local) Linux/Unix
  • 284785.1 How to check RAC Option is currently linked into the Oracle Binary Oracle
  • switchover for primary database Oracle
  • Monitor and Trace Unix processes using truss Linux/Unix
  • replace alphabets using sed Linux/Unix
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • oracle Dba site Oracle
  • Physical Standby switchover with session active Oracle
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • Unix command for system configuration Linux/Unix
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • SQL Server Vs Oracle Architecture difference SQL Server
  • Python class import from different folders Python/PySpark

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

  • Proc Compilation Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • ORA-3136 Oracle
  • Oracle Support Metalink ID 161818.1 Oracle
  • plan10g.sql good1 Oracle
  • executing Function from SQLPLUS prompt Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • 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.sql23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Find_planinfo.sql Oracle
  • Proc code Oracle
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • Wait time tuning research Oracle
  • proc.sql Oracle
  • When to rebuld B-tree index Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme