Creating a New ODBC Server
To create a new server, follow these steps:
Click the Groups icon in the left tree menu.
Click the group in which you want to define the ODBC server (for example, Default).
Click the App Servers icon on the left tree menu.
Click the Create ODBC tab at the top right. The Create ODBC Server page appears.
In the ODBC Server Name field, enter a shorthand name for this ODBC server. MarkLogic Server will use this name to refer to this server on display screens in the Admin Interface.
In the Root field, enter the name of the directory in which you will store your data. If the Modules field is set to a database, then the root must be a directory URI in the specified modules database.
If the Modules field is set to file system, then the root directory is either a fully-qualified pathname or is relative to the directory in which MarkLogic Server is installed. The following table shows the default installation directory for each platform:
Platform
Program Directory
Microsoft Windows
C:\Program Files\MarkLogic
Red Hat Linux
/opt/MarkLogic
Mac OS X
~/Library/MarkLogic
Note
Unless you specify a shared drive, all hosts in the group will need to have a copy of the XQuery programs in the directory specified above.
Warning
Do not create ODBC server root directories named Docs, Data, or Admin. These directories are reserved by MarkLogic Server for other purposes. Creating ODBC server root directories with these names can result in unpredictable behavior of the server and may also complicate the software upgrade process.
In the Port field, enter the port number through which you want to make this ODBC server available. The default PostgreSQL listening socket port is 5432. The port number must be unique to this ODBC server and must not be assigned to any other ODBC, HTTP, XDBC or WebDAV server.
In the Modules field, select the database to use as the modules database for your XQuery documents, or leave it at the default of storing your XQuery modules on the file system. For information on what a modules database is, see Modules Database.
In the Database field, select the database to be accessed by this ODBC server. This database should be set up with the range indexes and schema views to support the SQL application. For details on how to set up a database to support SQL applications, see the SQL Data Modeling Guide. Multiple ODBC, HTTP, XDBC, and WebDAV servers can access the same database.
Scroll to the Authentication field. Select an authentication scheme, as described in Types of Authentication in Securing MarkLogic Server. The default is digest, which uses encrypted passwords.
If you select application-level in authentication, you will also need to fill in a Default User. Anyone accessing the ODBC server is automatically logged in as the Default User until the user logs in explicitly.
Warning
If you use an admin user (admin) as the Default User (an authorized administrator with the
admin
role), then everyone who uses this app server is automatically a user with theadmin
role, which effectively turns off security for this app server.Scroll to the Privilege field near the bottom of the screen. This field represents the privilege needed to access (login to) the server. You may leave this field blank.
A user accessing the ODBC server must have the execute privilege selected in order to access the ODBC server. If you chose application-level authentication above, you should ensure that the default user has the selected privilege.
Set any other properties for this app server, as appropriate to your needs:
Last Login and Display Last Login are described in Storing and Monitoring the Last User Login Attempt.
Backlog specifies the maximum number of pending connections allowed on the ODBC server socket.
Threads specifies the maximum number of app server threads.
Request Timeout specifies the maximum number of seconds before a socket receives a timeout for the first request.
Keep Alive timeout specifies the maximum number of seconds before a socket receives a timeout for subsequent requests over the same connection.
Session Timeout specifies the maximum number of seconds before an inactive session times out.
Max Time Limit specifies the upper bound for any request's time limit. No request may set its time limit (for example with
xdmp:set-request-time-limit()
) higher than this number. The time limit, in turn, is the maximum number of seconds allowed for servicing a query request. The app server gives up on queries which take longer, and returns an error.Default Time Limit specifies the default value for any request's time limit, when otherwise unspecified. A request can change its time limit using
xdmp:set-request-time-limit()
. The time limit, in turn, is the maximum number of seconds allowed for servicing a query request. The app server gives up on queries which take longer, and returns an error.Static Expires adds an "expires" ODBC header for static content to expire after this many seconds.
Pre-commit Trigger Limit specifies the maximum number of pre-commit triggers a single statement against this app server can invoke. For more information on triggers, see Using Triggers to Spawn Actions in the Application Developer’s Guide.
Pre-commit Trigger Depth specifies the maximum depth (how many triggers can cause other triggers to fire, which in turn cause others to fire, and so on) for pre-commit triggers that are executed against this app server. For more information on triggers, see Using Triggers to Spawn Actions in the Application Developer’s Guide.
Collation specifies the default collation for queries run in this app server. This will be the collation used for string comparison and sorting if none is specified in the query. For details, see Encodings and Collations in the Search Developer’s Guide.
Concurrent Request Limit specifies the maximum number of requests any user may have running at a specific time. 0 indicates no maximum. For details, see Managing Concurrent User Requests.
Log Errors specifies whether to log uncaught errors for this app server to the ErrorLog.txt file. This is useful to log exceptions that might occur on an app server for later debugging.
Debug Allow specifies whether to allow requests against this app server to be stopped for debugging, using the MarkLogic Server debugging APIs.
Profile Allow specifies whether to allow requests against this app server to be profiled, using the MarkLogic Server profiling APIs. For details, see Profiling Requests to Evaluate Performance in the Query Performance and Tuning Guide.
Default XQuery Version specifies the default XQuery language for this app server if an XQuery module does explicitly declare its language version.
Multi Version Concurrency Control specifies how strict queries behave about getting the latest timestamp. This only affects query statements, not update statements. For details about queries and transactions in MarkLogic Server, see Understanding Transactions in MarkLogic Server in the Application Developer’s Guide.
The Error Handler and URL Rewriter fields are described in Controlling App Server Access, Output, and Errors in the Application Developer’s Guide.
The properties associated with SSL support are described in Configuring SSL on App Servers in Securing MarkLogic Server.
Scroll to the top or bottom and click OK.
The ODBC server is now created. Creating an ODBC server is a “hot” admin task; the changes take effect immediately. For information and setup instructions for managing user sessions and/or keeping track of login attempts, see Managing User Requests and Monitoring Login Attempts.