Koray Kırdinli

Yazılım ve İş Yaşamı Hakkında Paylaşımlar

10 Adımda PPM prod ortamından test ortamına restore işlemi

Öncelikle ppm için bazı komutları çalıştırabilmek için
CYWIN (komut çalıştırmak için kullandığımız bir program) denilen bir programdan faydalanacağız.

1- CYWIN-> cd c:\ppm\bin ile ppm dizinine geliyoruz
2-Yine CYWIN’de sh kStop.sh ile prod ortamını ve test ortamını ayrı ayrı kapatıyoruz
3-DAha sonra PPM’İn iki şeması olan ppmXX_rml ve ppmXX_usr ‘ların prod ortamından birer dumpını alıyoruz.
4- Test db si üzerindeki eski şemalar drop edilir
5- Allta yazdığım CreateKintanaUser.sql ile ppmXX_usr kullanıcı oluşturulur ve yeni şifre verilir.
6- CreateRMLUser.sql ile ppmXX_rml kullanıcısı oluşturulur. (Şifre verilecek)
7-Altta yazdığım GrantSysPrivs.sql sorgusunu sys as dba olarak login olarak ppmXX_usr için çalıştır.
8- Testte CYWIN-> cd c:\ppm\bin ve sh kJAVACompiler.sh
9- Testte CYWIN-> cd c:\ppm\bin ve sh khtmlupdate.sh
10- TEstte CYWIN-> cd c:\ppm\bin ve sh kStart.sh

–$Project: Dev – Kintana$
–$Folder: system$
–$Workfile: CreateKintanaUser.sql$

/*
+=============================================================+
|            Copyright (c) 1995 – 2006 Kintana, Inc.
|                      All Rights Reserved
+=============================================================+
|
|    File Name:    create_knta_user.sql
|    Object Name:
|    Description:
|       KNTA User creation script
|
+=============================================================+
|
|  Notes
+=============================================================+
*/

PROMPT
PROMPT — Name of the ITG server database schema
DEFINE KNTA_USERNAME = &1;

PROMPT
PROMPT — Password of the ITG server database schema
DEFINE KNTA_PASSWORD = &2;

PROMPT
PROMPT — Name of the DATA tablespace
DEFINE DATA_TABLESPACE = &3;

PROMPT
PROMPT — Name of the INDEX Tablespace
DEFINE INDEX_TABLESPACE = &4;

PROMPT
PROMPT — Name of the CLOB tablespace
DEFINE CLOB_TABLESPACE = &6;

WHENEVER SQLERROR EXIT 1;

CREATE USER &KNTA_USERNAME
IDENTIFIED BY “&KNTA_PASSWORD”
DEFAULT TABLESPACE &DATA_TABLESPACE
QUOTA UNLIMITED ON &DATA_TABLESPACE
QUOTA UNLIMITED ON &INDEX_TABLESPACE
QUOTA UNLIMITED ON &CLOB_TABLESPACE;

grant connect to &KNTA_USERNAME;

grant create session       to &KNTA_USERNAME;
grant create database link to &KNTA_USERNAME;
grant create procedure     to &KNTA_USERNAME;
grant create sequence      to &KNTA_USERNAME;
grant create synonym       to &KNTA_USERNAME;
grant create table         to &KNTA_USERNAME;
grant create view          to &KNTA_USERNAME;
grant create trigger       to &KNTA_USERNAME;

— In addition to the above grants, the installer will ask for ‘grant select on v$parameter to &KNTA_USERNAME’
— for which you may have to connect as sys.

exit;

–$Project: Dev – Kintana$
–$Folder: system$
–$Workfile: CreateRMLUser.sql$

/*

+=============================================================+
|    Copyright (c) 1995 – 2006 Kintana, Inc.
|                      All Rights Reserved
+=============================================================+
|
|    File Name:      KNTA_CREATE_RML_SCHEMA.SQL
|    Description:    Create the RML Schema on Install/Upgrade
|    Author:         Timothy Lam
|
+=============================================================+
| This script does the following to setup the Meta Layer Schema:
| 1. Create RML schema
|
| Usage (As System user):
| knta_create_rml_schema [rml_user] [rml_pwd] [DATA_TABLESPACE]
|   [TEMP_TABLESPACE]
|
| The script will connect you as Kintana User, so you must have
| Kintana user created.
* *************************************************************** */

— create RML User

— already connected as system

PROMPT
PROMPT — Enter the name the ITG RML schema to create
DEFINE RML_USERNAME = &1;

PROMPT
PROMPT — Enter the password the ITG RML schema name
DEFINE RML_PASSWORD = &2;

PROMPT
PROMPT — Enter the DATA tablespace
DEFINE DATA_TABLESPACE = &3;

SET SERVEROUTPUT ON SIZE 999999;

WHENEVER SQLERROR EXIT FAILURE ROLLBACK;

CREATE USER &RML_USERNAME
IDENTIFIED BY “&RML_PASSWORD”
DEFAULT TABLESPACE &DATA_TABLESPACE;

grant create session to &RML_USERNAME;
grant create table to &RML_USERNAME;
grant create view to &RML_USERNAME;
grant create synonym to &RML_USERNAME;
grant resource to &RML_USERNAME;

exit

–$Project: Dev – Kintana$
–$Folder: sys$
–$Workfile: GrantSysPrivs.sql$
–$Date: 11/12/08 1:11:56 PM PST$
–$Revision: 4$


— HP PPM Center: GrantSysPrivs.sql

— This script is provided as part of the Mercury ITG installation and upgrage
— to help you grant the necessary SYS level privileges.  When prompted you can
— run the following command:

— sqlplus sys/<sys_password>@<sid> @GrantSysPrivs.sql <db_user>

PROMPT — This script is provided as part of the HP PPM installation and
PROMPT — upgrade to help you grant the necessary SYS level privileges to the
PROMPT — ITG Schema.  In order to do this the script needs the name of the
PROMPT — Schema (DB_USERNAME in server.conf)
PROMPT

define db_user = &ITG_SCHEMA_NAME;

grant select  on v_$parameter to &db_user;

— Needed for Statistic Calculation
grant execute on dbms_stats   to &db_user;
grant select  on v_$mystat    to &db_user;
grant select  on v_$process   to &db_user;
grant select  on v_$session   to &db_user;
–grant execute on DBMS_SHARED_POOL to &db_user;

exit;

 

NOT : Scriptler anlaşılacağı üzere alıntıdır.

December 24, 2011 - Posted by | PPM | , , , , ,

3 Comments »

  1. It’s very easy to find out any topic on web as compared to books, as I found this article at this web site.

    Comment by tarot gratis | July 7, 2013 | Reply

  2. That is very attention-grabbing, You are an overly professional blogger.
    I have joined your feed and sit up for in search of extra of
    your magnificent post. Additionally, I have shared your website in my
    social networks

    Comment by la voyance | July 15, 2013 | Reply

  3. It’s really very complicated in this busy life to listen news on TV, thus I only use web for that reason,
    and get the most up-to-date news.

    Comment by mobile games | April 15, 2014 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s