Service Operations Insight

 View Only

Script to create CCC tablespaces, CCC user name and Grant Privileges 

May 11, 2015 01:07 PM

Important : Please go through the below content before using the attached script.

 

The content below is the extract from CCC 2.8 installation guide, you will also find the attached SQL script useful that will help you create CCC tablespaces, CCC user name and Grant Privileges to the oracle user.

 

You must ensure that the Oracle database is installed and configured before installing Capacity Command Center (CCC). CCC does not require any changes to the Oracle configuration default settings to run.


Note:

1. Consult your database administrator to obtain information about the Oracle database.

2. The values used in the sql file are minimum installation values. Enterprise implementations typically require larger values than the minimum. Please work with your CA Technical Services contact to determine appropriate implementation architecture and sizing for your environment.

3. The example script shows the statements that can be used to create the CCC table spaces. You can modify them to suit your own requirements. The path shown for the data files directory is an example only. Check with your database administrator for the path used in your environment.

 

The Capacity Command Center database user requires the following permissions, the attached SQL file may not cover all of these permissions below, please work with your Oracle Database Administrator before using this file.

  • READ access to Oracle dictionary objects, including user_table and dual.
  • CONNECT, ANALYZE ANY, CREATE VIEW, CREATE JOB, and RESOURCE privileges to the database user name.
  • EXECUTE permission on the DBMS_RANDOM package.
  • EXECUTE permission for the DBMS_XMLGEN package.
  • EXECUTE permission for the DBMS_OUTPUT package.
  • EXECUTE permission on the DBMS_SCHEDULER package.

Important: The process that is responsible for purging the data in the staging tables is dependent on the DBMS_SCHEDULER package. Without the EXECUTE privilege, the daily purge process will not be able to purge data in the staging tables.

 

Permissions for partitioning:

To run the partitioning process, the CCC user must have the following privilege in addition to the other required permissions:

  • Executive privilege on the DBMS_METADATA package
  • Explicitly granted CREATE TABLE privilege

Important: The CREATE TABLE privilege must be granted explicitly to the CCC user using the following command:

 

grant create table to <cccuser>;


A CREATE TABLE privilege granted through the CCC user's role privileges is not adequate.

For information about other requirements for partitioning, see the Capacity Command Center Database Partitioning User Guide.

Statistics
0 Favorited
1 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
cccuser.sql.zip   1 KB   1 version
Uploaded - May 29, 2019

Tags and Keywords

Comments

May 18, 2015 07:14 AM

READ access to Oracle dictionary objects, including user_table and dual : We need this because we look at some of the meta tables in Oracle while creating objects. Dual is used in lot of queries to get static content

 

Please check the justification for other permissions in this link below

https://communities.ca.com/message/241718103#241718103

May 18, 2015 06:18 AM

Can you please explain why the GRANT SELECT ANY DICTIONARY is required?  We are being challenged on that; it seems that there may be a security concern.

May 14, 2015 12:28 PM

Here is another version of the script that is more inline with what DBA's are using...

 

Script – Create Table Spaces and TEMP space

 

-- Setup Table Spaces

-- THIS IS DESIGNED TO WORK with SQLPLUS, Copy and paste the complete script into the SQLPLUS window.

-- This is the LINUX Script for setting up tablespaces.

-- Location of files is set to:

--   ----    '/home/oracle/app/oracle/oradata/orcl/'

--   search and replace as needed!

-- HYP_DM_TBL                  - initializes 800M TableSpace that will grow to 24GB MAX

-- HYP_DM_IDX                   - initializes 600M TableSpace that will grow to 16GB MAX

-- HYP_DM1_STG               - initializes 600M TableSpace that will grow to 8GB MAX

-- HYP_DM1_STG_IDX       - initializes 200M TableSpace that will grow to 8GB MAX

-- TEMP21                            - initializes 1GB  TEMP Space that will grow to 4= 8GB MAX

-- Adjust names of Tables with SEARCH and REPLACE.

-- Adjust sizes by adjusting MAXSIZE or ADDING more DBF file definition lines.=

-- ------------------------------------------------------------------

---------------------------- HYP_DM1_TBL  (Tablespace) --

Prompt Tablespace HYP_DM1_TBL;

CREATE TABLESPACE HYP_DM1_TBL DATAFILE

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_TBL.DBF'        SIZE 500M AUTOEXTEND ON NEXT 200M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_TBL_2.DBF'    SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_TBL_3.DBF'    SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_TBL_4.DBF'    SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE 8G

NOLOGGING

DEFAULT

COMPRESS BASIC

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO

FLASHBACK ON

/

---------------------------- HYP_DM1_IDX  (Tablespace) --

Prompt Tablespace HYP_DM1_IDX;

CREATE TABLESPACE HYP_DM1_IDX DATAFILE

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_IDX.DBF'   SIZE 500M AUTOEXTEND ON NEXT 200M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_IDX_2.dbf' SIZE 100M AUTOEXTEND ON NEXT 500M MAXSIZE 8G

NOLOGGING

DEFAULT COMPRESS BASIC

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO

FLASHBACK ON

/

---------------------------- HYP_DM1_STG  (Tablespace) --

Prompt Tablespace HYP_DM1_STG;

CREATE TABLESPACE HYP_DM1_STG DATAFILE

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_STG.DBF'     SIZE 500M AUTOEXTEND ON NEXT 200M MAXSIZE 4G,

  '/home/oracle/app/oracle/oradata/orcl/HYP_DM1_STG_1.DBF' SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE 4G

NOLOGGING

DEFAULT COMPRESS BASIC

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO

FLASHBACK ON

/

 

Prompt Tablespace HYP_DM1_STG_IDX;

--

------------------------------- HYP_DM1_STG_IDX  (Tablespace)

--

Prompt Tablespace HYP_DM1_STG_IDX;

CREATE TABLESPACE HYP_DM1_STG_IDX DATAFILE

'/home/oracle/app/oracle/oradata/orcl/HYP_DM1_STG_IDX.DBF'   SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE 4G,

'/home/oracle/app/oracle/oradata/orcl/HYP_DM1_STG_IDX1.DBF' SIZE 100M AUTOEXTEND ON NEXT 200M MAXSIZE 4G

NOLOGGING

DEFAULT

COMPRESS BASIC

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO

FLASHBACK ON

/

 

--------------------------------- CREATE TEMP Space "TEMP21"--

------------------------------ TEMP21  (Tablespace) --

Prompt Tablespace TEMP21;

CREATE TEMPORARY TABLESPACE TEMP21 TEMPFILE

  '/home/oracle/app/oracle/oradata/orcl/temp011.dbf' SIZE 500M          AUTOEXTEND ON NEXT 500M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/temp021.dbf' SIZE 100M          AUTOEXTEND ON NEXT 500M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/temp031.dbf' SIZE 100M          AUTOEXTEND ON NEXT 500M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/temp041.dbf' SIZE 100M          AUTOEXTEND ON NEXT 500M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/temp051.dbf' SIZE 100M          AUTOEXTEND ON NEXT 500M MAXSIZE 8G,

  '/home/oracle/app/oracle/oradata/orcl/temp061.dbf' SIZE 100M          AUTOEXTEND ON NEXT 500M MAXSIZE 8G

TABLESPACE GROUP ''

EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M

//

 

--Script – Create UserID owner of Schema

-- Create UserID that will be Schema Owner

-- ID for this example will be "HYP_CCC3" search and replace to something else if desired.

 

Prompt User HYP_CCC3;

--

-- HYP_CCC3  (User)

--

Prompt User HYP_CCC3;

CREATE USER HYP_CCC3

  IDENTIFIED BY <password>

  DEFAULT TABLESPACE HYP_DM_TBL

  TEMPORARY TABLESPACE TEMP2

  PROFILE DEFAULT

  ACCOUNT UNLOCK

/

  -- 2 Roles for HYP_CCC3

  GRANT CONNECT TO HYP_CCC3

/

--  GRANT DBA TO HYP_CCC3   -- This is not required...but it makes the installation easier!

--/

--  ALTER USER HYP_CCC3 DEFAULT ROLE ALL

--/

 

-- 14 System Privileges for HYP_CCC3

  GRANT ANALYZE ANY TO HYP_CCC3

/

  GRANT CREATE CLUSTER TO HYP_CCC3

/

  GRANT CREATE INDEXTYPE TO HYP_CCC3

/

  GRANT CREATE JOB TO HYP_CCC3

/

  GRANT CREATE OPERATOR TO HYP_CCC3

/

  GRANT CREATE PROCEDURE TO HYP_CCC3

/

  GRANT CREATE SEQUENCE TO HYP_CCC3

/

  GRANT CREATE SYNONYM TO HYP_CCC3

/

  GRANT CREATE TABLE TO HYP_CCC3

/

  GRANT CREATE TRIGGER TO HYP_CCC3

/

  GRANT CREATE TYPE TO HYP_CCC3

/

  GRANT CREATE VIEW TO HYP_CCC3

/

  GRANT SELECT ANY DICTIONARY TO HYP_CCC3

/

  GRANT UNLIMITED TABLESPACE TO HYP_CCC3

/

  -- 3 Object Privileges for HYP_CCC3

  Prompt Privs on PACKAGE SYS.DBMS_RANDOM to HYP_CCC3;

  GRANT EXECUTE ON SYS.DBMS_RANDOM TO HYP_CCC3

/

  Prompt Privs on PACKAGE SYS.DBMS_SCHEDULER to HYP_CCC3;

  GRANT EXECUTE ON SYS.DBMS_SCHEDULER TO HYP_CCC3

/

  Prompt Privs on PACKAGE SYS.DBMS_XMLGEN to HYP_CCC3;

  GRANT EXECUTE ON SYS.DBMS_XMLGEN TO HYP_CCC3

/

 

Related Entries and Links

No Related Resource entered.