Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • Find all users who have DML privileges Oracle
  • 10g oem configuration Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • chk_space_SID.ksh Linux/Unix
  • Parallel DML Oracle
  • How to hide author name in WordPress BLOG PHP/MYSQL/Wordpress
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • v$event_name Oracle
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • Create type and Grant on it. Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • All About Trace Fils 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

  • SQL_PROFILE – I explaination Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • Optimizer SORT Operations Oracle
  • Goldengate document from Porus Oracle
  • Jai Shree Ram Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • CPU speed on solaris Linux/Unix
  • Export Import with QUERY Oracle
  • executing Function from SQLPLUS prompt Oracle
  • Jai Shree Ram Oracle
  • RAC 11g with vmware Oracle
  • Rman Notes -1 Oracle
  • good note for shared pool tunnig Oracle
  • Unix command for system configuration Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme