Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Off-line backup in Windows NT/2K

Re: Off-line backup in Windows NT/2K

From: Dino Hsu <dino1_at_ms1.hinet.net>
Date: Sun, 05 Aug 2001 22:44:27 +0800
Message-ID: <79mqmtgem7o3asl425188v1n92v0knptiu@4ax.com>

Dear Pieter,

It is so kind of you. Because the current project has been written in Access 97 VBA, which schedules complicated ETL (extract, transfer, load) process for warehousing. I will try python in my next project.

For the time being, why don't you show the off-line backup example from my original question? That is quite simple, it takes you only 5 min. to do that, I suppose. Thanks again.

Dino

On Sun, 05 Aug 2001 08:35:44 GMT, "Pieter Claerhout" <tsjernochill_at_yahoo.com> wrote:

>Hi Dino,
>
>all of them are free of charge actually. VBScript is included by default on
>any Windows NT/Windows 2000 server.
>
>In terms of ease of use, I think Python will be the winner. Second place
>would be for VBScript, and on the last place I would put Perl. Python has a
>very clean and clear syntax, has a very good and very helpful mailing list,
>and also has lots of documentation. VBScript is ok as well, but there's less
>documentation, unless you want to go digging in Microsoft's MSDN. Perl has a
>very ugly syntax, but also has lots of documentation.
>
>I think both Python and Perl are really good for system administration.
>There's absolutely nothing you can't do in Perl or Python that you can do in
>batch scripts. I actually use Python every day for system administration,
>and I can automate practically everything on a Windows 2000 or Windows NT
>server.
>
>Something worth mentioning is that Perl and Python run on a variety of
>platforms, meaning Windows, Unix, Linux, Mac, ... so whatever you produce in
>one of those languages, could be used on different platforms as well (unless
>you do really platform specific things).
>
>If you want, I can write you a Python version of the script below (or a
>VBScript version). If you want me to do so, please contact me offline.
>
>For more information about these scripting languages, please consult the
>following websites:
>- Python: http://www.python.org/
>- VBScript: http://msdn.microsoft.com/scripting/
>- Perl: http://www.perl.com/
>
>Cheers,
>
>Pieter
>
>"Dino Hsu" <dino1_at_ms1.hinet.net> wrote in message
>news:r3upmt04rgi7jb8r97mhql3r863r9eepeg_at_4ax.com...
>> Dear all,
>>
>> Among the three scripting language candidates in Windows NT/2K:
>> python, perl, and VBScript, can you provide comments in terms of the
>> following aspects?
>> 1.Easy of use
>> 2.Free of charge
>> 3.Good for system administration tasks
>>
>> Thanks,
>> Dino
>>
>> On Sat, 04 Aug 2001 07:39:48 GMT, "Pieter Claerhout"
>> <tsjernochill_at_yahoo.com> wrote:
>>
>> >Why don't you go with one of the numerous scripting languages that are
>> >available on Windows? You could give Python a try for example. I will
 give
>> >you an easy syntax and you'll be able to do lots more than with just
 batch
>> >scripts. It has a very powerful module that enables you to connect to
 Oracle
>> >(called DCOracle) and it would allow you to everything you describe below
>> >(and lots more of course).
>> >
>> >VBScript together with ADO could also be an option...
>> >
>> >Cheers,
>> >
>> >Pieter
>> >
>> >"Dino Hsu" <dino1_nospam_at_ms1.hinet.net> wrote in message
>> >news:4hjkmt4h8auba3qcoou4o2vtumtlqjlfih_at_4ax.com...
>> >> Dear all,
>> >>
>> >> In addition, if I want to keep the last n (say 3) copies of backup
>> >> files, it is also difficult in Windows NT/2K.
>> >>
>> >> Dino
>> >>
>> >> On 2 Aug 2001 06:29:49 -0700, ordabber_at_my-deja.com (Bart) wrote:
>> >>
>> >> >Dino,
>> >> >
>> >> >As far as I know - one can correct me if I am wrong - it is not
>> >> >possibile in NT to read input (with ENTERS etc.) like you can do in
>> >> >UNIX. The script you made with calling SQLPLUS @filename.sql is the
>> >> >only alternative.
>> >> >
>> >> >If you prefer Unix tools, you can always try to use their ports to NT
>> >> >as you can find them for instance at the following link :
>> >> >http://www.weihenstephan.de/~syring/win32/UnxUtils.html.
>> >> >There is also a link to ZSH-shell for Win32.
>> >> >
>> >> >I Hope this will help you.
>> >> >
>> >> >Kind regards,
>> >> >
>> >> >Bart.
>> >> >
>> >> >Dino Hsu <dino1_nospam_at_ms1.hinet.net> wrote in message
 news:<cs8hmtk62kkbqkh7d6cva033ltfk7v211r_at_4ax.com>...
>> >> >> Dear all,
>> >> >>
>> >> >> I have written scripts to do off-line backup of a database as
 follows:
>> >> >>
>> >> >> <backup_twdm.bat begin>
>> >> >> @ECHO OFF
>> >> >> IF "%1"=="" GOTO ERROR
>> >> >> SET ORACLE_SID=TWDM
>> >> >> svrmgrl @shutdown_twdm.sql
>> >> >> "c:\program files\winzip\wzzip" -rP d:\twdm.bak\twdm_%1 d:\twdm
>> >> >> svrmgrl @startup_twdm.sql
>> >> >> GOTO END
>> >> >> :ERROR
>> >> >> ECHO Usage backup_twdm.bat yyyymmdd
>> >> >> GOTO END
>> >> >> :END
>> >> >> <backup_twdm.bat end>
>> >> >>
>> >> >> <startup_twdm.sql begin>
>> >> >> connect internal;
>> >> >> startup pfile=d:\twdm\ctlfile\inittwdm.ora;
>> >> >> <startup_twdm.sql end>
>> >> >>
>> >> >> <shutdown_twdm.sql begin>
>> >> >> connect internal;
>> >> >> shutdown immediate;
>> >> >> <shutdown_twdm.sql end>
>> >> >>
>> >> >> Among which wzzip.exe is the command-line add-on of WINZIP 8.0. With
>> >> >> the help from a compression program such as WINZIP, the size of the
>> >> >> backup can be dramatically decreased to about only 1/20 and makes
>> >> >> backup process much easier.
>> >> >>
>> >> >> There are some issues here, however, to be discussed about:
>> >> >> 1.I used to see a script in AIX like this:
>> >> >> svrmgrl <<EOF
>> >> >> cmd-1...
>> >> >> cmd-2...
>> >> >> cmd-3...
>> >> >> EOF
>> >> >> which embeds SQL or SQL*Plus commands in the shell program. If I can
>> >> >> do this in a DOS/Windows batch program, the startup_twdm.sql and
>> >> >> shutdwon_twdm.sql can be suppressed; but I don't know how.
>> >> >> 2.This batch program (backup_twdm.bat) has one parameter, date with
>> >> >> format yyyymmdd, to be used as part of the archive file name. I wish
>> >> >> this batch program can get the current date automatically, but I
 don't
>> >> >> know how. Maybe some outside programming is necessary.
>> >> >> 3.WINZIP 8.0 cannot compress files bigger than 8G, so make sure the
>> >> >> datafiles are not too big. (but I don't know the exact limitation, I
>> >> >> cannot find it)
>> >> >> 4.WINZIP 8.0 doesn't seem to generate a log, either.
>> >> >>
>> >> >> I don't think this problem exists in any Unix platforms because the
>> >> >> shell program is so powerful. It is a problem, however, in Windows
>> >> >> NT/2K environments. Any comments are highly appreciated.
>> >> >>
>> >> >> Dino
>> >>
>> >
>>
>
  Received on Sun Aug 05 2001 - 09:44:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US