Wednesday, August 5, 2009

How to determine a Solaris OS is 32 bits or 64 bits by using isainfo

isainfo command can be used to determine whether a Solaris system has 32–bit or 64-bit capabilities enabled.

Option

Note

Examples on SPARC system

Display the name or names of the native instruction sets for applications supported by the current OS version.

$ isainfo

sparcv9 sparc

-v

Prints detailed information about the other options

$ isainfo -v

64-bit sparcv9 applications
        vis2 vis
32-bit sparc applications
        vis2 vis v8plus div32 mul32

$ isainfo -v
32-bit sparc applications

-b

Prints the number of bits in the address space of the native instruction set.

$ isainfo -b

64

-n

Prints the name of the native instruction set used by portable applications supported by the current version of the OS.

$ isainfo -n

sparcv9

-k

Prints the name of the instruction set or sets that are used by the OS kernel components such as device drivers and STREAMS modules.

$ isainfo -k

sparcv9

Last updated: August 5, 2009

Tuesday, August 4, 2009

how to find who and what sql is using temp segments

For 8.1.7 to 9.2

SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text

FROM v$session a, v$sort_usage b, v$sqlarea c

WHERE a.saddr = b.session_addr

AND c.address= a.sql_address

AND c.hash_value = a.sql_hash_value

ORDER BY b.tablespace, b.blocks;

For 10.1 and above

SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text

FROM v$session a, v$tempseg_usage b, v$sqlarea c

WHERE a.saddr = b.session_addr

AND c.address= a.sql_address

AND c.hash_value = a.sql_hash_value

ORDER BY b.tablespace, b.blocks;

Last updated: August 4, 2009

Thursday, July 30, 2009

DBA_EXTERNAL_TABLES

DBA_EXTERNAL_TABLES describes all external tables in the database. Its columns are the same as those in ALL_EXTERNAL_TABLES.

Related Views

  • ALL_EXTERNAL_TABLES describes the external tables accessible to the current user.
  • USER_EXTERNAL_TABLES describes the external tables owned by the current user. This view does not display the OWNER column.

Column

Datatype

NULL

Description

OWNER

VARCHAR2(30)

NOT NULL

Owner of the external table

TABLE_NAME

VARCHAR2(30)

NOT NULL

Name of the external table

TYPE_OWNER

CHAR(3)

Owner of the implementation type for the external table access driver

TYPE_NAME

VARCHAR2(30)

NOT NULL

Name of the implementation type for the external table access driver

DEFAULT_DIRECTORY_OWNER

CHAR(3)

Owner of the default directory for the external table

DEFAULT_DIRECTORY_NAME

VARCHAR2(30)

NOT NULL

Name of the default directory for the external table

REJECT_LIMIT

VARCHAR2(40)

Reject limit for the external table, or UNLIMITED

ACCESS_TYPE

VARCHAR2(7)

Type of access parameters for the external table:

  • BLOB
  • CLOB

ACCESS_PARAMETERS

CLOB

Access parameters for the external table

PROPERTY

VARCHAR2(10)

Property of the external table:

  • REFERENCED - Referenced columns
  • ALL - All columns

Oracle data dictionary views

Oracle dynamic performance views

Last updated: July 30, 2009

DBA_EXTERNAL_LOCATIONS

DBA_EXTERNAL_LOCATIONS describes the locations (data sources) of all external tables in the database. Its columns are the same as those in ALL_EXTERNAL_LOCATIONS.

Related Views

  • ALL_EXTERNAL_LOCATIONS describes the locations (data sources) of the external tables accessible to the current user.
  • USER_EXTERNAL_LOCATIONS describes the locations (data sources) of the external tables owned by the current user. This view does not display the OWNER column.

Column

Datatype

NULL

Description

OWNER

VARCHAR2(30)

NOT NULL

Owner of the external table location

TABLE_NAME

VARCHAR2(30)

NOT NULL

Name of the corresponding external table

LOCATION

VARCHAR2(4000)

External table location clause

DIRECTORY_OWNER

CHAR(3)

Owner of the directory containing the external table location

DIRECTORY_NAME

VARCHAR2(30)

Name of the directory containing the external table location

Oracle data dictionary views

Oracle dynamic performance views

Last updated: July 30, 2009