Configuration

The Configuration page of the Model Settings dialog allows you to configure Telerik Data Access settings and specify where the configuration will be stored. You can choose one of the following storage options:

  • Save configuration in App.Config – Saves configuration in the app.config file.
  • Save configuration in separate ‘ModelName’.cfg.xml file – Saves configuration in a separate .cfg.xml file.
  • Not to save the configuration – Defines that configuration should not be saved.

The Configuration page has the following properties.

Backend

Property Description
Driver Controls the name of the driver to be used. Specify this property only when the NTDS or ODP drivers are to be used.

Backend runtime

Property Description
Allow Cascade Delete Controls the default behavior for deletion when nothing is specified on the class level in the MetadataContainer.
Allow Non Nullable Columns In TPT Inheritance Allows the generation of non-nullable columns in TPT inherited classes.
Allow Read After Delete Controls whether read operations on already deleted instances are allowed.
Allow Read After Dispose Controls whether read operations on already fetched instances are allowed after the managing context has been disposed.
Cache Reference Type Controls the type of reference used in the cache of the object scope.
Check Object Consistency On Commit Controls whether the consistency of the object graph in the local cache is ensured. If set to True, all bidirectional relationships (one-to-many and many-to-many) are kept in sync.
Check Schema Consistency On Startup Controls whether the class/table mapping is validated on startup of the application.
Class Behavior Controls the default modification behavior of persistent types.
Close Database With Active Transactions Controls whether closing a database with active transactions is allowed.
Close Scopes With Active Transaction Controls whether closing an object scope with an active transaction is allowed.
Command Timeout Controls the global CommandTimeout value in seconds that is set on all DbCommands used in Telerik Data Access.
Compiled Query Cache Size Controls the maximum number of queries kept in the precompiled query cache.
Concurrency Specifies which concurrency control is used.
Default Stream Buffer Size Gets or sets the default buffer size for Stream fields.
Has Temp Tables Controls whether the database will attempt to use temporary tables.
Intercept Default Fetch Group Field Access Determines whether the optimized code path is used for fields in the default fetch group.
Like With Escape Determines whether the database will use the LIKE operator with the ESCAPE character set to backslash.
Lock SQL Suffix Gets or sets the SQL appended to a SELECT FOR UPDATE statement, which is used to obtain a write lock when using pessimistic concurrency control.
Lock Timeout MSec Controls the lock timeout in milliseconds.
Medium Trust Determines whether medium-trust environments are supported.
Nulls First Controls whether the database will use NULLS FIRST sorting.
Only Metadata Controls whether the OpenAccessContext will be created to obtain only the metadata and not actually connect to the database.
Parallel Fetching Enabled Gets or sets whether parallel fetching of a sub-collection is enabled. Parallel fetching allows the use of multiple result sets (if the backend supports it) for improved performance.
Performance Counter Gets or sets whether performance counters for the second-level cache and second-level cache cluster are enabled.
Performance Counter Name Gets or sets the name of the performance counter instance.
Prepare Commands Controls the creation of prepared commands used to perform CRUD operations.
Read Only Controls whether write operations against the database are permitted.
Read Without Transactions Controls whether normal query operations are done without database transactions.
Require Persistent Classes Controls whether opening a database requires persistent classes to be present.
Retain Connection In Optimistic Transaction Controls whether the connection is to be retained in optimistic transactions.
Return Null For Row Not Found Controls whether null is returned when an object is not found.
Scope Implementation Pool Enabled Controls whether the implementation objects underlying the object scope can be pooled.
Scope Implementation Pool Max Idle Controls the maximum number of idle scope implementation objects.
Statement Batching Enabled Controls statement batching for DML operations.
Statement Batching Size Controls the maximum number of batched modification operations.
Statement Batching Threshold Controls the threshold for using statement batching of modifying operations.
Support Concurrent Threads In Scope Controls whether the runtime supports concurrent threads within one object scope.
Use UTC For AutoSet Values Controls whether datetime values that are automatically set during commit will use UTC.
Use UTC For Read Values Controls whether datetime values that are read will be converted to UTC.
Write Artificial Types To Disk Controls whether assemblies containing artificial types are written to disk.

Connection pool

Property Description
Active Connection Timeout Controls the timeout in seconds for active connections — how long query results on the server are held open.
Block When Full Controls the behavior of an empty connection pool when a new connection is requested. If set to True, threads attempting to obtain a connection will wait until one is available.
Init SQL Gets or sets a list of SQL statements that will be executed after a connection is created, before it is put into the connection pool.
Isolation Level Controls the isolation level to be used on the database server.
Max Active Controls the maximum number of active connections in the connection pool.
Pool Type Controls which connection pool behavior should be used: the ADO driver behavior or the Telerik Data Access behavior.
Reserved Controls the number of pooled reserved connections (for example, used by the HighLow key generator).
Integrated Pool Connect Retry Count Controls the number of connect retries attempted until a connection can be established.
Integrated Pool Connect Retry Interval MSec Controls the time between connect retry attempts in milliseconds.
Integrated Pool Max Connection Age Controls the maximum number of times a connection can be returned to the connection pool before it is closed to free accumulated resources.
Integrated Pool Max Idle Controls the maximum number of idle connections in the connection pool.
Integrated Pool Min Idle Controls the minimum number of idle connections in the connection pool.
Integrated Pool Prepared Statement Cache Enabled Controls whether the prepared statement pool cache is enabled.
Integrated Pool Prepared Statement Cache Max Controls the maximum number of prepared statements to be cached on a connection.
Integrated Pool Test Interval Controls the time in seconds between subsequent tests of whether an idle connection is still valid.
Integrated Pool Test On Alloc Controls whether connections are tested for operation when they are unpooled.
Integrated Pool Test On Exception Controls whether connections are tested for operation after an exception occurs.
Integrated Pool Test On Release Controls whether connections are tested for operation when they are pooled.
Integrated Pool Test When Idle Controls whether connections are tested when they are idle.
Integrated Pool Validate SQL Controls the SQL used to test connections for operation.

Default mapping

Property Description
Always Create Index On Join Table Value Columns Controls the default value for index generation in join tables.
Cache Strategy Controls the default value for the cache strategy.
Null Foreign Key Controls the default value for whether foreign keys can be null.
Optimistic Concurrency Mode Controls the default value for the concurrency control strategy.
Use Delimited SQL Controls whether plain or delimited SQL is used.
Use Stored Procedures For Insert Controls whether stored procedures are used for insert operations.
Use Stored Procedures For Update Controls whether stored procedures are used for update operations.
Use Stored Procedures For Delete Controls whether stored procedures are used for delete operations.

Highlow generator

Property Description
Create Table Defines whether the table for the HighLow generator should be created.
Grab Size The number of new keys fetched in one server call.
Ignore Missing Tables If a table is missing in the actual database, the key generator table entry will not be written and no objects can be created.
Key Column Length Defines the length of the primary key column that stores the table name.
Key Column Name Defines the name of the primary key column that stores the table name.
Key Column OpenAccess Type Defines the SQL type for the primary key column that stores the table name.
Start The starting value as given out by the key generator.
Table Name Defines the table name used by the HighLow key generator.
Value Column Name Defines the name of the column that stores the most recent primary key value.

Second level cache

Property Description
Cache Enabled Controls whether the second-level cache is enabled.
Cache Number Of Objects Controls the number of objects to be cached.
Cache Number Of Objects Per Query Results Controls the maximum number of objects in a cached query result. If the query result contains a number of results less than or equal to this value, the result is cached; otherwise, it is not.
Cache Number Of Query Results Controls the number of query results to cache.
Cache Query Results Controls whether the second-level cache should also cache query results.
Cache Strategy Controls the default strategy to use.

Tracing and logging

Property Description
Downloader Append Appends to the end of an existing event text file, if any.
Downloader Date Format Date format for the event text file.
Downloader Event Binary Write events to a binary file (filename.oalog).”), Category(“Tracing & Logging”).
Downloader Event Poll Seconds Time in seconds between polls of the event ring buffer.
Downloader Event Text Writes events to a text file (filename.txt).
Downloader Filename Data is written to files based on this name (default is openaccess_{ConnectionId}).
Downloader Max File Size KB Maximum size of a file before rollover to backup.
Downloader Metric Binary Writes metric snapshots to a binary file (filename.oametric).
Downloader Metric Poll Seconds Time in seconds between polls of the metric snapshot ring buffer.
Downloader Number Of Backups Number of old log files to keep (filename.oalog.1, filename.oalog.2, and so on).
Event Store Capacity Number of log events to cache.
Log Errors To Windows Event Log Logs errors to the Windows Application Event Log.
Log Events Controls the logging level.
Log Events To Sys Out Logs events to the System.Console.
Log Events To Trace Logs events to the System.Diagnostics.Trace framework.
Metric Store Capacity Controls the capacity of the metric snapshot store.
Metric Store Snapshot Interval Controls the interval for performing metric snapshots in milliseconds.
Stack Trace Controls whether messages have a stack trace attached.

See also

  • Configuration generation