10 HF database table sets in single SQL database

sql-server
Tags: #<Tag:0x00007f49a4132618>

#1

I have 10 different SQL databases for 10 different web applications. I want to combine them. I don’t want to use same hangfire table set for every application. I know its impossible. I want something like that:
for web app 1:
AggregatedCounter, Counter, Hash, Job,JobParameter, JobQueue, List, Schema, Server, Set, State
for web app2:
AggregatedCounter1, Counter1, Hash1, Job1,JobParameter1, JobQueue1, List1, Schema1, Server1, Set1, State1
for web app3:
AggregatedCounter2, Counter2, Hash2, Job2,JobParameter2, JobQueue2, List2, Schema2, Server2, Set2, State2
for web app 4:
AggregatedCounter3, Counter3, Hash3, Job3,JobParameter3, JobQueue3, List3, Schema3, Server3, Set3, State

and so on… For each application table sets are still separated bu combined in single database file.

Can I achieve this ?


#2

It seems no need to separate tables. Changing schema name would be enough. On single sql database I used 14 different “sub application’s hangfire tables” just by giving them unique schema name.

best.


#3

You can do it like this:
Hangfire.Oracle.Core.OracleStorageOptions osos = new Hangfire.Oracle.Core.OracleStorageOptions
{
TransactionIsolationLevel = IsolationLevel.ReadCommitted,
QueuePollInterval = TimeSpan.FromSeconds(15),
JobExpirationCheckInterval = TimeSpan.FromHours(1),
CountersAggregateInterval = TimeSpan.FromMinutes(5),
PrepareSchemaIfNecessary = true,
DashboardJobListLimit = 50000,
TransactionTimeout = TimeSpan.FromMinutes(1),

//like this bellow
SchemaName = Configuration[“DbConnHangfireSchema”]
};

                    config.UseStorage(new Hangfire.Oracle.Core.OracleStorage(dbPropertyHangfire.ConnectionString, osos));