Siebel Analytics Server Administration Guide > Query Caching in Siebel Analytics Server >
Purging Cache Programmatically
The Analytics Server provides ODBC-extension functions for purging cache entries programmatically. Scripts that call these ODBC-extension functions must run under an administrator logon ID. Only administrators have the right to purge cache. The following ODBC functions affect cache entries associated with the repository specified by the ODBC connection:
- SAPurgeCacheByQuery. Purges a cache entry that exactly matches a specified query. For example, using the following query, you would have a query cache entry that retrieves the names of all employees earning more than $100,000:
select lastname, firstname from employee where salary > 100000;
The following call programmatically purges the cache entry associated with this query:
Call SAPurgeCacheByQuery('select lastname, firstname from employee where salary > 100000' );
- SAPurgeCacheByTable. Purges all cache entries associated with a specified physical table name (fully qualified) for the repository to which the client has connected. This function takes up to four parameters representing the four components (database, catalog, schema and table name proper) of a fully qualified physical table name. For example, you might have a table with the fully qualified name of DBName.CatName.SchName.TabName. To purge the cache entries associated with this table in the physical layer of the Siebel Analytics repository, execute the following call in a script:
Call SAPurgeCacheByTable( 'DBName', 'CatName', 'SchName', 'TabName' );
- SAPurgeAllCache. Purges all cache entries. The following is an example of this call:
Call SAPurgeAllCache();
|