Stored procedures#
Apart from emulating SQL Server’s stored procedures, Querona introduces some of its own.
All of them start with qua_
prefix to be easily distinguished from regular SQL Server stored procedures.
Administrative#
Administrative stored procedures should be used by power users and administrators. Note that most of the tasks can also be achieved conveniently using Querona Administration Portal user interface.
Stored procedure name |
Description |
---|---|
Flushes the whole execution plan cache. |
|
Attempts garbage collection to reclaim unused memory. |
|
Configures federator for an agent. Given connection will be the new default federator for the designated agent. |
Cache management#
Stored procedure name |
Description |
---|---|
Creates a primary/secondary view copy for the materialized view. |
|
Removes data from Spark in-memory cache for given table. |
|
Loads cache for a given view. |
|
Fills a primary/secondary view copy. |
|
Inserts new rows into an incrementally cached view. |
|
Conducts the whole process of an incremental load of new rows. |
|
Invalidates and then loads Spark in-memory cache for given table. |
|
Materializes a cached view. |
|
Refreshes the materialized view by reloading the cache. |
|
Sets reload mode for a given view. |
|
Sets the cache mode for a given view. |
|
Allows setting the view cache internal status flag. Useful for manual cache management. |
|
Sets new incremental marker value for given table or view. |
|
Sets incremental marker column for given table or view. The column will be later used for incremental load process. |
|
Switches view copy between the primary and secondary table for cached views with two rotated tables. |
|
Drops persistent cache and recreates it. |
CData#
Stored procedure name |
Description |
---|---|
Gets the authentication token used to authenticate to the service. |
|
Gets an authorization URL from the data source. |
Connection management#
Stored procedure name |
Description |
---|---|
Creates a connection to a data source. A connection allows for access to a single data source (endpoint). |
|
Creates or updates a mapping between a connection on the local instance of Querona and a security account on a remote data source. |
|
Removes a connection from the list of known connections on the instance of Querona. |
|
Returns a list of connections (aka. linked servers) accessible by the current user. |
|
Tests the connection to a data source. |
|
Updates a connection to a data source. |
Diagnostics#
Stored procedure name |
Description |
---|---|
Dynamically changes Querona logging level. |
|
Fetches a data set with details of all jobs that the schedule is aware of. |
Job management#
Stored procedure name |
Description |
---|---|
Adds a job executed by the job scheduler. |
|
Adds a step (operation` to a job. |
|
Creates a schedule that can be used by any number of jobs. |
|
Sets a schedule for a job. |
|
Removes an association between a schedule and a job. |
|
Deletes a job. |
|
Returns information about jobs. |
|
Returns information for the steps in a job. |
|
Instructs the scheduler to execute a job immediately. |
|
Changes the attributes of a job. |
|
Changes the setting for a step in a job that is used to perform automated activities. |
|
Changes the settings for a schedule. |
|
Deletes a step from the job. |
|
Deletes a schedule. |
Utility#
Stored procedure name |
Description |
---|---|
Orders the underlying system to update its object-level, or column-level statistics, or both. |
|
Executes provider-specific SQL query or command on a given connection. |
|
Updates statistics (row count and distinct count` for a given table. |
|
Updates row count statistics for a given table. |
Metadata management#
Stored procedure name |
Description |
---|---|
Returns the metadata for the first result set of the T-SQL batch. |
|
Retrieves partitioning schema for a given view. |
|
Sets partitioning mode and schema for a given view. |
|
Generates views on target database based on objects (tables or views` from a source database). |
|
Generates views on target database based on objects (tables or views` from a source database). |
Spark management#
Stored procedure name |
Description |
---|---|
Transitions the node to Active, regardless of Zookeeper state. |
|
Transitions the node to StandBy, regardless of Zookeeper state. |
|
Forces an OS-level kill on the given Spark process. |
|
Tries to find a running Spark process in the OS. If not found, a new process is started. |
|
Sends a stop-server signal to the remote driver. |
|
Releases Spark context and transitions driver to non-initialized state. |
|
Sends a stop-server signal to the remote driver. |
SQL Server Legacy#
The following internal stored procedures are internally supported by Querona engine for compatibility with TDS protocol and technologies like OLE DB:
Procedure name |
Description |
---|---|
sp_prepare |
Prepares a parameterized Transact-SQL statement and returns a statement handle for execution. |
sp_prepexec |
Prepares and executes a parameterized Transact-SQL statement. |
sp_execute |
Executes a prepared Transact-SQL statement using a specified handle and optional parameter value. |
sp_unprepare |
Discards the execution plan created by the sp_prepare stored procedure. |
sp_executesql |
Executes a Transact-SQL statement or batch that can be reused many times, or one that has been built dynamically. |
sp_columns |
Returns column information for the specified objects that can be queried in the current environment. |
sp_special_columns |
Returns the optimal set of columns that uniquely identify a row in the table. |
sp_tables |
Returns a list of objects that can be queried in the current environment. |
sp_statistics |
Returns a list of all indexes and statistics on a specified table or indexed view. |
sp_fkeys |
Returns logical foreign key information for the current environment. |
sp_pkeys |
Returns primary key information for a single table. |
sp_describe_undeclared_parameters |
Returns a result set that contains metadata about undeclared parameters in a Transact-SQL batch. |
sp_changeobjectowner |
Changes the owner of an object in the current database. |
xp_msver |
Returns version information compatible with Microsoft SQL Server. |
Honorable mentions#
The following stored procedures are internally supported by Querona engine, but are not directly usable from queries:
sp_catalogs_rowset
sp_catalogs_rowset
sp_catalogs_rowset
sp_catalogs_rowset2
sp_columns_100
sp_columns_100_rowset
sp_columns_100_rowset2
sp_columns_rowset
sp_columns_rowset
sp_columns_rowset
sp_columns_rowset2
sp_columns_managed
sp_indexes_rowset
sp_indexes_rowset
sp_indexes_rowset
sp_indexes_rowset2
sp_indexcolumns_managed
sp_tableswc
sp_tables_info_rowset
sp_tables_info_rowset
sp_tables_info_rowset2
sp_statistics_100
sp_statistics_rowset
sp_statistics_rowset
sp_statistics_rowset2
sp_oledb_database
sp_oledb_ro_usrname
sp_oledb_defdb
sp_oledb_deflang
sp_oledb_language
sp_views_rowset
sp_views_rowset2
sp_schemata_rowset
sp_schemata_rowset
sp_tables_rowset
sp_tables_rowset
sp_tables_rowset
sp_tables_rowset2
sp_primary_keys_rowset
sp_primary_keys_rowset
sp_primary_keys_rowset
sp_primary_keys_rowset
sp_primary_keys_rowset2
sp_provider_types_100_rowset
sp_provider_types_90_rowset
sp_provider_types_rowset
sp_reset_connection
sp_foreign_keys_rowset
sp_foreign_keys_rowset
sp_foreign_keys_rowset
sp_foreign_keys_rowset
sp_foreign_keys_rowset2
sp_foreign_keys_rowset3
sp_procedures_rowset
sp_procedures_rowset
sp_procedures_rowset2
xp_qv
xp_instance_regread
xp_regread