Rem
Rem This file is used to install the cache example
Rem package and the packages of the portlets it implements.
Rem
Rem Usage:  login to sqlplus 
Rem In sqlplus type the following:
Rem @install.sql 
Rem

set serveroutput on size 1000000
set define on
spool install.log

prompt    #############################################
prompt    Installation of Caching Portlet:  
prompt    bundled with the Cache_Provider. 
prompt    #############################################
prompt Sample Portlets SQL*Plus Installer

--
-- description: This shell script installs the services portlet. 
--              It uses sqlplus. All arguments will be validated before the
--              install starts.  A typical install will take about 5 minutes.
--
set define '&'
prompt
prompt Please enter the database name(ORACLE_SID) you wish to connect to...
undefine portal_sid
define portal_sid=&portal_sid
prompt
prompt Please enter the schema name of the Portal database objects...
undefine portal_schema
define portal_schema=&portal_schema
prompt
prompt Please enter the password of this Portal schema...
undefine portal_password
define portal_password = &portal_password
prompt
prompt Please enter the schema name for the Provider of the Sample portlets...
undefine prov_schema
define prov_schema=&prov_schema
prompt
prompt Please enter the password of this Provider schema...
undefine prov_password
define prov_password=&prov_password
prompt
prompt 
prompt Begining Sample Portlets install ..
prompt ...portal_sid:            &&portal_sid
prompt ...portal_schema:         &&portal_schema
prompt ...portal_password:       *************
prompt ...prov_schema:           &&prov_schema
prompt ...prov_password:         *************
prompt 
prompt Note:  If the schema where this provider is installed
prompt is not the portal schema then the provsyns.sql script
prompt needs to be run prior to running this script.  
prompt The provsyns.sql script is in the wwc directory.  
prompt Instructions of how to run the provsyns.sql
prompt script is included in the script.
prompt 
prompt If everything is o.k, just press <enter>
prompt otherwise kill this SQL*Plus session and run it again
undefine ok_to_proceed
define ok_to_proceed=OK&ok_to_proceed
prompt

Rem Connecting to Provider Schema
connect &&prov_schema./&&prov_password.@&&portal_sid;
show user
Rem Installing the portlet package and the services provider package 
@@cache_install &&portal_schema &&prov_schema

set define on
Rem Connecting to Portal Schema
connect &&portal_schema./&&portal_password.@&&portal_sid; 
Rem Installing and registering the Provider 
@@cache_register &&portal_schema &&prov_schema 


prompt =======================================================
prompt Installation of cache portlets finished.
prompt Please check install.log file for any errors.
prompt If no errors mentioned in the log file, you can now
prompt add the Validation based and Expiry based Portlets  
prompt implemented by the Cache_Provider to your Portal pages.  
prompt =======================================================

spool off;
