patternMinor
Should I use two databases or two schemas?
Viewed 0 times
databasesschemastwoshoulduse
Problem
We are currently having one Oracle instance on RAC with one database created. A new requirement came to our database team to temporarily (1-2 months) host a new application that is independent of existing one and after that we will migrate it to a new RAC.
Our technical teams discuss two options: the first suggestion is to create a new database (instance) for that application and the other is to have another schema on the same database.
From performance (how much is the overhead when creating a new instance compared to having the database on the same instance), administration (security, troubleshooting, backup, etc..) and migration perspectives, which option is better considering that we want to seamlessly migrate to the new server without complications or long outage.
Our technical teams discuss two options: the first suggestion is to create a new database (instance) for that application and the other is to have another schema on the same database.
From performance (how much is the overhead when creating a new instance compared to having the database on the same instance), administration (security, troubleshooting, backup, etc..) and migration perspectives, which option is better considering that we want to seamlessly migrate to the new server without complications or long outage.
Solution
When using one database with two schemas you also share SGA structures(like library cache) and also possibly TEMP tablespace and also backups. In rare cases one application can have negative impact on other's performance. Also if you are asked to revert one schema it will be much harder to "restore" just one schema. The same also applies to patching, it's harder to request a downtime from two different customers.
If you use two schemas then definitely create separate DATA and TEMP tablespaces. (You can not have separate UNDO).
If you use two databases then you can not share RAM between them - for buffer cache. You can partially bypass this limitation by using OS level buffer cache. Simply disable direct file access.
A separate database can also be easily migrated onto another machine using RMAN or simple pure scp/rsync.
If you use two schemas then definitely create separate DATA and TEMP tablespaces. (You can not have separate UNDO).
If you use two databases then you can not share RAM between them - for buffer cache. You can partially bypass this limitation by using OS level buffer cache. Simply disable direct file access.
A separate database can also be easily migrated onto another machine using RMAN or simple pure scp/rsync.
Context
StackExchange Database Administrators Q#42309, answer score: 2
Revisions (0)
No revisions yet.