بتاريخ: 23 نوفمبر 200520 سنة comment_52421 لقد وجدت هذا الباتش بإحدى المواقع فارجو تجريبةnotepad -file -save as - name.bat@echo offrem -----------------------------------------------------------------------rem Filename: dbup.batrem Purpose: Check if database is up and runningrem Notes: When using Oracle releases prior to 8i, replace "sqlplus" with rem "plusXX" in the script below. XX is the version number, eg. 73 rem or 80. This is needed as sqlplus (in these releases) will start rem a new window and the return code will be lost. With Oracle 8irem sqlplus executes in the same window as the rest of the script.rem Date: 05-Mar-2002rem Author: Frank Naude, Oracle FAQrem -----------------------------------------------------------------------rem -- Set Database SID ---set ORACLE_SID=KHrem -- Create SQL Script ---echo sqlplus/nologecho connect sys/sys@data as sysdba; > %0.tmpecho set echo off feed off pages 0 >> %0.tmpecho whenever sqlerror exit sql.sqlcode >> %0.tmpecho select * from global_name; >> %0.tmpecho exit; >> %0.tmprem -- Test connect to database ---rem --sqlplus /nolog @%0.tmp >NUL:if {%ERRORLEVEL%} == {0} ( echo Database %ORACLE_SID% is available) else ( echo Database %ORACLE_SID% is NOT available)rem -- Cleanup -- del %0.tmpوالسلام selman0 تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.