Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2002
    Posts
    1,245

    Unanswered: Oracle on Windows

    Hello,

    I'm a MS SQL DBA and I understand databases fairly well, but our Oracle DBA just upped and walked out and I am really struggling to get a handle on Oracle. All the books and sites that I have visited seem to be UNIX-centric. All the scripts I've seen are for the UNIX Shell. We're running Oracle 9i and 8i on Windows 2000.

    I have the Oracle 9i DBA handbook and I've ordered the Oracle on Windows handbook (from Oracle Press). But if anyone knows of a good Oracle/Windows site (preferable with lots of sample scripts), I would be grateful.

    Going bald in PA...

    hmscott

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    I would also recommend getting a tool like TOAD with the DBA module. This will help you identify problem sql aswell as monitoring space usage (not perfect but very useful) as well as giving you a much nicer interface than straight sql.

    Alan

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Maybe we can help out until you get your books in ... What type of scripts or things are you looking for at this moment ???

    Gregg

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    My biggest need right now is for backups. Apparently we've gone all this time with no backups (shudder).

    Our policy is to store 7 days worth of full backups (either on the server on a different disk or on a file share accessible to the server) and to be able to recover the database to a point in time anytime in the last 24 hours. We are a 24x7 shop, so I don't think that offline backups are an option. The database is not over-large (less than 20GB?). I'm not positive of that value because I don't know what all files to include in the count. I know that we need to be in ARCHIVELOG mode (we are not now).

    I have looked at some scripts on ORAFAQ, but they don't seem quite kosher to me. In particular, the windows backup script that I saw did not put the tables in a 'backup' state prior to using OCOPY. That didn't seem to square with the DBA Handbook UNIX scripts which put the tables in backup state and then backed them up.

    Also, the script on ORAFAQ did not seem to capture the roll back segments nor the control files.

    We are not (yet) running OEM. I have requested that we set it up, but it will be some time (months) before it gets approved.

    Any assistance would be most gratefully received by an ignorant person seeking enlightenment.

    regards,

    hmscott

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    GOOGLE is your friend.
    Do a keyword search on
    oracle hot backup script window
    results in 8400+ hits.
    There are plenty of places which are willing to share.
    All you need to do is go looking for them.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  6. #6
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    First and Foremost ... In order to do HOT (online) backups, you MUST be in
    archivelog mode ... Here's a copy of SQL statements that you can run to let SQL build you some backup commends...

    --- To get the data files ----
    spool this to an output file and edit it by hand ... change the backup directory to meet your needs (d:\oracle_backups\...\online)
    spool c:\...\backup_database.bat

    select 'alter tablespace '||tablespace_name||' begin backup;'||
    'host copy '||file_name||' D:\Oracle_Backups\...\Online' ||
    'alter tablespace '||tablespace_name||' end backup;'
    from dba_data_files
    ;

    spool off

    You will need to supply returns ... There should be 3 lines per datafile.
    alter tablespace ... begin backup;
    host copy ....
    alter tablespace ... end backup;

    --- to get the redo logs --
    select 'host copy '||member||' D:\Oracle_Backups\CRE1\Online' from v$logfile
    ;
    --- to get the controlfiles ---
    alter database backup controlfile to D:\Oracle_Backups\CRE1\Online\backup
    ;

    You can build a .BAT file from these statements, put them in the AT scheduler ... I also have mine to rename old archive files and delete them
    after 1 week.

    HTH
    Gregg

  7. #7
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Start with the DB shutdown (cleanly).

    # the commands to "enable" redo log file archiving are as follows
    / as sysdba
    startup mount
    alter database archivelog
    alter system archive log start
    alter database open
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  8. #8
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    Quote Originally Posted by hmscott
    My biggest need right now is for backups. Apparently we've gone all this time with no backups (shudder).

    Our policy is to store 7 days worth of full backups (either on the server on a different disk or on a file share accessible to the server) and to be able to recover the database to a point in time anytime in the last 24 hours. We are a 24x7 shop, so I don't think that offline backups are an option. The database is not over-large (less than 20GB?). I'm not positive of that value because I don't know what all files to include in the count. I know that we need to be in ARCHIVELOG mode (we are not now).

    I have looked at some scripts on ORAFAQ, but they don't seem quite kosher to me. In particular, the windows backup script that I saw did not put the tables in a 'backup' state prior to using OCOPY. That didn't seem to square with the DBA Handbook UNIX scripts which put the tables in backup state and then backed them up.

    Also, the script on ORAFAQ did not seem to capture the roll back segments nor the control files.

    We are not (yet) running OEM. I have requested that we set it up, but it will be some time (months) before it gets approved.

    Any assistance would be most gratefully received by an ignorant person seeking enlightenment.

    regards,

    hmscott

    For Oracle backup script on Windows - Click Here

    For more Click here (then type the "backup script windows" in the Search box)


    HTH,

    clio_usa - 8/8i/9i DBA

  9. #9
    Join Date
    Dec 2002
    Posts
    1,245
    Many thanks to all who have responded. I am working with several of the scripts that I found. It's not as straightforward as I had thought it would be, but I think it is manageable.

    Regards,

    hmscott

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •