Restoring a database
Now
if you want to restore your logical database you have to create Tablespaces
same as like in your source database
Check
available table space in your source database using following query
Hide Copy Code
SELECT * FROM DBA_DATA_FILES
Log
in to your created database from SQL plus here is the steps
1. Go to Start -> All Programs ->
Oracle-OraDB12Home -> Application Development -> SQL Plus

2. Login using SYS and password provided while
creating database.
Enter
user-name: SYS AS SYSDBA
Password:
(Administrative password entered while installing)
Then
press Enter…

3. Run script ("SELECT * FROM
DBA_DATA_FILES") to knowthe available TABLESPACES in new database.
4. Then create remaining TABLESPACES same as like
in source server using following queries
Hide Copy Code
CREATE TABLESPACE 'tablespace name' DATAFILE 'path - check the path of listed tablespaces' SIZE ? G

5. If source contains two TABLESPACE files for
one TABLESPACE alter the TABLESPACE using following script
Hide Copy Code
ALTER TABLESPACE 'TABLEspace name' ADD DATAFILE 'path' SIZE ?G;
Once
you creates all tablespaces same as like in source server then create user in
new server.
Create
User using following query
Hide Copy Code
CREATE USER USERNAME IDENTIFIED BY PASSWORD
GRANT DBA TO USERNAME
If
you get ORA-65096 Error
RUN
THE FOLLOWING Script
Hide Copy Code
ALTER SESSION SET "_ORACLE_SCRIPT"=true;
Session
will get altered then again run script for creating user and grand user as dba
No comments:
Post a Comment