Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • find the files that are 1 day old. Linux/Unix
  • arch_configUOCIOTTO.ora Oracle
  • DB Console Mainenance. Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • adding new line after specific pattern using sed Linux/Unix
  • Order by with ROWNUM Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • Find Plan Hash value fphv.sql Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • Insert cause enqueue locks Oracle
  • set_env_dba 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

  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • Finding locked objects Oracle
  • Explain Plan Output 2 Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry 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)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (395)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • Good Link from metalink 1 Oracle
  • myfile Oracle
  • normal maintenance for exp-imp and renaming table Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • When to rebuld B-tree index Oracle
  • All About Trace Fils Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme