Google+ Followers

Pages

Friday, November 13, 2009

Configure iSQL*PLUS

STEP 1
goto dos prompt..... start...Run....Cmd
on command prompt type: isqlplusctl start
after issuing the above command following prompt will displayed


Starting iSQL*Plus ...
iSQL*Plus started.



STEP 2
Open Any compatible Internet Browser.
Type the address for ISQL*PLUS




Syntax
http:// host_name:portnumber/isqlplus

Check Computer Name à Right click on my computer
Then properties
Than click computer name
to check Port number:
oracle_home=where oracle software installed.
oracle_home\install\portlist.ini
step 3

after opening the iSQL*Plus page on Expolorer..
LOGIN SCREEN
ENTER username and password
Now isqlplus started.

Saturday, November 7, 2009

Create Recovery Catalog Rman

This post will show you how to create a Recovery Catalog and Register a Database.

Step 1: Create Tablespace

SQL> Create Tablespace RMAN_T

Datafile ‘D:\Oracle\Product\10.2.0\oradata\orcl\rman01.dbf size 100M;

Step 2: Create User

SQL> Grant Resource, Connect, Recovery_Catalog_Owner to

R_Man identified by R_Man;

SQL> Alter User R_Man Default Tablespace RMAN_T;

Step 3: Connect to RMAN

Go to cmd (Command Prompt)

C:\> RMAN target sys/oracle catalog R_Man/R_Man

Step 4: Create Recovery Catalog & Register Database

RMAN> Create Catalog Tablespace RMAN_T;

Now Register your Database

RMAN> Register Database;

--------------------------- *************** -----------------------------------------

How to create Script in Recovery Catalog Database

RMAN> Create Script Script_name {

Backup datafile 3 ;}

How to Run it

RMAN> Run {

Execute script Script_name ;}

From Sql….

SQL> conn R_Man/R_Man

To show how many script are stored in RC

SQL> Select script_name from rc_stored_script;

To show Text of Stored Script

SQL>Select Text from rc_stored_script_line;

To Check How many database are Registered

SQL> select name from rc_database;

Saturday, September 5, 2009

FlashBack Example


Monetize your site!


Enabling FlashBack


Startup mount / startup mount exclusive

alter system set db_recovery_file_dest = ‘path’;

alter system set db_recovery_file_dest_size = 4g; -- (Default 2G)
alter database archivelog; -- (If DB is not in archive mode)
alter database flashback on;
select flashback_on from V$database;
alter system set db_flashback_retention_target=2840 -- (in minutes)
alter system set recyclebin=on;
alter database open;
conn scott/tiger
create table orasoft (id number(5));
alter table orasoft enable row movement; -- (to rewind the table we use row movement)
select current_scn from V$database; -- (from sys user)
insert into orasoft values(1);
commit;
select current_scn from V$database; -- (from other session (sys user))
flashback table orasoft to scn 123456; -- (number obtain from v$database.current_scn)
select count(*) from orasoft;

delete orasoft; -- (note the sysdate)
select count(*) from orasoft; -- (will return 0 rows)
Flashback table orasoft to timestamp to_stamp(‘2009-09-03 09-55-00’, ‘RRRR-MM-DD
HH24-MI-SS’);

SELECT COUNT(*) FROM ORASOFT;
To recover a Dropped Table

DROP TABLE ORASOFT;
FLASHBACK TABLE ORASOFT TO BEFORE DROP;
SELECT*FROM ORASOFT;
To recover & rename a Dropped Table
DROP TABLE ORASOFT;

FLASHBACK TABLE ORASOFT TO BEFORE DROP rename to new_name;
SELECT*FROM new_name;




Monetize your site!