How-To Document
How-To Run with Policies and Set Date Formats

Date: 13-MAR-2006

This How-To details how to apply policies and set date formats to your connection when using Oracle SQL Developer.

Policies
  • Startup SQL Developer.
  • From within the Connections navigator, click the + to the left of your desired Connection. This will expand the connection to display the object types within and will also open a SQL Worksheet on the right against the selected connection.
  • Within the SQL Worksheet, enter your policy execution statement(s) in the SQL Worksheet (such as fnd_global.apps_initialize).
  • Click Execute Statement (if just one line of code) or Run Script (if multiple commands) .

Your policies are now set for that connection. The same session is used for all actions for a specified connection (navigating Connections, running reports and using the SQL Worksheet). Using the Connection navigation to view Tables and the data within those tables plus issuing SQL and PL/SQL commands in a SQL Worksheet will use your policies. If you disconnect or exit the tool and startup again you will need to perform these actions again.

Date Formats
  • Startup SQL Developer.
  • From within the Connections navigator, click the + to the left of your desired Connection. This will expand the connection to display the object types within and will also open a SQL Worksheet on the right against the selected connection.
  • Within the SQL Worksheet, enter your desired date format such as:
  • alter session set nls_date_format = 'MM/DD/YYYY';

    or

    alter session set nls_date_format = 'MM/DD/YYYY HH24:MI:SS';

  • Click Execute Statement (if just one line of code) or Run Script (if multiple commands) .
  • Your date format is now set for that connection. As mentioned above, the same session is used for all actions against a specified connection. If you disconnect or exit the tool and startup again you will need to perform these actions again. More information on NLS Parameters can be found within the SQL Developer help text, Help > Table of Contents > Working in a Global Environment > Setting up the Globalization Support Environment > Setting NLS Parameters.

    Discuss this how-to in the OTN Oracle SQL Developer Forum.