Oracle int vs number datatypes difference and features

When you create a column as int datatype in a table, the datatype will be converted to number of precision 38. You can not define any precision to the int datatype. When you create a column with number as the datatype, the datatype will be considered as number without any precision. You can insert any kind of decimal values to the table. Please see some examples below.

How to Rename Tablespaces to a New name in Oracle 9i 10g 11g ?

In Oracle 9i we need to use exp imp utility to achive this goal. Please see the example below
  1. Create a new test tablespace
SQL>  create tablespace Newtab datafile '/data/oracle/oradata/prod9/newtab_01.dbf' size 50m;

Oracle SQL Script to Find Out Active Sessions Details

SET LINESIZE 500
SET PAGESIZE 1000

COLUMN username FORMAT A15
COLUMN machine FORMAT A25
COLUMN logon_time FORMAT A20

Easy Methods to Find Out Oracle 9i 10g 11g DBID

Method 1 From v$database;
SQL> select dbid from v$database;

      DBID
----------
 576655928

Different Methods to Find Out Oracle Version From the Database

Method 1: Sqlplus startup
If you are using the sqlplus from server it will show the version of the Oracle and if you are trying it from the client machine which will show you the Oracle client installed on the machine.

How to Use Drop Database Command in Oracle 11gR2?

Post Update on 23-Nov-2013 with screenshot.
Dropping a database will remove all corresponding datafile, redo log files, control files and init parameter files. Obviously it removes all the data in the database. The database must be mounted in exclusive and restricted mode.

How to Change Oracle 9i 10g 11g Database Time_Zone? Fix ORA-02231 & ORA-30079: cannot alter database timezone when database has TIMESTAMP WITH LOCAL TIME ZONE (TSLTZ) columns

You can check the database time_zone by using following query
SQL> select dbtimezone from dual;

DBTIME
------

How to encrypt UNIX (solaris AIX Linux) files using vi editior? Protect your UNIX files with password

vi editor has –x option to encrypt a unix file. You can use this option as a password protection for your UNIX files. The –x option will ask you for a passcode or encryption key which will be used as the key password for the file.

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer