Egging him on...
Duke Ganote, September 07, 2007 - 8:13 am UTC
"Concentrate; put all your eggs in one basket, and watch that basket..."
-- Andrew Carnegie
A reader, September 10, 2007 - 4:07 am UTC
>>Anyone that knows me - knows what my answer will be
That sounds like Oracle saying ... :)
My choice probably also here. I think several independent Oracle databases looks less obvious in your case.
How are you going to link your COUNTRY-SPECIFIC OPERATIONAL DATA to shared operational data tables then?
Think about other following points:
- COSTS (do not see this important one in your criteria or money is not an issue)
a) HW costs and maintenance
b) SOFT maintenance (patches¿)
c) Oracle licenses per CPU probably
b) Oracle partitioning is extra-licensed
e) Once your big DB instance can not handle the application load you are probably a potential RAC customer, means about 50 % more license costs.
- Availability.
If you need high availability you would probably look for a failover cluster or RAC.
If 1st option, then you can build active-active cluster with 2 databases from the beginning. So just think about it. The second one can handle your shared data, can be a duplicate of the primary DB and do reporting, can be a RAC node to spread a load or just leave this box without a DB..
- Performance/tuning: here you should understand that in Oracle you can split a parts of you DB mostly by tablespace and schema. So mainly on that level you can distinguish a DB load. In some cases it¿s not easy to see who produces the performance problem on the singe instance.
- Recovery with online DB
Complete recovery is not an issue. Incomplete recovery might be not easy.
If say I want to recover my country after a failed DB upgrade -> the old good exp/imp can help otherwise you build an auxiliary new database -> restore needed tablespaces, do incomplete recovery,¿.. and so on.
September 15, 2007 - 2:07 pm UTC
a) that goes down
b) that goes down
c) that goes down
d&e) given the reduction in maintenance and complexity, reduced hardware needs... Hmmm, so - buy or build - you will spend in the end.
If you have more than one instance on a server, you cannot tune, period - not possible. Only when you consolidate do you stand a chance of that.
Check out DBMS_Service
Mark Brady, September 11, 2007 - 10:03 am UTC
In some cases it is not easy to see who produces the performance problem on a single instance.
You should check out DBMS_Service. Instead of logging into a different instance to segment your load, you can login to one instance and a different *service* to segment your load. Oracle tries very hard to give you the tools to make ONE 'look like' many. Services, partitioning, RLS/VPD, etc. Actually between those 3 you've got 97% of what you need. You can segment your traffic, you can segment your data, you can secure access to that data...
Once your big DB instance can not handle the application load you are probably a potential RAC
customer, means about 50 % more license costs.
Even if you split your application into two databases (to avoid RAC complexity) that's still better than 1 per country. Rac isn't a fait d'accompli.
Korall, September 12, 2007 - 8:16 am UTC
I still see only USER & Tablespace as the main and always way of splitting an application parts. VPD is an option if you use it at all. Resource manager can help also. Additionally the application design is important. If you have web application with one BIG application schema you are in trouble. In that case you can not even trace a needed user session on the DB side.
"Service" (I thought) is a new 10g feature which is only useful for RAC. I could not find on Metalink any example of using it on a single instance. From recent Oracle 10g training I've learned there are external services introduced (new column in v$session) which is useful in RAC configurations. Could you or maybe Tom give a link or an example of using Service in a single DB instance.
Partitioning definitely a great thing but I think it can give you only the performance benefit with some manageability advantages and only make sense for big DBs for extra money. It can even make performance tuning / load analysis more complex for you.
September 15, 2007 - 4:36 pm UTC
Service has been around for many many releases, it is not new in 10g, it is a very old concept.
9i has multiple services by default in fact (for the XML stuff) for example.
more databases = more work, period.
unique schema vs multi-schemas
Emmanuel MAKONDAMBUTA, September 17, 2007 - 11:16 am UTC
Tom,
Thank you for your answer to my posting. I do also appreciate the contribution of the other members of "asktom" community.
>> Single database, period
OK, you're right and we do believe that a single database is the best solution in our case.
We still have 3 solutions:
1) one schema per country: set of tablespaces by schema/country
Advantages:
- backup/restore each country separately made easy (???)
- Isolate completely each country from the others (it is more about "psychology" than technology)
- Recovery is made easy (schema level recovery???)
Disavantages:
- multi-schemas to manage (application level updates, ...)
- requires replication or materialized views for "shared logistical and operational tables"
2) One unique schema for all the countries.
Advantages:
- only one schema to manage
Disavantages:
- requires partitioning per country to guaranty "isolation" per country (extra cost)
- backup/restore per country becomes more complex (switching partitions with empty tables, ...) and could require unavailability (???) of the related tables (impacting all the countries)
- only local indexes could be created (to isolate partitions)
- politically difficult to stand up for (as each country would like to be completely isolate from the others). The idea of having all the eggs in the same basket does frighten countries.
- implement VPD to isolate country's data (more complex than basic security linked to schema users)
- Data corruption (at global table level) does affect all the countries
3) Hybrid design: one schema/country for "country-specific" tables and a common schema for "shared logistic and operational" tables.
Some partition concepts are still not clear enough for me.
About partitioning:
- What happens during the exchange of partitions: does the global table remain available for DML?
- What happens if you try to access the partition being exchanged(during the exchange process)?
- Is it possible to flashback only one partition of a table?
- Does RMAN able to backup/restore only specific partitions within a partitioned-table?
About databases:
- Does it make sense to have 1 instance/server per "big" country and one unique instance/server for all the "small" countries? The goal is to separate huge resource consumers (big countries) from the small consumers (small countries). The final situation is about 5 servers/instances.
Thank you and best regards,
Emmanuel.
September 18, 2007 - 3:15 pm UTC
1) add to the disadvantages that shared sql is defeated, a copy of sql per schema. I would violently oppose a multi schema approach in all cases.
all of your advantages are achievable via partitioning and smart use of tablespaces.
2) add to advantages "it'll actually work and scale and we'll have one set of code to upgrade and man, it'll be great"
add to advantages "that while we are paying for a feature (partitioning) we'll save so much in development costs, maintenance and support costs (your cost to support this) over time.
you keep stating backup and restore of a single country. This is a huge recurring theme. and it seems like something you'd do once in a blue moon during a leap year (eg: is this THE KEY REQUIREMENT, or just something you have to be prepared to do but probably never will)
partition isolation is not a given here, you can use global indexes - no reason not to (there is the update indexes clause - it doesn't cause downtime)
countries should be frightened of war and famine, technology - that is best left to the technologists. This is not anymore "all in one basket" then multiple schemas.
what the heck is "data corruption at the global table level"??
3) see #1 and #2, I think you can guess what I would say.
Keep to as few databases as possible (one being best) and never exceed 1 instance per host machine.
Oppose multi schema approach in all cases
Andres Campo, August 14, 2008 - 9:22 pm UTC
Tom,
would your comment "I would violently oppose a multi schema approach in all cases" still hold in a RAC enviroment?
I mean, I could have different countries as different schemas within ONE single RAC DB, and assign different countries to different nodes/sub-clusters via services. In such a scenario, your complaint about shared-sql being defeated losses relevance since each country would run against a different node/sub-cluster (separate country instance(s)).
I agree with you on "single DB period". I also agree with opposing multi schema in a single server scenario versus a partitioning, VPD approach, but I think in a RAC environment the multi-schema approach does have its merits/advantages. Please your comments.
Regards,
Andres
August 18, 2008 - 10:14 am UTC
... would your comment "I would violently oppose a multi schema approach in all
cases" still hold in a RAC enviroment? ....
yes.
it is a horrible design idea, period. If you want that physical segregation - PARTITION, do not flood the dictionary with thousands of redundant objects.
What about data localization?
A reader, August 19, 2008 - 1:28 pm UTC
Tom,
I definitely agree with the approach of one database, one schema that you've mentioned above and, while this may not be an issue for Emmanuel, I've still gotta ask about data localization (physically).
For example; let's assume that one of the tables that would be partitioned by country is for some type of large data store (1GB or larger) that is only relevant to that country for whatever reason (some type of local backups or other binary data). You've spoken to the many advantages of storing files within Oracle as opposed to the filesystem before but with an architecture like this (one central DB being accessed around the world), how could you manage this while delivering an acceptable response time? Access to this data will obviously be a lot faster with some type of local storage, especially over slow WAN links that may be adequate for the majority of other SQL transactions.
In the filesystem world we have techniques like SAN replication that would allow us to keep things centrally located while still allowing for local access at remote locations. Is there a similar means to localize these partitions to the relevant countries without jeopardizing data consistency/integrity while still enjoying the benefits of DB file storage?
August 20, 2008 - 10:32 am UTC
web pages should be relatively small. given the state of networks in the year 2008 - I don't see this as an issue.
I travel all over the world, literally.
I live on the east coast of the US.
the servers I use day to day are either in
a) Texas (1,500 miles away)
b) India (further)
I access those two from home, from everywhere in the US, from Europe, the middle east - where ever I happen to be.
And response time - pretty much "the same"
All of my files, stored in texas (as are all files for all employees - regardless of where they live)
All of my HR data - same
All of my payroll stuff - ditto
and so on... My calendar, whatever - all in a single place - and I have immediate access to it where ever I go.
the data doesn't need to be close to me - you just need to get a small bit of it to me.
do not replicate
do not distribute
keep it simple, central
I'll never change my stance on that.
New Question
vijayender tarun, August 02, 2019 - 9:36 pm UTC
Hi is there any suggested approach on how many tables per schema or it doesn't matter.
I dint know in the world about max number of tables in one schema.
I have a schema with 500+ tables and I am expecting 200 more tables in coming days.
If needed new tables can easily be created in a new schema of their own if they serve a single different functionality for example (if we add a new sales module, most new tables can be created in sales schema).
is there any thought process of one huge schema with lot of tables/ and other objects per database or multiple schemas which are created on basis of the functionality they support.