Oracle Basic FAQ's

Posted by XYZ 22 May 2008

Wonderful Oracle Faqs are in the following links
Link 1


1. Difference between Instance and Database?
The terms instance and database are closely related, but don't refer to the same thing. The database is the set of files where application data (the reason for a database) and meta data is stored. An instance is the software (and memory) that Oracle uses to manipulate the data in the database. In order for the instance to be able to manipulate that data, the instance must open the database. A database can be opened (or mounted) by more than one instance; however, an instance can open at most one database.
2. How to connect to new database in oracle?
sqlplus username/password@connect_identifier
SQL> connect username/password@connect_identifier
To hide your password, enter the CONNECT command in the form:
SQL> connect username@connect_identifier
You will be prompted to enter your password.
3. How to create a new user in a particular database?
CREATE USER user_name IDENTIFIED BY password;
CREATE USER uwclass IDENTIFIED BY uwclass;
CREATE USER user IDENTIFIED {BY password |
EXTERNALLY}
4. How to alter a user?
ALTER USER sidney IDENTIFIED BY second_2nd_pwd DEFAULT TABLESPACE exmple;
ALTER USER sh PROFILE new_profile;
ALTER USER sh DEFAULT ROLE ALL EXCEPT dw_manager;
ALTER USER app_user1 IDENTIFIED GLOBALLY AS 'CN=tom,O=oracle,C=US';
ALTER USER sidney PASSWORD EXPIRE;
ALTER USER sh TEMPORARY TABLESPACE tbs_grp_01;
ALTER USER app_user1 GRANT CONNECT THROUGH sh WITH ROLE warehouse_user;
ALTER USER app_user1 REVOKE CONNECT THROUGH sh;
ALTER USER sully GRANT CONNECT THROUGH OAS1 AUTHENTICATED USING PASSWORD;
5. How to see existing users in Oracle Database?
select name from sys.user$;
select username,password from dba_users;
6. How to change the existing user password in the present oracle database?
alter user myuser identified by my!supersecretpassword;
grant connect to myuser identified by my!supersecretpassword
update sys.user$ set password='F894844C34402B67' where name='SCOTT'; (restart of the database necessary)
SQL*Plus command: password or password username
7. How to launch the database configuration assistant tool in Oracle?
Go to $ORACLEHOME/bin
And run the “dbca” binary.
/app/oracle/product/10.2.0/Db_1/bin/dbca
8.Oracle Versions
Oracle products have historically followed their own release-numbering and naming conventions. With the Oracle RDBMS 10g release, Oracle Corporation started standardizing all current versions of its major products using the "10g" label, although some sources continued to refer to Oracle Applications Release 11i as Oracle 11i. Major database-related products and some of their versions include:
• Oracle Application Server 10g (also known as "Oracle AS 10g"): a middleware product;
• Oracle Applications Release 11i (aka Oracle e-Business Suite, Oracle Financials or Oracle 11i): a suite of business applications;
• Oracle Developer Suite 10g (9.0.4);
• Oracle JDeveloper 10g: a Java integrated development environment;
Since version 7, Oracle's RDBMS release numbering has used the following codes:
• Oracle7: 7.0.16 — 7.3.4
• Oracle8 Database: 8.0.3 — 8.0.6
• Oracle8i Database Release 1: 8.1.5.0 — 8.1.5.1
• Oracle8i Database Release 2: 8.1.6.0 — 8.1.6.3
• Oracle8i Database Release 3: 8.1.7.0 — 8.1.7.4
• Oracle9i Database Release 1: 9.0.1.0 — 9.0.1.5 (Latest current patchset as of December 2003)
• Oracle9i Database Release 2: 9.2.0.1 — 9.2.0.8 (Latest current patchset as of April 2007)
• Oracle Database 10g Release 1: 10.1.0.2 — 10.1.0.5 (Latest current patchset as of February 2006)
• Oracle Database 10g Release 2: 10.2.0.1 — 10.2.0.3 (Latest current patchset as of November 2006)
• Oracle Database 11g Release 1: 11.1.0.6 — no patchset available as of October 2007
The version numbering syntax within each release follows the pattern: major.maintenance.application-server.component-specific.platform-specific.
For example, "10.2.0.1 for 64-bit Solaris" means: 10th major version of Oracle, maintenance level 2, Oracle Application Server (OracleAS) 0, level 1 for Solaris 64-bit.

9. How to see exixsting Oracle Version on the system ?
1)select * from v$version;
10.How do we know which version of oracle we are using ?
I need to know whether it is 32 bit Or 64 bit.

From the unix prompt enter , then enter
bash-2.05$ file oracle
a. A 32 bit oracle server will return:
oracle: ELF 32-bit MSB executable SPARC Version 1,
dynamically linked, not stripped.

b. A 64 bit oracle server will return:
oracle: ELF 64-bit MSB executable SPARCV9 Version 1,
dynamically linked, not stripped.

11.How to see the Patches applied on existing Oracle

$ORACLE_HOME/OPatch/opatch lsinventory

opatch does not list the patches applied on DB. it lists the interim patches applied on oracle binaries.

the patched applied on DB are listed with
SQL> select * from registry$history;

How to upgrade Oracle 9i(or lower) version to 10g ?

Oracle 9i to 10g

ORcle 9i to 10g upgrade.pdf


How do I execute an SQL script file in SQLPlus?
To execute a script file in SQLPlus, type @ and then the file name.

SQL >  @{file}

For example, if your file was called script.sql, you'd type the following command at the SQL prompt:

SQL >  @script.sql

The above command assumes that the file is in the current directory. (ie: the current directory is usually the directory that you were located in before you launched SQLPlus.)

If you need to execute a script file that is not in the current directory, you would type:

SQL >  @{path}{file}

For example:

SQL >  @/oracle/scripts/script.sql

This command would run a script file called script.sql that was located in the /oracle/scripts directory.

what does i stands for in oracle 8i and oracle 9i ?
i stands for internet in oracle 8i and 9i

What does g stands for in oracle 10g ?
g stands for grid technology in Oracle 10g.
from 10g onwards oracle supports grid architecture.

How to see the existing constrains applied on a table columns?

select constraint_name, constraint_type from user_constraints where table_name='';

Ex : table name : call_qr_nortel_active
select constraint_name, constraint_type from user_constraints where table_name='call_qr_nortel_active';

what is this grid computing ? 
[1] [2] [3] [pdf] [4]

Write a typical insert command to put system date as the date column data ?

insert into call_qr_nortel_active values(sysdate,1,'cProbe:15','iProbe:30','3215551234','3215551234','192.168.2.10:',
'192.18.2.10:','11-APR-2008',12,'E1:30',999,'192.168.2.10:160','192.168.2.10:460',70,
8,41,33,3,5,999,4,33,600,999,'92.168.3.10:48160','192.168.3.10:49160',
54,23,45,33,5,23,999,6,33,5000,677,'unknown data value',
33,'16:40',4,3);

15 Responses to Oracle Basic FAQ's

  1. harinath Says:
  2. how increase oracle parameters,upto which level can increase parameters in pfile?having of 2gb of ram ?

     
  3. harinath Says:
  4. i am facing the error of ora1652 ,1653,1631,1632,255,272how to resolve it?plz reply asap?

     
  5. harinath Says:
  6. can we create our control file in oracle?

     
  7. harinath Says:
  8. what is difference between startup and mount?

     
  9. harinath Says:
  10. if we change the sid of oracledb can we work with the database?

     
  11. harinath Says:
  12. where can we see the oracle services in windows?ie pmon, smon,dbwr,lgwr,arcn,ckpt

     
  13. harinath Says:
  14. how many instance can be created for one data base?

     
  15. harinath Says:
  16. can administrator change the control file?

     
  17. harinath Says:
  18. can we create virtual port numbers in oracle?

     
  19. harinath Says:
  20. if i applied patches where can i see applied patches? how can i test it?

     
  21. harinath Says:
  22. how to archive oracle tables?

     
  23. harinath Says:
  24. how to trace user activites ?

     
  25. harinath Says:
  26. what is shadow process?

     
  27. harinath Says:
  28. what is the difference oracle 9i and 10g?

     
  29. harinath Says:
  30. how to copy whole oralce data to one system to another?

     

Post a Comment

Who ever writes Inappropriate/Vulgar comments to context, generally want to be anonymous …So I hope U r not the one like that?
For lazy logs u can at least use Name/URL option which don’t even require any sign-in, good thing is that it can accept your lovely nick name also and URL is not mandatory too.
Thanks for your patience
~Krishna(I love "Transparency")
వీలయితే నాల్గు పోస్టులు ...కుదురితే ఒక కామెంటూ ...

Two clicks a day .. keeps poverty away ..."Your mouse click may be a meal for at least one poor child"

See the statistics of population Vs Poverty in India...

-Krishna babu G

tynt

Subscribe via email

Enter your email address:

Delivered by FeedBurner

My other blogs ..