Reverse Engineer CLI for Existing Oracle RDS Database - oracle

Is there are way to reverse engineer CLI for an existing Oracle RDS Database ?
I already have an existing Oracle RDS Database and want to create another one with exact same parameters ( except database name ).
Instead of using GUI, I want to use CLI ( "aws rds create-db-instance" ).

You could use describe-db-instances to get detailed information about your existing db instance. Then, based on the information obtained, you could create new db instance using create-db-instance.
If this is something that you will be doing often (i.e. creating same instances), it would be better to look into CloudFormation. This would allow you to provision reproducible db instances across different regions and accounts.

Related

Amazon RDS: How many Oracle instances/databases

I have a couple of questions on AWS RDS service for migrating an oracle 19c server on RHEL with 3 standalone instances and databases:
Can RDS instance support multiple oracle standalone instances/databases or only one instance?
If I have an existing RDS service running in AWS, can I migrate another on-premise oracle database to the RDS database as another oracle schema?
Have not tried it yet.
RDS for Oracle limits one instance to a single database. However you can have multiple schemas in one database.
An account can have up to 40 BYOL type Oracle RDS instances, or up to 10 instances where license is included. You can also increase these limits by contacting AWS support.
See here for more details.
Each RDS instance equals one database. However, you can set up multiple RDS instances, if you want to.
For migrations, please have a look at the Database Migration Service (DMS). Regarding your schema in particular, please check the Schema Conversion Tool which is a part of the DMS.
Sorry I can’t be more specific as the questions are rather vague themselves.

AWS RDS - How to make a "read replica" of specific tables and not the whole database

The question sums it up basically.
I have an external (not in AWS) MySQL v5.7 database that is 40Gb (it has one table of 16Gb). This database will be imported to RDS MySQL by another team.
I will then need to have a copy of it in my microservice but not the whole DB, just some tables (among them, the 16Gb one).
The optimal solution would be a "read replica" of just some columns of various tables.
It will need to be in constant sync with the "Master" table.
I would also like to use Aurora instead of MySQL (reason: speed & cost).
I googled for information but couldn't find anything helpful besides
AWS Data migration service.
Anyone here has experience with this? And what would you suggest?
Yes you can definetly use DMS service. You can use transformation rule and put db name and table name , which will help in selective migration.
Note :- Binlog_format has to be set true for any kind of source of RDS . They should also have backup enabled.

AWS DMS - incremental migration from Oracle to Redshift

I am new to AWS DMS service. Plans are to migrate on-prem Oracle to Redshift. Before going into production environment, currently trying out a test Oracle RDS in AWS which is a small subset of actual database as source. So far have been successful in the bulk load and incremental migration from RDS to Redshift.
When it comes to on-prem oracle , particularly for the incremental load
1) As per document : http://docs.aws.amazon.com/dms/latest/sbs/CHAP_On-PremOracle2Aurora.Steps.ConfigureOracle.html, the on-prem needs to be enabled with supplemental logging. Plans are to use the following two commands.
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
The production database has multiple logging locations. Is there any other log settings other than the above two that I should be looking into for DMS to pick up multiple log locations?
2) In the same link given, point 4 says 'Create or configure a database account to be used by AWS DMS.'
Where should I create this user? on-prem oracle or AWS?
How do I configure DMS to use this user?
You need to read this documentation:
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html
For your second question; You need to create a user in the Oracle source database, the section 'Working with a Self-Managed Oracle Database as a Source for AWS DMS' tells you all of the grants you need to give.
For your first question, if you look at the SQL Server documentation;
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SQLServer.html
It specifies the limitation of; 'SQL Server backup to multiple disks isn't supported. If the backup is defined to write the database backup to multiple files over different disks, AWS DMS can't read the data and the AWS DMS task fails.'
I can't see a similar stipulation in the oracle documentation, first link, I would hazard a guess that DMS is able, in the case of oracle, to determine and cope with multiple logging locations from a configuration value inside the database.

Deploying multi-tenant on Amazon RDS (individual DB for each tenant)

I am currently conceptualizing a cloud application (SaaS) and I am looking to create a DB for every user (tenant) that is registering an account.
May I know if it is programmatically possible to create a new DB on Amazon RDS through API or anything?
Databases are created on RDS using standard SQL DDL statements -- not the API.
For example:
To create additional databases, connect to the DB instance and use the SQL command CREATE DATABASE.
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateInstance.html

How to migrate the existing database to oracle RDS

I need to migrate an existing application's database into oracle RDS database in Amazon Web services.
I have the dump file which is residing on an EC2 instance. The dump has not been taken by me.Also I would like to know how can I take the dump so that it can be imported successfully. The EC2 instance has an oracle regular client.
I have set up the oracle RDS instance in AWS and I am able to connect to the server.
I would like to know how can I import the database dump on RDS.
I am using this command :
imp rdsuser#oracledb FILE=fulldb.dmp TOUSER=rdsuser FROMUSER=SYSTEM log=test.log buffer=100000
Any lead is appreciated.
Also I would like to know what is the best method to import an existing database:
1. to take dump.
2. Or to take the clone of all files of database ( that will require the downtime in the server).
Best strategy is to take dump then import it into RDS . If your DB size is too big then contact AWS guys for help .

Resources