Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Quartz.net database schema name?

I am unable to find a configuration entry to change the database schema name used by Quartz.net when the instance is persisted in SQL server. below is the portion of the configuration I am using to point it to SQL server Database.

    <quartz>
           <add key="quartz.scheduler.instanceName" value="quartz" />
           <add key="quartz.scheduler.instanceId" value="AUTO" />
           <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
           <add key="quartz.threadPool.threadCount" value="4" />
           <add key="quartz.jobStore.misfireThreshold" value="60000" />
           <!-- Database job store -->
           <add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" />
            <add key="quartz.jobStore.useProperties" value="false" />
           <add key="quartz.dataSource.default.connectionStringName" value="DatabaseConnectionString" />
           <add key="quartz.dataSource.default.provider" value="SqlServer-20" />
<add key="quartz.jobStore.tablePrefix" value="QRTZ_" />
        </quartz>

I was expecting something similar to how it lets you configure the table name prefix. is there any configuration property I can use to change the schema name ... I want the the tables to be

qrtz.QRTZ_BLOB_TRIGGERS

Instead of the default

dbo.QRTZ_BLOB_TRIGGERS

I couldn't find any documentation on this, if it is at all possible. something like below for example ???

 <add key="quartz.jobStore.schemaName" value="qrtz" />
like image 997
Sam.C Avatar asked Jan 14 '16 23:01

Sam.C


People also ask

How do I create a schema name in SQL Server?

Using SQL Server Management StudioRight-click the Security folder, point to New, and select Schema. In the Schema - New dialog box, on the General page, enter a name for the new schema in the Schema name box. In the Schema owner box, enter the name of a database user or role to own the schema.

What is the schema name in SQL Server?

What is Schema in SQL? In a SQL database, a schema is a list of logical structures of data. A database user owns the schema, which has the same name as the database manager. As of SQL Server 2005, a schema is an individual entity (container of objects) distinct from the user who constructs the object.


1 Answers

A specific setting for schema does not exist.

You can try to "string hack it" with

<add key="quartz.jobStore.tablePrefix" value="[MySchema].QRTZ_" />
like image 52
granadaCoder Avatar answered Nov 13 '22 07:11

granadaCoder