More DBA Scripts

Hi everysoul,
on http://linux-dba.gutzmann.com please find some more DBA
scripts, namely:
show_invalid_objects (D. Mwrk)
compile_objects (D. Mwrk)
index (D. Mwrk)
free_space (D. Mwrk)
extents (D. Mwrk)
constraints (D. Mwrk)
Filesystem Cleanup (T. Gutzmann)
Previous entries were:
OWAS slow (M. Thomas)
Installation help (Link to T. Bissett)
Database Statistics (D. Mwrk)
Check DB Files - Step 1 (T. Gutzmann)
Check DB Files - Step 2 (T. Gutzmann)
Database Backup to Compressed Files (Rev 1) (T. Gutzmann)
Automatic Startup/Shutdown (T. Gutzmann)
Basic Tuning Steps (T. Gutzmann)
Tablespaces - Summary View (T. Gutzmann)
You are invited to add any useful script and any piece of related
pertinent information (even if it's a link). Most contributions
to discussion boards like this get lost some time; the linux-dba
document database is aimed to complement these forums (fora, to
be exact), and it lives on your input. So please ...
Cheers
Thomas
null

Hello BelMan,
Thank you for pointing me to the pdf document. I don’t want to use the supplied script. Further, my own scritp does work (if I execute it manually).
The pdf says:
To schedule automatic backups, use any operating system or third party task scheduling software to run the supplied backup script for your platform.
I would like to understand why the script that work just fine when executed manually does absolutely nothing when executed via scheduled job (cron)? If a task scheduling software can be used to run Oracle supplied backup sh script, I should be able to use my own sh script as well? Or is it an XE database limitation?
Thank you for your time.
Daniel

Similar Messages

  • Looking for a more universal scripting language than AppleScript or Automator

    I want to learn a cross-platform/web scripting language to automate tasks, write scripts and with the potential to create programs and web apps.
    I am looking for something that:
    - is not a program with a GUI like Automator, iKey, Quickeys, Maestro... 
    - is more "universal" than Applescript, cross-platform
    - can be used to automate simple tasks in a simple way
    - can also be used to create more complex scripts, web apps and maybe, eventually, programs (with GUI)
    I've read about Javascript, Python, Ruby, PHP, Perl, C+, C++, Java and others, but I really don't know.
    - Java sounds pretty cool, Python too.
    - I'm not crazy about PHP or Perl, with Javascript, but some people swear by it
    - I don't know anything about C+, C++
    Does anyone have any suggestion(s)?  Please let me know if you need any more details.  Thank you.

    C, C++, Objective-C are nor scripting languages and will not help you do web pages. (Don;t know what C+ is).
    Forget Java it has lots of security problems and more and more users are disabling Java in their web browsers because of this. Developing in Java would be, in my opinion, a mistake.
    If you are doing any web works at all you will need to know some Javascript, no way around that.  But Javascript is actually not a bad language
    Note Java and Javascript are two totally separate languages that have nothing in common  but the first 4 letters of their names.
    So you are left with PHP, Perl, Python and Ruby.
    Dismissing PHP and Perl out of hand is a big mistake, They are both major players and you will run into them just about everywhere. If you are looking to do this for possible employment you will need to be familiar with them at least.
    Python and Ruby are both strong languages as well. I don't have a lot of experience with either so I can;t speak to their strengths  but  learnign either would not be a mistake.
    Knowing what your reasons are for asking this, personal use or for employment, might help refine the list some.
    regards
    Message was edited by: Frank Caggiano - Perl is also included in OS X by default. Not sure about PHP but I believe it also is. I agree TextWrangler would be a good editor for this type of work.

  • FILE번호/BLOCK번호와 DBA 사이의 변환 SCRIPT

    제품 : ORACLE SERVER
    작성날짜 : 1999-02-24
    File 번호/Block 번호와 DBA 사이의 변환 script
    block dump나 block corruption 등의 해결을 위해 file 번호와
    block 번호를 DBA로 변환하거나 그 반대의 경우가 필요한 경우가 종종 있다.
    여기에서는 이를 수행하기 위한 간단한 script를 제공한다.
    아래의 script를 각각 별도의 file로 save한 후 file을 실행하여
    procedure를 생성시킨 후 usage에 적힌대로 수행하면 된다.
    usage 내의 procedure의 input 값은 단지 예이므로 실제 사용 시에는
    적당한 값을 사용하도록 한다.
    (주의)여기에서 dba값은 십진수이므로, 0x로 시작하는 값은 십진수로 변환한 후
    작업하여야 한다.
    1. DBA를 이용하여 file#, block# 를 찾아내는 procedure
    rem *************************************************************
    rem * *
    rem * usage : 1. procedure 생성 *
    rem * 2. SQL> set serveroutput on *
    rem * 3. SQL> exec dba_to_file(123456789) *
    rem * *
    rem *************************************************************
    create or replace procedure dba_to_file(in_dba number) is
    file_num integer;
    block_num integer;
    begin
    file_num := dbms_utility.data_block_address_file(in_dba);
    block_num := dbms_utility.data_block_address_block(in_dba);
    dbms_output.put_line('--------------------------------');
    dbms_output.put_line('File number => '|| file_num);
    dbms_output.put_line('Block number => '|| block_num);
    dbms_output.put_line('--------------------------------');
    dbms_output.put_line('Good luck to you');
    end;
    2. file#, block#를 가지고 DBA를 계산해 내는 procedure
    rem ************************************************************
    rem * *
    rem * usage : 1. procedure 생성 *
    rem * 2. SQL>set serveroutput on *
    rem * 3. SQL>exec file_to_dba(10, 100) *
    rem * *
    rem ************************************************************
    create or replace procedure file_to_dba(file_num number,
    block_num number) is
    dba number;
    begin
    dba := dbms_utility.make_data_block_address(file_num, block_num);
    dbms_output.put_line('--------------------------------');
    dbms_output.put_line('DBA => '|| dba);
    dbms_output.put_line('--------------------------------');
    end;
    3. file#, block#를 이용하여 해당 object를 알아내기 위한 script
    select owner, segment_name, segment_type, blocks, block_id
    from dba_extents
    where file_id = &file_number and
    &block between block_id and (block_id + (blocks - 1));

  • DBA script

    Dear all
    I remember there are a set of "DBA SCRIPT" on this sit, I can't find it ,Does anybody give me a link of it ?

    Hi,
    What kind of DBA Scripts you require? What kind of works you are going to perform, for which you require these scripts?
    -MAK

  • Looking for some DBA scripts.

    I am a DBA. Can any off u send me few sql scripts which would help me in monitoring the DBA activities, Like
    a) Monitoring the Disk Usage for a particular Database.
    b) How to check the rollback segment is increasing or not.
    c)In NT where the datafiles stored (i.e. in which table)
    and if any more u come across.
    My email add is [email protected]

    Did you ever get any info about this question? I am also a new DBA and trying to set up some monitoring scripts that will monitor the disk usage of our table spaces. Any help will be appreciated.
    Thanks,
    Susan Williams

  • Strange DBA script switchlog

    Hi guys,
    I'm a system admin and one of my production system, that running oracle, is a bit strange for me and I would like your input. I'm not an oracle expert but my limited knowledge show me that it is not setup correctly. This is a 200GB Database
    1. All redo log are in 1 file system /u02, only 8 log file, no grouping... Is it the right setup ?! No multiplexiing
    I will, at least, do a 2 redo grouping into 2 different file system.
    2. They defined 3 control files, all in the /u01 (where is the dbf file) directory (there is only 1 x 200GB oradata file system)
    I will try to put the 3 control file in different location, 1 in the archive log, 1 in the each fs
    3. My RPO for that database (Recovery Point Objective) is 60 minutes. So DBA use a script, in a crontab, to force a switch log every 60 minutes and they have a complex script to ensure the archivelog is close (fssync in OS) before sending it over WAN to a DR box using scp.
    Now on this one... I have a huge problem and I don't understand. First, I will switch the log every 15 to 20 minutes and let oracle do it (not the cron). They put the checkpoint_timeout to 0. I will replace scp by rsync and sync the archivelog directory over wan every 5 mintues and put another cleanup script in cron to remove any archive older than 7 days.
    Now, btw, I looking in the script that force Oracle to switch the log every 60 minutes and here is the command that do it... It look pretty strange to me
    1. get the log sequence number : (select sequence# from v$log where status in ('ACTIVE','CURRENT');)
    2. do a switch log file and archive all : (alter system switch logfile; alter system archive log all;)
    3. Sleep 10 second ?! because it takes 10 second for Oracle to dump in archive log ?!
    4. For each seqNo found in step 1:
    4.1 select archived,sequence# from v$log where sequence# in ( ${seqNo} ); > file1
    4.2 select sequence#,first_time from v$log_history where sequence# in ( ${seqNo} ); > file2
    4.3 check if, for each (and there is only one BTW), is ARCHIVED = YES in v$log and present in v$log_history
    4.4.Check, using fuser, if the file is written in UNIX : fuser ${archlogpath}/*${1}*${seqNo}*arc | cut -d: -f2 to be sure the file is close
    4.5 scp the file over wan
    Do I'm crazy or it's completely overkill ?!
    Thanks

    834010 wrote:
    Hi guys,
    I'm a system admin and one of my production system, that running oracle, is a bit strange for me and I would like your input. I'm not an oracle expert but my limited knowledge show me that it is not setup correctly. This is a 200GB Database
    1. All redo log are in 1 file system /u02, only 8 log file, no grouping... Is it the right setup ?! No multiplexiing
    I will, at least, do a 2 redo grouping into 2 different file system.
    2. They defined 3 control files, all in the /u01 (where is the dbf file) directory (there is only 1 x 200GB oradata file system)
    I will try to put the 3 control file in different location, 1 in the archive log, 1 in the each fs
    3. My RPO for that database (Recovery Point Objective) is 60 minutes. So DBA use a script, in a crontab, to force a switch log every 60 minutes and they have a complex script to ensure the archivelog is close (fssync in OS) before sending it over WAN to a DR box using scp.
    Now on this one... I have a huge problem and I don't understand. First, I will switch the log every 15 to 20 minutes and let oracle do it (not the cron). They put the checkpoint_timeout to 0. I will replace scp by rsync and sync the archivelog directory over wan every 5 mintues and put another cleanup script in cron to remove any archive older than 7 days.
    Now, btw, I looking in the script that force Oracle to switch the log every 60 minutes and here is the command that do it... It look pretty strange to me
    1. get the log sequence number : (select sequence# from v$log where status in ('ACTIVE','CURRENT');)
    2. do a switch log file and archive all : (alter system switch logfile; alter system archive log all;)
    3. Sleep 10 second ?! because it takes 10 second for Oracle to dump in archive log ?!
    4. For each seqNo found in step 1:
    4.1 select archived,sequence# from v$log where sequence# in ( ${seqNo} ); > file1
    4.2 select sequence#,first_time from v$log_history where sequence# in ( ${seqNo} ); > file2
    4.3 check if, for each (and there is only one BTW), is ARCHIVED = YES in v$log and present in v$log_history
    4.4.Check, using fuser, if the file is written in UNIX : fuser ${archlogpath}/*${1}*${seqNo}*arc | cut -d: -f2 to be sure the file is close
    4.5 scp the file over wan
    Do I'm crazy or it's completely overkill ?!
    ThanksI think you have a better understanding of oracle than the dBA who configured this!
    On redo, yes your online redo logs should be multiplexed, with each member on a different mount point.
    Likewise, your multiplexed control files should be on different mount points.
    The script you describe sounds pretty bizzare. Does anyone have an explanation on why the archivelogs are being manually scp'd over the lan? Is that for simple backup purposes or is someone trying to re-invent DataGuard?

  • A More Universal Scripting Language Than Applescript or Automator?

    I want to learn a scripting language to automate events or actions on a schedule or by using shortcuts, and maybe a little more eventually (like web apps for example). I am looking for something that is not a program with a GUI like Automator, iKey, Quickeys, Maestro...  I would rather learn a more "universal" language than Applescript.  I've read a little bit about Javascript, Python, Ruby on Rails, PHP, Perl, C+, C++, and others, but I really don't know. I would prefer a language that can be used to program simple things in a simple way, but with a high learning curve.  Does anyone have any suggestion(s)?  Please let me know if you need any more details.  Thanks

    Another possibly better forum to ask this would be
    https://discussions.apple.com/community/mac_os/mac_os_x_technologies

  • Apps DBA Scripts

    Hi ,
    Does anybody have scripts that monitor concurrent managers, Database etc and send a mail about the daily performance to all the DBAs in a team? Can somebody tell me where to find some very rare scripts that monitor the performance of apps?
    Thanks.

    Here are some links you may find useful ..
    http://www.appsdba.com/scripts_apps.htm
    http://www.sap-img.com/oracle-database/oracle-application-hints-and-tips.htm
    http://teachmeoracle.com/scripts.html
    http://teachmeoracle.com/scriptspatch.html
    http://www.orafaq.com/scripts/index.htm#APPS
    Others are welcome to share

  • DBA scripts run by cron job

    We've got a development database on which we're working every day. We intend to set up a cron job to run about once a week to help in the maintainance & performance of the database.... analyzing tables, stuff like that. Does anybody have any suggestions as to what scripts it's useful to run to help keep things running smoothly?
    We're using 9.0.1
    Cheers
    RT

    We've got a development database on which we're working every day. We intend to set up a cron job to run about once a week to help in the maintainance & performance of the database.... analyzing tables, stuff like that. Does anybody have any suggestions as to what scripts it's useful to run to help keep things running smoothly?
    We're using 9.0.1
    Cheers
    RT i'd suggest you try out oracle enterprise manager and look at the list of events you can test for. You can use this list to implement in cron or let OEM do it for you. You'll find test like, is the listener up, is the db up, is the server up, what tablespaces will not be able to extend, if a disk is getting fulletc and stuff like that . Those items should help you frame your scripts for cron if you like.

  • DBA Scripts management

    Friends
    Over couple of years I have accumulated a lot of sql/unix/windows scripts for monitoring, managing and trouble shooting Oracle databases.
    I am looking for a good tool to manage these scripts efficiently where I can find relevant script using some kewords.
    Any idea if anyone knows about such tool.
    If there is no tool, I would appriciate if senior people can advice what is the best way to manage these scripts.
    Thanks
    Vishal V.

    Hi,
    >>I am looking for a good tool to manage these scripts efficiently where I can find relevant script using some kewords.
    Well, in my computer, for example, I have a lot of script files and others manuals and documents like you, then I put the .sql and .txt (script files) in a different directory separated from the others files like .doc and .pdf. Then, I use the Google Desktop in order to index all those my files ... (doc, txt, sql, etc...)
    Maybe is interesting to you. Did you already try to use the Google Desktop ?
    http://desktop.google.com/
    Cheers

  • Call for more example scripts

    Can someone post the following examples:
    1. Loop through all paragraphs in a document and if the paragraph has a specific paragraph tag (e.g., Heading 1) change one aspect of the paragraph, for example, the text color. (This avoids the need to change the style and remove all the overrides.)
    2. Loop through all the tables in a document and change one aspect of the table, for example the column width of the second column.
    Thanks

    Dear Sir
    First of all thanks for your quick response
    What I mean is a conference call with 4 participants ( Me and 3 others),or leave the conference on hold and go to make another call,  I have this feature from my carrier and I can do it with Nokia E71 ,but I can't do it using N900, 
    Please visit the link below and you will find it in the Technical specifications- call features, that mean The conference is limited to only 3 participants only in N900, so please we need to update it
    http://maemo.nokia.com/n900/specifications/
     Call features
    Integrated hands-free stereo speakers
    Call waiting, call hold, call divert
    Call timer
    Logging of dialed, received and missed calls
    Speed dialing via contact widget
    Virbrating alert (internal)
    Side volume keys
    Mute/unmute
    Contacts with images
    Conference calling with up to 3 participants
    Internet calling
    Thanks
    Hossam

  • Shell scripts maintenance tasks for DBA

    Most of companies use shell scripts to monitor DB activities, i just want to make myself familier with the main scripts, and how to manage them. If someone can send me some help material.

    Sorry, I should have been more explicit and not only point to the initial page but directly, where the script library is. And I should have made clear it is not a final product, but the base to build your own library.
    First link (orasnap) refers to the work made by Stewart McGlaughlin, who created a comprehensive collection of frequently used dba scripts. He compiled those scripts into an utility named orasnap. This you can download it from his yahoo site, if you take enough time to follow the links. Out from this collection of scripts I have personally taken several to tailor them into specific Unix/Dos shell maintenance scripts. I mean the homework is not finished, Out from his work I have taken a good base to build my own most frequently used Shell Maintenance Library.
    The second link belongs to Tim Hall (http://www.oracle.com/technology/community/oracle_ace/ace1.html#hall) whose remarkable work has greatly contributed to the Oracle technical community daily job. Once again, this site doesn't have finished shell scripts for you simply to cut and paste, but the dba scripts I pointed plus a little effort and several interesting concepts and tips you can find navigating through his site turn this site into a first hand reference.

  • Where is the new location of the OLAP option DBA sample scripts?

    Hello,
    OLAP option DBA sample scripts was used to be available on http://wiki.oracle.com/page/OLAP+option+-DBASample+Scripts
    Thanks,
    Lajos

    I see now OLAP DBA Scripts http://www.oracle.com/technetwork/database/options/olap/olap-dba-scripts-393636.zip under the Download section of OLAP otn home http://www.oracle.com/technetwork/database/options/olap/index.html

  • Canned DBA Admin script difficulties

    I am trying to run some of the canned dba scripts available at the Metalink (Tech Lib, Database Administration, Scripts) and I'm getting the following type of error when attempting to run from a command prompt:
    SQL> @tbsp_usage.sql
    DROP TABLE TABLESPACETEMP
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Table created.
    Commit complete.
    Input truncated to 33 characters
    52
    It justs sits at the 52 without ever going anywhere.
    This script is the one featured in Note:1039289.6 (Analyzing tablespace usage with o/s-independent sql script). I am running it against an 8.1.7 database. I have tried running the script from the command prompt with sqlplus user/password @scriptname and also within sql using @scriptname.
    Can someone tell me what I'm doing wrong??
    Thnaks:)

    I think the script is missing a ';' at the end of the last statement. If it's PL/SQL code, end it with '/'.
    null

  • I need a script to invert the page order of selected pages for cs5.

    Hello,
    I am a graphic designer and i am trying to create a easier way to make multiple page folders, By using the multiple page size feature in inDesign CS5. But my problem is that i can create the front side of the folder easier than before, the backside is my problem I need to inverse the page order manual, this creates a lot of mistakes and errors along the way. Thats why I need a script to invert the page order of the pages I select. I hope to hear from someone soon.
    My best regards,
    Gijs van Roij

    In /gateprd/ARCHIVE/*.arc
    This is the script to remove the archives after it has been backup by the netbackup policy named Archive. This policy removes the archives that have been backed up.
    /home/oracle/dba/scripts> more rmovarch.sh
    #!/bin/ksh
    # compress /gateprd/ARCHIVE/*.arc
    find /gateprd/ARCHIVE/*.arc -type f ! -exec echo {} > /home/oracl
    e/dba/lists/ARCHIVElist \;
    if test $(cat /home/oracle/dba/lists/ARCHIVElist|wc -l) -gt 0
    then
    echo "Hay archives. Se corre script de borrar"
    /home/oracle/dba/scripts/ARCHIVE_BACKUP.sh ARCHIVE
    else
    echo "No archives!!"
    fi

Maybe you are looking for

  • Thtmlb:cellerator: color in a single row

    Hi, I have a thtmlb:cellerator which is showing 5 rows. I want that las row has a background color in yellow (for example). I have tried to do this in the iterator, in method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START, setting the value of paramet

  • How to hide the Attribute dimension from Planning webform

    I am in Planning 9.3.1 We are using members in row section of webform w.r.t Attribut dimension so when we are viewing the webform- it is displaying member name followed by Attribute dimension name . any way to hide that Attribute dimension member fro

  • Datatags, InputLOV

    How can i get the selected value of an LOV and render to the actual value, not the rowkey to use it in a where-clause? Can't I work with multiple LOV's on a datapage

  • Sales order cancel

    1)Can we cancel the Sale order 2)Can we reject the Sale order, if yes how 3)Sale order is crearted but not delivered, customer made down payment through pament card and its captured in SO, now customer  want to cancel the SO, how payment return to cu

  • Creating a thread object in ABAP

    Hi, Is it possible to create a threa in ABAP function modules or in ABAP objects or in both? For example do the following in ABAP code: while(true){ if(someCheck) else terminate thread }thread sleep(1 second) regards Baran