Welcome Guest Donate | Search | Active Topics | Members | Log In | Register

Oracle Database and PL/SQL Tips and Techniques Options
lingy
Posted: Friday, July 30, 2010 2:26:20 PM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

Listing all built-in Oracle functions

You can see all built-in Oracle functions with the following PL/SQL query:

select distinct object_name
from all_arguments
where package_name = 'STANDARD'
order by object_name asc;
Sponsor
Posted: Friday, July 30, 2010 2:26:20 PM


lingy
Posted: Friday, July 30, 2010 2:45:22 PM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

Listing all accessible Oracle packages

The following PL/SQL statement lists all accessible Oracle packages and its status:

SELECT DISTINCT OWNER, OBJECT_NAME, STATUS

FROM ALL_OBJECTS
WHERE OBJECT_TYPE ='PACKAGE'

ORDER BY OWNER, OBJECT_NAME
lingy
Posted: Tuesday, August 17, 2010 11:12:06 PM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

iSQL*Plus Architecture

iSQL*Plus is a browser-based interface to SQL*Plus. iSQL*Plus is a component of the SQL*Plus product, and it enables you to use a Web browser to connect to Oracle9i or later and perform the same actions that you would otherwise perform through the command line version of SQL*Plus.

iSQL*Plus uses a three-tier architectural model:

Client tier: The iSQL*Plus user interface, typically a Web browser
Middle tier: The iSQL*Plus Server, Oracle Net, and Oracle HTTP Server
Database tier: Oracle9i or later

 

To log into iSQL*Plus, perform the following:

  1. Make sure your Oracle HTTP Server is running.
  2. Enter http://<hostname>:7778/isqlplus into your Web browser's Address or Location field.
  3. The iSQL*Plus login page is displayed. Log in as hr with a connect string of orcl. Note that the hr user has access to the HR schema (one of the sample schemas).

lingy
Posted: Tuesday, August 17, 2010 11:12:52 PM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

Why iSQL*Plus is not reachable?

After an Oracle 10g installation everything works fine, including iSQL*Plus. But now the iSQL*Plus is not reachable in a web browser.

Solution

The iSQL*Plus Application Server must be running on the middle tier before you can start an iSQL*Plus session. A command-line utility and a Windows Service are supplied to start and stop iSQL*Plus on Windows.

The iSQL*Plus Application Server is started by default during Oracle Database installation.

To Start the iSQL*Plus Application Server on Unix

  1. Start a terminal session.

  2. Enter

    $ORACLE_HOME/bin/isqlplusctl start
    

    The iSQL*Plus Application Server is started.

To Start the iSQL*Plus Application Server on Windows

  1. Select Services from the Start > Programs > Administrative Tools menu.

  2. Locate the iSQL*Plus Windows Service, OracleOracleHomeNameiSQL*Plus.

  3. Start the Windows Service.

Alternatively, you can start iSQL*Plus from a command prompt.

To Start iSQL*Plus Application Server from a Command Prompt

  1. Start a command prompt session.

  2. Enter

    %ORACLE_HOME%\bin\isqlplusctl start
    

    The iSQL*Plus Application Server is started.

To Test If the iSQL*Plus Application Server Has Started Correctly

  1. Enter the iSQL*Plus URL in your web browser. The iSQL*Plus URL is in the form:

    http://machine_name:5560/isqlplus/
    

    iSQL*Plus uses HTTP port 5560 by default. If iSQL*Plus is not available on port 5560, read the $ORACLE_HOME/install/portlist.ini file to find the port on which iSQL*Plus is running.

  2. Enter one of the following URLs from a web browser on the machine running the iSQL*Plus Application Server if you do not know the iSQL*Plus URL:

    http://127.0.0.1:5560/isqlplus/
    http://localhost:5560/isqlplus/
lingy
Posted: Tuesday, August 17, 2010 11:13:34 PM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

What is the default ports for iSQL*Plus and enterprise manager in Oracle 10g?

You can find those default ports inforamtion in the following configuration file:

{ORACLE_HOME}\db_1\install\portlist.ini

Usually, the default port number for iSQL*Plus is 5560:

http://localhost:5560/isqlplus/dynamic

And the default port number for Oracle enterprise manager is 5500:

http://localhost:5500/em
lingy
Posted: Wednesday, August 18, 2010 10:46:14 AM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

VSize Function

In Oracle/PLSQL, the vsize function returns the number of bytes in the internal representation of an expression.

select vsize('Tech on the net') from dual

It would return 15

select vsize('Tech on the net ') from dual

It would return 16

select vsize(1234567890123456789012345678901234567890) from dual

It would return 21

lingy
Posted: Wednesday, August 18, 2010 10:50:01 AM

Rank: Administration
Groups: Administration , Member

Joined: 5/8/2009
Posts: 1,576
Points: 5,631

Number vs. Number(n)

number(n) is a number with a constraint and edit.

create table t ( x number, y number(5) );

Table created.
insert into t values ( 123.456, 123.456 );

1 row created.
insert into t values ( 123.999, 123.999 );

1 row created.
insert into t values ( 12345, 12345 );

1 row created.
insert into t values ( 123456, 123456 );
insert into t values ( 123456, 123456 )
                               *
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column


select * from t;
         X          Y
---------- ----------
   123.456        123
   123.999        124
     12345      12345

See how the number(5) behaves?  5 digits, no decimals, rounded. 

The advantage is

a) you have 5 digits only, never more

b) you have no decimals, it is an integer type

consider it a constraint -- like a primary key, NOT NULL, check, whatever. 

If your data is such that the number should never be more then 5 digits, the only correct way to implement it would be as a number(5) .

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.


© 2010 Canaware Solutions. All rights reserved.
Powered by Canaware Forum version 2.4