GoldenGate gg_common.ksh script library

This is the script library for GoldenGate

Current development is taking place on

Function List
gg_cr_env – Create the environment file for a particular gg server, this will create an environment file to setup GG
gg_status


#!/bin/ksh
############################################################################
# Script Name..: gg_common.ksh
# Description..: Common GG functions for inclusion to all scripts
# Author.......: Michael Culp
# Date.........: 10/25/2017
# Version......: .81
# Modified By..: Michael Culp
# Date Modified: 05/18/2017
# Comments.....: Change this library to make mods to all functions
# Schema owner.:
# Dependent on.: N/A
# Script type..: function library
# Function list:
############################################################################

db_fixes_ver ()
{

clear
echo
echo "------------------------------"
echo "  Databases fixes by version  "
echo "------------------------------"
echo

sqlplus -s "/ as sysdba" <<EOF
set lines 150
set pages 150

select optimizer_feature_enable,
       count(*)
  from v\$system_fix_control
 group by optimizer_feature_enable
 order by 1 asc;

EOF

}


test01()
{

###############################################################################################
# This is a test script designed to extract some values but shows the date and time properly
###############################################################################################
sqlplus -s "/ as sysdba" <<EOF
set lines 150
set pages 150
alter session set nls_date_format="YYYY MM DD hh24:mi:ss"

select thread#, sequence#, first_scn, to_char(first_time, 'YYYY MM DD HH24:MI:SS') from dba_registered_archived_log where thread#=1 and sequence# in (510830,510977) order by thread#;

select thread#, sequence#, first_scn, to_char(first_time, 'YYYY MM DD HH24:MI:SS') from dba_registered_archived_log where thread#=2 and sequence# in (594911,595018) order by thread#;

select thread#, sequence#, first_scn, to_char(first_time, 'YYYY MM DD HH24:MI:SS') from dba_registered_archived_log where thread#=3 and sequence# in (306761,306822) order by thread#;

select thread#, sequence#, first_scn, to_char(first_time, 'YYYY MM DD HH24:MI:SS') from dba_registered_archived_log where thread#=4 and sequence# in (309620,309681) order by thread#;

EOF
}

###################################################
# GoldenGate create function set
###################################################
sho_gg_cmd()
{

clear

echo ""
echo ""
echo "chk_gg_status                    - info all and abended processes                   "
echo ""
echo "cp_gg_comm                       - copies the gg_common.ksh to a specific directory "
echo ""
echo "gg_cap_procs / gg_cap_procs.ksh  - shows the internal capture processes "
echo ""
echo "gg_version   / gg_version_fn.ksh - shows the version                    "
echo ""
echo "par_proc                         - Show the parallel processes                      "
echo ""

}


chk_gg_status()
{

###########################################################################
# All this is doing is pulling the info all, then looking for
# ABENDED processes
###########################################################################



# constants
# -------------------------------------------------------------------------
GGS_HOME=/oracle/product/12.1/gg_1
ORACLE_HOME=/oracle/product/11.2.0/db_1
GGSMON=$GGS_HOME/ggsmon
MAILTO=mike.culp@gmail.com

# no more editting past this point
# -------------------------------------------------------------------------
LD_LIBRARY_PATH=${ORACLE_HOME}/lib
export LD_LIBRARY_PATH

###########################################################################
# for some utter reason you need to cd to Golden Gate home or else i got
# Could not load program /ora/product/goldengate/112101/ggsci:
#         Dependent module libgglog.a could not be loaded.
# Could not load module libgglog.a.
# System error: No such file or directory
###########################################################################

cd ${GGS_HOME}

###########################################################################
# start golden gate with eof and execute 'info all' and
###########################################################################

gg_1=`${GGS_HOME}/ggsci << EOF
info all
EOF`

echo "info all output: " $gg_1

# grep for ABENDED string
# golden_gate_infoall=`echo $golden_gate_infoall | grep ABENDED`

gg_2=`cat $gg_1|grep APPENDED|cut -d":" -f 1,2,4| tr ":" " "|tr -s '[:space:]'|cut -d" " -f1,2,3,4,5,6 `


# echo "Abended proc :" $golden_gate_infoall

if [[ "" = ${gg_2} ]] ;
then
   exit 0
else
   # found 'ABENDED' - send email
   # echo $golden_gate_infoall | mailx -s "One or more Golden Gate processes abended at $(hostname)" ${MAILTO}
   echo "Abended proc :" `echo $gg_2`

   exit 2
fi
}

cp_gg_comm()
{

################################################################
# This will copy the gg_common.ksh file to the correct directory
# after editing to get it in the right place
################################################################

cp gg_common.ksh /oracle/product/12.1/gg_1

}


gg_cap_procs()
{

################################################################
# Show the capture processes for a particular database
################################################################


sqlplus -s "/ as sysdba" <<EOF

select capture_name
  from dba_capture;

EOF
}



gg_version()
{

/oracle/product/12.1/gg_1/ggsci <<EOF

versions

EOF

}


gg_chk_ddl()
{

#################################################################################
# This procedure will check the schema to ensure
# there are adequate GoldenGate
# features added to the DDL
#################################################################################

echo
echo "Executing GoldenGate DDL check process....."
echo

sqlplus -s "/ as sysdba" <<EOF
set lines 150
set pagesize 300

PROMPT
PROMPT Shows tables missing primary/unique keys
PROMPT

SELECT owner, table_name
  FROM all_tables
WHERE owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
  and table_name in ( select table_name
                        from OGGUSER.OGG_REPLICATE
                       where owner in  ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE'))
MINUS
(SELECT user1.name,obj1.name
   FROM SYS.user$ user1,
        SYS.user$ user2,
        SYS.cdef$ cdef,
        SYS.con$ con1,
        SYS.con$ con2,
        SYS.obj$ obj1,
        SYS.obj$ obj2
  WHERE user1.name in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
    AND cdef.type# = 2
    AND con2.owner# = user2.user#(+)
    AND cdef.robj# = obj2.obj#(+)
    AND cdef.rcon# = con2.con#(+)
    AND obj1.owner# = user1.user#
    AND cdef.con# = con1.con#
    AND cdef.obj# = obj1.obj#
 UNION ALL
  SELECT idx.owner,
         idx.table_name
    FROM all_indexes idx
   where idx.owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
     and idx.uniqueness = 'UNIQUE')
   order by 1;

--PROMPT
--PROMPT Shows tables missing primary/unique keys script #2
--PROMPT

--select owner,
--       table_name
--  from dba_tables
-- where owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
--minus
-- (select owner, table_name
--    from dba_indexes
--   where uniqueness = 'UNIQUE'
--     and owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
--  union all
--  select owner,
--         table_name
--    from dba_constraints
--   where constraint_type = 'P'
--     and owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
--     and table_name in (select table_name
--                          from ogguser.ogg_replicate
--                         where owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
-- ));


PROMPT
PROMPT Tables with relationships across schemas.....
PROMPT

select owner,
       constraint_name,
       table_name,
       r_owner,
       R_constraint_name
  from dba_constraints
 where owner <> R_owner
   and owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
   and status='ENABLED';

PROMPT
PROMPT Shows disabled primary/unique keys for specific schemas
PROMPT

select owner,
       table_name,
       constraint_name,
       status
  from dba_constraints
 where owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
   and constraint_type in ('R','P','U')
   and status='DISABLED';

PROMPT
PROMPT Shows primary keys not validated
PROMPT

select CONSTRAINT_NAME,
       VALIDATED
  from dba_constraints
 where owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
   and constraint_type in ('P', 'R','U')
   and validated = 'NOT VALIDATED';

PROMPT
PROMPT Shows cascade delete constraints DEFERRABLE
PROMPT

select owner,
       constraint_name,
       deferrable,
       deferred,
       delete_rule
  from dba_constraints
 Where owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
   and constraint_type ='R'
   and (deferrable='DEFERRABLE' or delete_rule='CASCADE');

PROMPT
PROMPT Shows tables without CREATEDON_ Timestamp col
PROMPT

select distinct t.owner,
       t.table_name
  from OGGUSER.OGG_REPLICATE t,
       dba_tab_cols c
 where t.table_name = c.table_name
   and t.owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
minus
select distinct t.owner,
       t.table_name
  from dba_tables  t,
       dba_tab_cols c
 where t.table_name = c.table_name
   and c.COLUMN_NAME ='CREATEDON_'
   and t.owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE');

PROMPT
PROMPT Shows tables without MODIFIEDON_ Timestamp col
PROMPT

select distinct t.owner,
       t.table_name
  from OGGUSER.OGG_REPLICATE t,
       dba_tab_cols c
 where t.table_name = c.table_name
   and t.owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
minus
select distinct t.owner,
       t.table_name
  from dba_tables  t,
       dba_tab_cols c
 where t.table_name = c.table_name
   and c.COLUMN_NAME ='MODIFIEDON_'
   and t.owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE');

PROMPT
PROMPT Shows tables with CREATEDON_ nullable
PROMPT

select owner,
       table_name,
       column_name,
       data_type,
       NULLABLE
  from dba_tab_columns
 where column_name ='CREATEDON_'
   and owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
   and NULLABLE ='Y'
   and table_name in (select table_name from OGGUSER.OGG_REPLICATE);

PROMPT
PROMPT Shows tables with MODIFIEDON_ nullable
PROMPT

select owner,
       table_name,
       column_name,
       data_type,
       NULLABLE
  from dba_tab_columns
 where column_name ='MODIFIEDON_'
   and owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
   and NULLABLE ='Y'
   and table_name in (select table_name from OGGUSER.OGG_REPLICATE);

PROMPT
PROMPT Shows tables with logging off
PROMPT

Select Owner,
       Table_NAMe
  from dba_tables
 where owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
   and LOGGING='N';

PROMPT
PROMPT Shows the primary/unique key length
PROMPT


select owner,
       table_name,
       constraint_name,
       count(*)
  from dba_cons_columns
 where owner in  ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
   and constraint_name in
      (select constraint_name
         from dba_constraints
        where owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
          and constraint_type in ('U','P'))
        Group by owner,
                 table_name,
                 constraint_name
        Order by count(*) asc;



PROMPT
PROMPT Shows the primary/unique key data type
PROMPT


select count (*),
       a.data_type
  from all_tab_columns a,
(select all_constraints.owner,
        all_constraints.table_name,
        all_constraints.constraint_name,
        all_cons_columns.column_name,
        all_constraints.constraint_type
   from all_constraints,all_cons_columns
  where all_constraints.constraint_name = all_cons_columns.constraint_name
    and all_constraints.owner in ('PIPER_D11_OWNER', 'CST_D11_OWNER','MISITE')
    and all_constraints.constraint_type in ('P','U')) b
  where b.column_name=a.column_name
    and a.owner=b.owner
    and a.table_name=b.table_name
  group by a.data_type;

PROMPT
PROMPT Shows the without triggers for GG
PROMPT

select owner,table_name
  from OGGUSER.OGG_REPLICATE
 where owner in ('PIPER_D11_OWNER','CST_D11_OWNER','MISITE')
 minus
select owner,
       table_name
  from dba_triggers
 where status='ENABLED';

EOF
}








###################################################
# GoldenGate test function set
###################################################
#
# This consists of several functions
#
# cr_dba_gg_tst_usr



cr_dba_gg_tst_usr()
{
######################################################################
# function Name: cr_dba_gg_tst_usr
# Description..: Create schema/user for golden gate testing
# Author.......: Michael Culp
# Date.........: 05/09/2016
# Version......: 1.0
# Modified By..:
# Date Modified:
# Comments.....:
# Schema owner.: DBA_GG_TST
#    alter session set current
# Login User...:
# Run Order....:
# Dependent on.:
######################################################################

sqlplus -s "/ as sysdba" <<EOF

set echo on
set feed on
set time on
set timing on

spool logs/cr_dba_gg_tst_usr.log

drop user DBA_GG_TST cascade;

create user DBA_GG_TST identified by dba88tst
  default tablespace piper_data
  temporary tablespace temp
  profile exempt_app_profile;

grant create session to DBA_GG_TST;
grant dba            to DBA_GG_TST;
alter user DBA_GG_TST quota unlimited on piper_data;

commit;
spool off
exit

EOF

}


cr_dba_gg_tst_objs()
{
######################################################################
# Func Name....: cr_dba_gg_tst_objs.ksh
# Description..: Create base objects for DBA_GG_TEST schema
# Author.......:
# Date.........: 07/13/2016
# Version......: 1.0
# Modified By..: Michael Culp
# Date Modified:
# Comments.....: Modified into a function, needs to check to see
#                if user exists first, if not drop out or create user
#                also need to have several values replaced in order
#                to work on different environments
#
# Schema owner.: dba_gg_tst
# Login User...:
# Run Order....:
# Dependent on.:
# Script type..:
#
######################################################################

sqlplus -s "/ as sysdba" <<EOF

set echo on
set feed on
set time on
set timing on

spool logs/110_cr_objs_dba_gg_tst.log

set pagesize 144
set linesize 132

REM
REM dba_gg_tst objects
REM

create table DBA_GG_TST.GGSITE (
   site_id      number(1)     not null,
   dbname       varchar2(30)  not null,
   gghost       varchar2(30)  not null,
   constraint   ggsite_pk primary key (SITE_ID)
using index );

----- value given here is for DEV. Adjust values properly.
-- These can be replaced by variables

insert into DBA_GG_TST.ggsite values (1,'PIPERD01','piperd01-ggvip');
insert into DBA_GG_TST.ggsite values (2,'PIPERD02','piperd02-ggvip');

commit;

CREATE TABLE DBA_GG_TST.GGTEST
(
  ID            NUMBER                   NOT NULL,
  HOST_NAME     VARCHAR2(100 BYTE)       NOT NULL,
  SITE_ID       NUMBER(1),
  TEST_MESSAGE  VARCHAR2(80 BYTE),
  CREATEDON_    TIMESTAMP(6)             DEFAULT SYS_EXTRACT_UTC(SYSTIMESTAMP) NOT NULL,
  MODIFIEDON_   TIMESTAMP(6)             DEFAULT SYS_EXTRACT_UTC(SYSTIMESTAMP) NOT NULL,
  SUPPLEMENTAL LOG DATA (ALL) COLUMNS
)
TABLESPACE PIPER_DATA
RESULT_CACHE (MODE DEFAULT)
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
            FLASH_CACHE      DEFAULT
            CELL_FLASH_CACHE DEFAULT
           )
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL ;

-- These grants should be revoked afterward to comply
-- with audit
grant select on v_\$instance to DBA_GG_TST;
grant select on v_\$database to DBA_GG_TST;


CREATE SEQUENCE DBA_GG_TST.GGTEST_SEQ
  START WITH 1
  MAXVALUE 9999999999999999999999999999
  MINVALUE 1
  NOCYCLE
  NOCACHE
  NOORDER;


CREATE OR REPLACE TRIGGER DBA_GG_TST.GGTEST_TRG
   BEFORE INSERT OR UPDATE ON DBA_GG_TST.GGTEST
   FOR EACH ROW
WHEN (
USER !='OGGUSER'
     )
DECLARE

BEGIN
IF INSERTING THEN
   :NEW.CREATEDON_  := SYS_EXTRACT_UTC(SYSTIMESTAMP);
   :NEW.MODIFIEDON_ := SYS_EXTRACT_UTC(SYSTIMESTAMP);
END IF;

IF UPDATING THEN
   :NEW.MODIFIEDON_ := SYS_EXTRACT_UTC(SYSTIMESTAMP);
END IF;
END;
/

CREATE OR REPLACE TRIGGER DBA_GG_TST.GGTEST_TRG_HOST_SITEID
   BEFORE INSERT OR UPDATE
   ON DBA_GG_TST.ggtest
   FOR EACH ROW
begin
   select host_name into :new.host_name from v$instance;
   select a.site_id into :new.site_id
     from DBA_GG_TST.ggsite a,
          v$database b
    where a.dbname = b.name;
end;
/

grant select, insert, update, delete
   on DBA_GG_TST.ggtest to ogguser;

spool off

EOF

}

sho_gg_test_tbl()
{
############################################################################
# Function Name: sho_gg_test_tbl
# Description..: show the ggtest table
# Author.......: Michael Culp
# Date.........:
# Version......:
# Modified By..: Michael Culp
# Date Modified:
# Comments.....:
# Schema owner.: dba_gg_tst
#              : alter session set current
# Login User...:
# Run Order....:
# Dependent on.:
# Script type..:
############################################################################

echo
echo
sqlplus -s "/ as sysdba" <<EOF
set lines 150
set pages 150
set feedback off
column object_name format a25
-- spool <some file name>

desc dba_gg_tst.ggtest;

select count(*)
  from dba_gg_tst.ggtest;

EOF

}



test_gg_upd()
{
############################################################################
# Func Name....: test_gg_upd
# Description..: test goldengate update
# Author.......: Michael Culp
# Date.........: 05/2016
# Version......:
# Modified By..:
# Date Modified:
# Comments.....:
# Schema owner.: CST_L01_OWNER
#              : PIPER
#              : MISITE
#              : alter session set current
# Login User...:
# Run Order....:
# Dependent on.:
# Script type..:
############################################################################

echo
echo "Testing GoldenGate Update"
echo

sqlplus -s "/ as sysdba" <<EOF
set lines 150
set pages 150
set feedback off
column object_name format a25
-- spool <some file name>

conn dba_gg_tst/gg5d01_o

update dba_gg_tst.ggtest
   set TEST_MESSAGE='Updating a test record' where id=1;

commit;

select *
  from dba_gg_tst.ggtest;

EOF

}



gg_stop()
{
####################################################################
# This function will check the GG status and then stop GG using XAG
# Needs parameter
####################################################################
echo
echo "checking GG status........................................................................................."
echo
/oracle/product/xag71/bin/agctl status goldengate piperd01_oggapp
echo
echo "stopping GG................................................................................................"
echo
/oracle/product/xag71/bin/agctl stop goldengate piperd01_oggapp
echo
echo "checking GG status........................................................................................."
echo
/oracle/product/xag71/bin/agctl status goldengate piperd01_oggapp
echo

}


db_start()
{
########################################################################
# Function to Start Database
# Needs parameter
#######################################################################

srvctl start database -d PIPERD01

}



db_stop()
{
########################################################################
# Function to Stop Database
# Needs parameter
#######################################################################

srvctl stop database -d PIPERD01

}



gg_start()

{

##########################################################################
# 
# This function will checK GG status and then try to start GG using XAG
##########################################################################

echo
echo "checking GG status........................................................................................."
echo
/oracle/product/xag71/bin/agctl status goldengate piperd01_oggapp
echo
echo "stopping GG................................................................................................"
echo
/oracle/product/xag71/bin/agctl start goldengate piperd01_oggapp
echo
echo "checking GG status........................................................................................."
echo
/oracle/product/xag71/bin/agctl status goldengate piperd01_oggapp
echo

}



###################################################
# GoldenGate mgmt function set
# Many of these were created during the issue
# we had over Xmas holiday 2016
###################################################

gg_status()
{

# read the environment file for gg here
# . /var/opt/oracle/.ggsora12_env
#
# info extract <extract name>

echo
echo "GGSCI status....................................."
echo


/oracle/product/12.1/gg_1/ggsci <<EOF

info all

-- info mgr

EOF

}


gg_ext_det()
{

##########################################################
# read the environment file for gg here
# . /var/opt/oracle/.ggsora12_env
#
# info extract <extract name>
# send EP1ALSDM, report
##########################################################

echo
echo "Extract detail................."
echo

/oracle/product/12.1/gg_1/ggsci <<EOF

sh date

send EP1ALSDM, status

send EP1ALSDM, showtrans

send EP1ALSDM getlag

stats EP1ALSDM totalsonly *.*, reportrate sec

info EP1ALSDM, showch

info EP1ALSDM, showch debug

send <name>, CACHEMGR CACHESTATS

send <name>, CACHEMGR CACHEQUEUES

send <name>, CACHEMGR CACHEPOOL

send <name>, LOGSTATS

send <name>, report

EOF

}


gg_mgr_inf()
###########################################
# Manager info
###########################################
{

/oracle/product/12.1/gg_1/ggsci <<EOF

info manager

EOF
}


cp_gg_dba_cls()
{
#####################################################################################
# Function Name: cp_dba_cls
# Description..: Copies the ddl_common.ksh to piper dev clusters
# Author.......: Michael Culp
# Date.........: 8/12/2014
# Version......:
# Modified By..:
# Date Modified:
# Comments.....:
# Schema owner.:
# Login User...:
# Run Order....:
# Dependent on.:
############################################################################
#
echo "MDX Prod Cluster Node 2"
scp -rp /oracle/product/12.1/gg_1/*ksh oracle@<server name>:/oracle/admin/scripts/mrc/prod_node02
### scp -rp /oracle/product/gg12.1/dirprm/* oracle@<server name>:/oracle/admin/scripts/mrc/piper_dev/ggdirprm

}


cp_rpt_ext()
{

# Copy a report file to the tmp directory

extrpt=$1

cd /oracle/product/12.1/gg_1/dirrpt
cp ${extrpt} /tmp

}

cp_ggserr()
{

# Copy the error log to the tmp directory

cd /oracle/product/12.1/gg_1
cp ggserr.log /tmp

}

linux_prc_chk()
{

ps -eo pid,stat,args,wchan |grep D

}

ora_prc_chk()
{

echo
echo "Checking for oracle processes......"
echo

ps -ef|grep ora

echo
echo "Checking for oracle processes sorted......"
echo

ps -ef|grep ora|sort

echo
echo "Checking for oracle processes sorted......"
echo

ps -ef|grep crs_|sort

}


gg_ext_stat()
{

ext=$1

# read the environment file for gg here
# . /var/opt/oracle/.ggsora12_env
#
# info extract <extract name>
# send EP1ALSDM, report

echo
echo "Extract status................."
echo

/oracle/product/12.1/gg_1/ggsci <<EOF

sh date

send ${ext}, status

EOF

}


gg_ext_det_p()
{
#####################################################
# read the environment file for gg here
# . /var/opt/oracle/.ggsora12_env
#
# info extract <extract name>
# send EP1ALSDM, report
#####################################################

ext=$1

echo
echo "Extract detail................."
echo

/oracle/product/12.1/gg_1/ggsci <<EOF

sh date

send ${ext}, status

send ${ext}, showtrans

send ${ext} getlag

stats ${ext} totalsonly *.*, reportrate sec

info ${ext}, showch

info ${ext}, showch debug

send ${ext}, CACHEMGR CACHESTATS

send ${ext}, CACHEMGR CACHEQUEUES

send ${ext}, CACHEMGR CACHEPOOL

send ${ext}, LOGSTATS

send ${ext}, report

EOF

}

par_proc()
{

# Show the parallel processes on this box
# Sorted

ps -ef|grep ora_p|sort -k8

}


lm_proc()
{

# Show the logminer processes for GoldenGate on this box
# Sorted

ps -ef|grep ora_m|sort -k8

}


cls_lst_svc()
{

db=$1
srvctl status service -d ${db}

}


cls_cfg_svc()
{

db=$1
srvctl config service -d ${db}

}





Leave a Reply

Your email address will not be published. Required fields are marked *