Showing posts with label tablespace. Show all posts
Showing posts with label tablespace. Show all posts

Wednesday, December 4, 2013

Creating PIOPS volume for Oracle Database

When running your Oracle Database on AWS EC2, you may find that you need additional IOPS for your database and which to add an EBS volume to your Oracle instances for some of your highly accessed tables that require high IO.  Here are the steps to create a new PIOPS volume and attached it your EC2 instance.

1. aws ec2 stop-instances --instance-id i-NewDBServer
2. aws ec2 create-volume --availability-zone az-asdf-1a --size 200 --volume-type io1 --iops 2000
3. aws ec2 attach-volume --volume-id vol-FastDrive --instance-id i-NewDBServer - -device /dev/xvdb

Get the OS in order for your EC2 instance to recognize your volume by running the following commands:
1. sudo mkdir /mnt/piops1
2. sudo mkfs.ext3 /dev/xvdb
3. sudo mount /dev/xvdb /mnt/piops1
4. df -h (to see the newly mounted piops volume)

You would then create an Oracle tablespace on this new volume and move your tables to this new tablespace.

Tuesday, October 9, 2012

AWS EBS PIOPS volume creating tablespace

Creating you EBS volume and attaching it to your EC2 instance through the AWS console, CLI or APIs is just the first step in using this volume in your Oracle database.  If on Linux, you then need to format, create a mount point, and then mount your volume as follows:
1.mkfs -t ext3 /dev/sdg
2. mkdir /mnt/oracle1000
3. mount /dev/sdg /mnt/oracle1000
(Remember to give permissions - chmod - to oracle user on your mount point)
 More information on mounting EBS volumes can be found here:
http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html

To check if the device has been mounted properly, you can issue these commands:
-  df -l
-  mount

To insure that your EBS volumes get mounted at start up time, you can add the device mapping to the /etc/fstab file

Then the Oracle tablespace needs to be created.  This is done using the following command:
This is for creating a tablespace larger then the Oracle standard limits:
create bigfile tablespace datapiops1k
datafile '/mnt/oracle1000/bigfiledata.dbf'
size 600G;