We dont need any ASM Lib Drivers to be installed for this method...!!
For running a Single Instance ASM We need to have CSS Dameon to be a running before we create ASM. This will be invoked in the first
step when you try to create the ASM instance.
Now As a root user execute all these steps.
1. Create a directory asm_disks and
cd /u01/asm_disks
Start creating Logical Volumes ( LV ) inside the directory
[root@testserver]dd if=/dev/zero of=asm_disk1 bs=1024k count=1024
1024+0 records in
1024+0 records out
[root@testserver]dd if=/dev/zero of=asm_disk2 bs=1024k count=1024
1024+0 records in
1024+0 records out
[root@testserver]dd if=/dev/zero of=asm_disk3 bs=1024k count=1024
1024+0 records in
1024+0 records out
[root@testserver]dd if=/dev/zero of=asm_disk4 bs=1024k count=1024
1024+0 records in
1024+0 records out
and then
[root@testserver]losetup /dev/loop1 asm_disk1
[root@testserver]losetup /dev/loop2 asm_disk2
[root@testserver]losetup /dev/loop3 asm_disk3
[root@testserver]losetup /dev/loop4 asm_disk4
[root@testserver]raw -qa
[root@testserver]raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1: bound to major 7, minor 1
[root@testserver]raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw2: bound to major 7, minor 2
[root@testserver]raw /dev/raw/raw3 /dev/loop3
/dev/raw/raw3: bound to major 7, minor 3
[root@testserver]raw /dev/raw/raw4 /dev/loop4
/dev/raw/raw4: bound to major 7, minor 4
[root@testserver]raw -qa
/dev/raw/raw1: bound to major 7, minor 1
/dev/raw/raw2: bound to major 7, minor 2
/dev/raw/raw3: bound to major 7, minor 3
/dev/raw/raw4: bound to major 7, minor 4
Assigb permission to oracle user :
[root@testserver]chmod 660 asm_disk*
[root@testserver]ls
asm_disk1 asm_disk2 asm_disk3 asm_disk4
[root@testserver]chown oracle:oinstall /dev/raw/raw1
[root@testserver]chown oracle:oinstall /dev/raw/raw2
[root@testserver]chown oracle:oinstall /dev/raw/raw3
[root@testserver]chown oracle:oinstall /dev/raw/raw4
Note : MAke sure you install Oracle Database Binaries ( Software only ) before you proceed
Now as a root user run the below command for start the CSS dameon.
[root@testserver]/u01/oracle/product/10.2.0/db_1/bin/localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
testserver
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
*******************************************************************
[root@testserver]ls /etc/oratab
/etc/oratab
[root@testserver]ls -ltr /etc/oratab
-rwxrw-r-- 1 oragrid root 881 Apr 29 02:40 /etc/oratab
[root@testserver]chown oracle:oinstall /etc/oratab
As Oracle User, Invoke DBCA
[root@testserver]ps -ef|grep ASM
oracle 8202 1 0 12:34 ? 00:00:00 asm_pmon_+ASM
oracle 8204 1 0 12:34 ? 00:00:00 asm_psp0_+ASM
oracle 8206 1 0 12:34 ? 00:00:00 asm_mman_+ASM
oracle 8208 1 0 12:34 ? 00:00:00 asm_dbw0_+ASM
oracle 8210 1 0 12:34 ? 00:00:00 asm_lgwr_+ASM
oracle 8212 1 0 12:34 ? 00:00:00 asm_ckpt_+ASM
oracle 8214 1 0 12:34 ? 00:00:00 asm_smon_+ASM
oracle 8216 1 0 12:34 ? 00:00:00 asm_rbal_+ASM
oracle 8218 1 0 12:34 ? 00:00:00 asm_gmon_+ASM
root 8240 7175 0 12:35 pts/2 00:00:00 grep ASM
Now you can go ahead and use your DBCA and create a database and on
step
6 of 13, you can use Automatic Storage management as your Filesystem.
Thursday, June 19, 2008
Create ASM environment for testing Purpose ( Dummy only Testing Purpose )
This is only for test case and not for production use..!!!
Export and Import using Unix Pipe And Compress
This helped me in saving space in some of activities and also in cases to do parallel export and import.
Scenario 1 :
You were asked to import a schema of your production server into your test server for some purpose. You are expecting that the export will take 5 hours and again the import will take quite more than that. In this case, you can use this option which will save your time in exporting and shipping the file to the other server.
By doing this we will be able to export and import parallel on the same box.
1. In your test server, add the production database tnsnames to your tnsnames.ora
2. Create a unix pipe
mknod pipe name -p
ex : mknod ram_pipe -p
3. Start your export :
exp system/password@prod file=ram_pipe owner=erpds statistics=none log=/u01/export.log &
Remember to use & at the end to start the export in back groud and You be able to notice from the logfile whtr the pipe broken due to some errors in the export commands or the export is progressing...!!
4. Now from the same terminal start the import..!!
imp system/XXXXX@testserver file=ram_pipe fromuser=erpds touser=testds log=/u01/import.log &
Simple..!! You will notice one job wil be exporting and other will be importing...!!
Scenario 1 :
You were asked to import a schema of your production server into your test server for some purpose. You are expecting that the export will take 5 hours and again the import will take quite more than that. In this case, you can use this option which will save your time in exporting and shipping the file to the other server.
By doing this we will be able to export and import parallel on the same box.
1. In your test server, add the production database tnsnames to your tnsnames.ora
2. Create a unix pipe
mknod pipe name -p
ex : mknod ram_pipe -p
3. Start your export :
exp system/password@prod file=ram_pipe owner=erpds statistics=none log=/u01/export.log &
Remember to use & at the end to start the export in back groud and You be able to notice from the logfile whtr the pipe broken due to some errors in the export commands or the export is progressing...!!
4. Now from the same terminal start the import..!!
imp system/XXXXX@testserver file=ram_pipe fromuser=erpds touser=testds log=/u01/import.log &
Simple..!! You will notice one job wil be exporting and other will be importing...!!
Oracle 10g features
Even though we work on 10g databases on all 365 days,sometime when you try to recollect all the 10g features you won't be able to recall all of them.. For my reference i am adding this post..!!
1.Flashback Versions Query
2.Rollback Monitoring
3.Tablespace Management
4.Oracle Data Pump
5.Flashback Table
6.Automatic Workload Repository
7.Automatic Storage Management
8.RMAN
9.Auditing
10.Automatic Segment Management
11.Transportable Tablespaces
12.Automatic Shared Memory Management
13.ADDM and SQL Tuning Advisor
Oracle 10g R2 Features :
· ASM Command Line Tool
· Drop Empty Datafiles
· Direct SGA Access for Hung/Slow Systems
· Redefine a Partition Online
· Faster Startup
· Manage Multiple Objects in Oracle Enterprise Manager
· Automatic Segment Advisor
· Oracle Secure Backup
· Dynamic RMAN Views for Past and Current Jobs
· Dynamic Channel Allocation for Oracle RAC Clusters
· Tempfiles Recovery via RMAN
· Flashback Database/Query Through RESETLOGS
· Flashback Database Restore Points
· Flash Recovery Area View
I have got all these details from Oracle.com
From my understanding i have seen the following features were very much useful in daily life of us.
1.AWR
2.ASH
3. ADDM
4. Improved RMAN features
5. ASM
6. Memory management
7. DBMS utilities
8. Datapump
9. Flashback (Enhancement)
10. Improved Auditing
11. Improved SQL apply techniques - Useful in Logical Standby
12. Dataguard Enhancements
13. SQL Tuning Advisor
14. Grid Control
I will be adding things whenever it strikes me..!!
1.Flashback Versions Query
2.Rollback Monitoring
3.Tablespace Management
4.Oracle Data Pump
5.Flashback Table
6.Automatic Workload Repository
7.Automatic Storage Management
8.RMAN
9.Auditing
10.Automatic Segment Management
11.Transportable Tablespaces
12.Automatic Shared Memory Management
13.ADDM and SQL Tuning Advisor
Oracle 10g R2 Features :
· ASM Command Line Tool
· Drop Empty Datafiles
· Direct SGA Access for Hung/Slow Systems
· Redefine a Partition Online
· Faster Startup
· Manage Multiple Objects in Oracle Enterprise Manager
· Automatic Segment Advisor
· Oracle Secure Backup
· Dynamic RMAN Views for Past and Current Jobs
· Dynamic Channel Allocation for Oracle RAC Clusters
· Tempfiles Recovery via RMAN
· Flashback Database/Query Through RESETLOGS
· Flashback Database Restore Points
· Flash Recovery Area View
I have got all these details from Oracle.com
From my understanding i have seen the following features were very much useful in daily life of us.
1.AWR
2.ASH
3. ADDM
4. Improved RMAN features
5. ASM
6. Memory management
7. DBMS utilities
8. Datapump
9. Flashback (Enhancement)
10. Improved Auditing
11. Improved SQL apply techniques - Useful in Logical Standby
12. Dataguard Enhancements
13. SQL Tuning Advisor
14. Grid Control
I will be adding things whenever it strikes me..!!
Subscribe to:
Posts (Atom)