oracle ±¸·Ý,±í¿Õ¼ä¼ì²éshell½Å±¾´úÂë
#!/bin/ksh
#****************************************************************************
#
# (C) Copyright CPIC. 2008
#
# File name: check_db_alert.sh
# Project: Database Alerts Check
#
# Parameter : app_name -- name of db application(=oracle_sid)
# ipaddress -- ip of the db server
#
# Creation Date: Aug 19, 2008
# Origin Author: Shangkun Peng
#
#
# Prerequisites:
# before using this shell script, directory $DAILY_CHECK must be created
# and this shell script should be put into it.
# for each application, environment file $DBENVFILE must be put into it.
# also, variables for auto ftp must be set
#
# Limitations:
# this shell script can be run at most once an hour
# additional job can be added but variable JOB_LIST must be modified
# and relative function must be coded too
#
#****************************************************************************
# record start date and time
echo "------------------------------------------------------------"
echo "database information collect started at:"; date
# check necessary parameter(s)
if [ $# -ne 2 ]
then
echo "ERROR: parameter(s) not supplied correctly"
echo "USAGE: check_db_alert.sh app_name ipaddress"
echo "WHERE:"
echo "app_name -- name of db application"
echo "ipaddress -- ip of the db server"
exit 1
fi
# -----------------------------------------------------------------------------------------------------------
# DEFINE VALUES FOR VARIABLES IN THIS SHELL
# general variables, can not be modified
APP_NAME=$1 # name of db application
IPADDRESS=$2 # ip of db server
DAILY_CHECK=/tmp/db_dailycheck # directory for information collection of db application
DBENVFILE=$APP_NAME".dbenv"&
Ïà¹ØÎĵµ£º
ÓÃoracleÊý¾Ý¿âµÄ´æ´¢¹ý³ÌʵÏÖ·µ»Ø½á¹û¼¯²¢ÊµÏÖ·ÖÒ³µÄ¹¦ÄÜ¡£
Óû§´«Èë²ÎÊý
Ò»ÏÂÊÇת±ðÈ˵ĴúÂë
--°üÉùÃ÷
create or replace package p_page is
-- Author : PHARAOHS
-- Created : 2006-4-30 14:14:14
-- Purpose : ·ÖÒ³¹ý³Ì
TYPE type_cur IS REF CURSOR; &n ......
1¡¢µÇ¼·½·¨:£ºsys or systemµÇ¼
Õ˺ţºsystem
ÃÜÂ룺system as sysdba---------¡·ÃÜÂë+as sysdba
conn system/password as sysdba
ʹÓÃÃüÁ
sql>alter user scott account unlock;
sql> commit;
Í ......
ÈçºÎ¼ÓËÙ
Oracle
´óÅúÁ¿Êý¾Ý´¦Àí
Ò»¡¢
Ìá¸ß
DML
²Ù×÷µÄ°ì·¨£º
¼òµ¥ËµÀ´£º
£±¡¢ÔÝÍ£Ë÷Òý£¬¸üкó»Ö¸´.
±ÜÃâÔÚ¸üеĹý³ÌÖÐÉæ¼°µ½Ë÷ÒýµÄÖØ½¨.
£²¡¢ÅúÁ¿¸üУ¬Ã¿¸üÐÂһЩ¼Ç¼ºó¼°Ê±½øÐÐÌá½»¶¯×÷.
±ÜÃâ´óÁ¿Õ¼Óûعö¶ÎºÍ»òÁÙʱ±í¿Õ¼ä.
£³¡¢´´½¨Ò»ÁÙʱ ......
Oracle
Ë÷Òý¼¼ÊõµÄÓ¦ÓÃÓëÆÊÎö
×î
½üÕâ¶Îʱ¼ä£¬×ÜÊÇÏëдһЩÓйØÐÔÄܵ÷ÓŵÄÎÄÕ¡£µ«ÊÇ¿àÓÚûÓÐÒ»¸öʵ¼ÊµÄ°¸Àý£¬±¾ÈËÓÖ²»Ô¸¿Õ̸ÀíÂÛ£¬ÒòΪÕâЩÀíÂÛËæ±ãÔÚÍøÉϾÍÄÜÕÒµ½£¬¶øÇÒ»ù±¾ÉÏǧƪһÂÉ£¬
ÒòΪÀíÂÛÉϵÄÄÇЩ¶«Î÷¾ÍÄÇô¶à£¬ÔÙÔõô½²Ò²²»ÈçÒ»¸öʵ¼Ê°¸ÀýÉú¶¯¡£»¹ºÃÉÏÌì²»¸ºÓÐÐÄÈË£¬Ç°Ð©ÌìÈÃÎÒÅöµ½ÁËÒ»¸öʵ¼ÊµÄ°¸Àý¡£Õâ¸ö ......
ÍæOracleÒ²ÓÐ2ÄêµÄʱ¼äÁË£¬ ÁãÁãɢɢµÄÒ²ÕûÀíһЩ×ÊÁÏ¡£ ¶«Î÷Ò»¶àÁË£¬¾ÍÀí²»Çå³þ¡£ ËùÒÔ½áºÏÕÅÏþÃ÷µÄ¡¶´ó»°Oracle RAC¡·µÄһЩÄÚÈÝ£¬ºÍ×Ô¼ºÕûÀíµÄһЩ±Ê¼Ç£¬¶ÔOracle µÄ±¸·ÝºÍ»Ö¸´×öÁËÒ»¸öϵͳµÄÕûÀí¡£ Ò²ÊÇ×Ô¼º¶Ô֪ʶµÄÒ»¸ö¹®¹Ì°É¡£
Ò»£® ×¼±¸ÖªÊ¶
ÏÈÀ´¿´Ò»Ð©×¼±¸ÖªÊ¶£¬Á˽â ......