Skip Headers

Oracle® Database Advanced Replication Management API Reference
10g Release 1 (10.1)

Part Number B10733-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
View PDF

CREATE_USER_PARM_VALUE Function

This function predefines deployment template parameter values for specific users. For example, if you want to predefine the region parameter as west for user 33456, then you would use the this function.

Any values specified with this function take precedence over default values specified for the template parameter. The number returned by this function is used internally by Oracle to manage deployment templates.

Syntax

DBMS_REPCAT_RGT.CREATE_USER_PARM_VALUE (
   refresh_template_name    IN   VARCHAR2, 
   parameter_name           IN   VARCHAR2,
   user_name                IN   VARCHAR2,
   parm_value               IN   CLOB := NULL)
  return NUMBER;

Parameters

Table 21-33 CREATE_USER_PARM_VALUE Function Parameters  
Parameter Description
refresh_template_name

Specifies the name of the deployment template that contains the parameter you are creating a user parameter value for.

parameter_name

Name of the template parameter that you are defining a user parameter value for.

user_name

Specifies the name of the user that you are predefining a user parameter value for.

parm_value

The predefined parameter value that will be used during the instantiation process initiated by the specified user.

Exceptions

Table 21-34 CREATE_USER_PARM_VALUE Function Exceptions  
Exception Description
miss_refresh_template

Specified deployment template name is invalid or missing.

dupl_user_parm_values

A parameter value for the specified user, parameter, and deployment template has already been defined. Query the DBA_REPCAT_USER_PARM_VALUES view for a listing of existing user parameter values.

miss_template_parm

Specified deployment template parameter name is invalid or missing.

miss_user

Specified user name is invalid or missing.

Returns

Table 21-35 CREATE_USER_PARM_VALUE Function Returns
Return Value Description

<system-generated number>

System-generated number used internally by Oracle.

Usage Notes

Because the CREATE_USER_PARM_VALUE function utilizes a CLOB, you must use the DBMS_LOB package when using the this function. The following example illustrates how to use the DBMS_LOB package with the CREATE_USER_PARM_VALUE function:

DECLARE
   tempstring VARCHAR2(100);
   templob CLOB;
   a NUMBER;
BEGIN
   DBMS_LOB.CREATETEMPORARY(templob, TRUE, DBMS_LOB.SESSION);
   tempstring := 'REGION 20';
   DBMS_LOB.WRITE(templob, length(tempstring), 1, tempstring);
   a := DBMS_REPCAT_RGT.CREATE_USER_PARM_VALUE(
        refresh_template_name => 'rgt_personnel',
        parameter_name => 'region',
        user_name => 'BOB',
        user_parm_value => templob);
   DBMS_LOB.FREETEMPORARY(templob);
END;
/