Oracle8i Replication Management API Reference
Release 2 (8.1.6)

Part Number A76958-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Replication Management API Reference, 137 of 179


CREATE_TEMPLATE_PARM function

This function creates parameters for a specific deployment template to allow custom data sets to be created at the remote snapshot site. This function is only required when the DBA wants to define a set of template variables before adding any template objects. When objects are added to the template using the CREATE_TEMPLATE_OBJECT function, any variables in the object DDL are automatically added to the DBA_REPCAT_TEMPLATE_PARMS view.

The DBA typically uses the ALTER_TEMPLATE_PARM function to modify the default parameter values and/or prompt strings (see ALTER_TEMPLATE_PARM procedure for more information). The number returned by this function is used internally by Oracle to manage deployment templates.

Syntax

DBMS_REPCAT_RGT.CREATE_TEMPLATE_PARM (
   refresh_template_name  IN   VARCHAR2, 
   parameter_name         IN   VARCHAR2,
   default_parm_value     IN   CLOB := NULL,
   prompt_string          IN   VARCHAR2 := NULL,
   user_override          IN   VARCHAR2 := NULL)
   return NUMBER;

Parameters

Table 8-257 CREATE_TEMPLATE_PARM Function Parameters
Parameter  Description 
refresh_template_
name
 

Name of the deployment template for which you want to create the parameter. 

parameter_name
 

Name of the parameter you are creating. 

default_parm_value
 

Default values for this parameter are defined using this parameter. If a user parameter value or runtime parameter value is not present, then this default value is used during the instantiation process. 

prompt_string
 

The descriptive prompt text that is displayed for this template parameter during the instantiation process. 

user_override
 

Determines whether the user can override the default value if prompted during the instantiation process. The user is prompted if no user parameter value has been defined for this parameter. Set this parameter to 'Y' to allow a user to override the default value or set this parameter to 'N' to not allow an override. 

Exceptions

Table 8-258 CREATE_TEMPLATE_PARM Function Exceptions
Exception  Description 
miss_refresh_
template
 

The specified refresh template name is invalid or missing. 

dupl_template_parm
 

A parameter of the same name has already been defined for the specified deployment template. 

Returns

Table 8-259 CREATE_TEMPLATE_PARM Function Returns
Return Value  Description 

<system-generated number

System-generated number used internally by Oracle. 

Usage Notes

Because the CREATE_TEMPLATE_PARM function utilizes a CLOB, you must use the DBMS_LOB package when using the CREATE_TEMPLATE_PARM function. The following example illustrates how to use the DBMS_LOB package with the CREATE_TEMPLATE_PARM 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_TEMPLATE_PARM(
        refresh_template_name => 'rgt_personnel',
        parameter_name => 'region',
        default_parm_value => templob,
        prompt_string => 'Enter your region ID:',
        user_override => 'Y');
   DBMS_LOB.FREETEMPORARY(templob);
END;
/

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index