Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Renaming the column name Oracle
  • T-SQL Vs PL/SQL Syntax SQL Server
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • Jai Shree Ram Oracle
  • check_copy_progress.sh Linux/Unix
  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • Jai Shree Ram Linux/Unix
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • tblwopk.sql /* Find Tables Without PK */ Oracle
  • Finding locked objects Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • RAC with RHEL4 and 11g Oracle
  • Search and replace pattern Linux/Unix

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

  • Find all users who have DML privileges Oracle
  • Good Link from metalink 1 Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • Jai Shree Ram Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server 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 (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • 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
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • V$transaction notes for finding XID composition. Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • Committing distributed transaction using commit force Oracle
  • Check Oracle installed products using one command Oracle
  • Find Plan Hash value fphv.sql Oracle
  • shutdown linux Linux/Unix
  • TOP-N Sql to find Nth max or Top N rows Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme