Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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»ù±¾²Ù×÷±¸Íü


1. ²éѯÊý¾Ý¿âÏÖÔڵıí¿Õ¼ä
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
2. ½¨Á¢±í¿Õ¼ä
CREATE TABLESPACE data01 DATAFILE '/oracle/oradata/db/DATA01.dbf' SIZE 500M; 
3.ɾ³ý±í¿Õ¼ä
DROP TABLESPACE data01 INCLUDING C ......

OracleÊý¾Ý¿â½â³ýscottÓû§Ëø

1¡¢µÇ¼·½·¨:£ºsys or systemµÇ¼
Õ˺ţºsystem
ÃÜÂ룺system as sysdba---------¡·ÃÜÂë+as sysdba
      conn system/password as sysdba
ʹÓÃÃüÁ
sql>alter user scott account unlock;
sql> commit;
Í ......

ÈçºÎ¼ÓËÙOracle´óÅúÁ¿Êý¾Ý´¦Àí

ÈçºÎ¼ÓËÙ
Oracle
´óÅúÁ¿Êý¾Ý´¦Àí
Ò»¡¢          
Ìá¸ß
DML
²Ù×÷µÄ°ì·¨£º
¼òµ¥ËµÀ´£º
£±¡¢ÔÝÍ£Ë÷Òý£¬¸üкó»Ö¸´.
±ÜÃâÔÚ¸üеĹý³ÌÖÐÉæ¼°µ½Ë÷ÒýµÄÖØ½¨.
£²¡¢ÅúÁ¿¸üУ¬Ã¿¸üÐÂһЩ¼Ç¼ºó¼°Ê±½øÐÐÌá½»¶¯×÷.
±ÜÃâ´óÁ¿Õ¼Óûعö¶ÎºÍ»òÁÙʱ±í¿Õ¼ä.
£³¡¢´´½¨Ò»ÁÙʱ ......

Oracle Ìåϵ½á¹¹ ORA

Linux/UnixÉÏ£¬OracleÊǶà¸ö½ø³ÌʵÏֵģ¬Ã¿Ò»¸öÖ÷Òªº¯Êý¶¼ÊÇÒ»¸ö½ø³Ì£»ÔÚWindowsÉÏ£¬ÔòÊÇÒ»¸öµ¥Ò»½ø³Ì£¬½ø³ÌÖаüº¬¶à¸öÏ̡߳£
Oracle°ÑһϵÁÐÎïÀíÎļþ£¬ÈçÊý¾ÝÎļþ(Data file)¡¢¿ØÖÆÎļþ(Control file)¡¢Áª»úÈÕÖ¾(Redo log file)¡¢²ÎÊýÎļþ(spfile or pfile)µÈÎïÀí½á¹¹¼°ÓëÖ®¶ÔÓ¦µÄÂß¼­½á¹¹£¬Èç±í¿Õ¼ä(Tablespace)¡¢¶Î(Seg ......

OracleÊý¾Ý¿âÖеÄËø»úÖÆÑо¿

Êý¾Ý¿âÊÇÒ»¸ö¶àÓû§Ê¹ÓõĹ²Ïí×ÊÔ´¡£µ±¶à¸öÓû§²¢·¢µØ´æÈ¡Êý¾Ýʱ£¬ÔÚÊý¾Ý¿âÖоͻá²úÉú¶à¸öÊÂÎñͬʱ´æÈ¡Í¬Ò»Êý¾ÝµÄÇé¿ö¡£Èô¶Ô²¢·¢²Ù×÷²»¼Ó¿ØÖƾͿÉÄÜ»á¶ÁÈ¡ºÍ´æ´¢²»ÕýÈ·µÄÊý¾Ý£¬ÆÆ»µÊý¾Ý¿âµÄÒ»ÖÂÐÔ¡£
¼ÓËøÊÇʵÏÖÊý¾Ý¿â²¢·¢¿ØÖƵÄÒ»¸ö·Ç³£ÖØÒªµÄ¼¼Êõ¡£µ±ÊÂÎñÔÚ¶Ôij¸öÊý¾Ý¶ÔÏó½øÐвÙ×÷ǰ£¬ÏÈÏòϵͳ·¢³öÇëÇó£¬¶ÔÆä¼ÓËø¡£¼ÓËøºó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ