Thursday, December 10, 2009

Useful Conversion and Report Script to create users

For the Conversion Schema creation process, the steps are pretty much the same as before however in the doc they simply say :

Once you have created a staging owner (STGADM), application user (STGUSER) and read access user (STGREAD), install the initial database option in the staging schema.

So to sum-up steps are :
1) Create the STGADM / STGUSER and STGREAD users
2) Initial Database load from blueprint (remember need to do FW, SP1, SP6 and then CCB)
3) Run the new Conversion.bat which calls ConvSetup.exe

For the first step, create the users, there is no sample script provided with CCB. Here is a sample script. (Essentially it is a copy of the the sql called CreateCDXUsers.Sql)

CREATE USER STGADM IDENTIFIED BY STGADM DEFAULT TABLESPACE CISTS_01TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

CREATE ROLE STG_READ;
CREATE ROLE STG_USER;

GRANT UNLIMITED TABLESPACE TO STGADM WITH ADMIN OPTION;
GRANT SELECT ANY TABLE TO STGADM;
GRANT CREATE DATABASE LINK TO STGADM;
GRANT CONNECT TO STGADM;
GRANT RESOURCE TO STGADM;
GRANT CREATE PUBLIC SYNONYM TO "STGADM";
GRANT CREATE TRIGGER TO "STGADM";
GRANT DROP ANY SYNONYM TO "STGADM";
GRANT CREATE ANY SYNONYM TO "STGADM";
GRANT SELECT ANY DICTIONARY TO STGADM;

Grant grant any role , grant any privilege , select any table , create any synonym , drop any synonym ,execute any procedure to STGADM with admin option;
GRANT SELECT ANY DICTIONARY TO STGADM;
GRANT DBA to STGADM;

CREATE USER STGUSER PROFILE DEFAULT IDENTIFIED BY STGUSER DEFAULT TABLESPACE CISTS_01 TEMPORARY TABLESPACE TEMPACCOUNT UNLOCK;

GRANT SELECT ANY TABLE TO STGUSER;
GRANT STG_USER TO STGUSER;
GRANT STG_READ TO STGUSER;
GRANT CONNECT TO STGUSER;

CREATE USER STGREAD IDENTIFIED BY STGREAD DEFAULT TABLESPACE CISTS_01 TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

GRANT SELECT ANY TABLE TO STGREAD;
GRANT STG_READ TO STGREAD;
GRANT CONNECT TO STGREAD;

For Reporting (i.e. interface with BI Publisher or Crystal Business Objects) I have created a similar one as well:
(the last two statement may give errors if the objects are not present in the database)

Create user RPTUSER Identified by RPTUSER
default tablespace cists_01 temporary tablespace temp;

Grant connect to RPTUSER;
GRANT CIS_READ TO RPTUSER;
grant create procedure to rptuser;
grant execute on cisadm.cr_package to rptuser;
grant execute on cisadm.CISAINFO to rptuser;

1 comment:

Ravi said...

Hi Allan,
I am a recent entrant into Oracle CC&B conversion process. I have downloaded the dump for oracle CC&B from the e-delivery and installed only the DB and conversion on my laptop. But, I am seeing some challenges with no answer in CC&B guide.
Personal:
1)After setting up the conversion environment on my laptop I can see the CISADM tables, though the views are created after I execute convsetup.exe are not visible in schema.
Project:
2) We are upgrading from 1.5.15 to 2.3.1. I have move legacy data over the existing data in oracle CC&B. Can, you suggest any check points to be considered in specific for DM.
3) We are not using the conversion mapping tool kit for our project.

It, will be great if you could provide any help in this regards.
My e-mail address is ravi.lokineani@hotmail.co.uk
Thanks,
Ravi