[HPADM] How to extract lines from a file using sed without using line numbers.

From: Latone, Philip (PLatone_at_miracosta.edu)
Date: 12/18/03

  • Next message: Paul.Soltermann_at_vonroll-isola.com: "[HPADM] SUMMARY: problems printing umlaute Q=F6=FC_?="
    Date: Wed, 17 Dec 2003 18:04:07 -0800
    To: <hpux-admin@dutchworks.nl>
    
    

    Hello Admins,
     
    I need to extract lines from a file. I can't count lines. I don't know how many there will be, and the number could change. I need to extract only the portion in red. The first line will be always be STARTUP NOMOUNT and the last line will be always be # End of tempfile additions. The first and last lines just described are not unique as they show up again in the bottom half of the file.
     
    begin file.............
    Dump file /home/oracle/admin/EP88DMO/udump/ep88dmo_ora_11039.trc

    Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production

    With the Partitioning option

    JServer Release 9.2.0.1.0 - Production

    ORACLE_HOME = /home/oracle/product/9.2.0

    System name: HP-UX

    Node name: iceman

    Release: B.11.11

    Version: U

    Machine: 9000/800

    Instance name: EP88DMO

    Redo thread mounted by this instance: 1

    Oracle process number: 9

    Unix process pid: 11039, image: oracle@iceman (TNS V1-V3)

    *** SESSION ID:(8.12070) 2003-12-17 15:03:56.528

    *** 2003-12-17 15:03:56.528

    # The following are current System-scope REDO Log Archival related

    # parameters and can be included in the database initialization file.

    #

    # LOG_ARCHIVE_DEST=''

    # LOG_ARCHIVE_DUPLEX_DEST=''

    #

    # LOG_ARCHIVE_FORMAT=%t_%s.dbf

    # REMOTE_ARCHIVE_ENABLE=TRUE

    # LOG_ARCHIVE_MAX_PROCESSES=2

    # STANDBY_FILE_MANAGEMENT=MANUAL

    # STANDBY_ARCHIVE_DEST=?/dbs/arch

    # FAL_CLIENT=''

    # FAL_SERVER=''

    #

    # LOG_ARCHIVE_DEST_1='LOCATION=/home/oracle/product/9.2.0/dbs/arch'

    # LOG_ARCHIVE_DEST_1='MANDATORY NOREOPEN NODELAY'

    # LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM SYNC'

    # LOG_ARCHIVE_DEST_1='NOREGISTER NOALTERNATE NODEPENDENCY'

    # LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED'

    # LOG_ARCHIVE_DEST_STATE_1=ENABLE

    #

    # Below are two sets of SQL statements, each of which creates a new

    # control file and uses it to open the database. The first set opens

    # the database with the NORESETLOGS option and should be used only if

    # the current versions of all online logs are available. The second

    # set opens the database with the RESETLOGS option and should be used

    # if online logs are unavailable.

    # The appropriate set of statements can be copied from the trace into

    # a script file, edited as necessary, and executed when there is a

    # need to re-create the control file.

    #

    # Set #1. NORESETLOGS case

    #

    # The following commands will create a new control file and use it

    # to open the database.

    # Data used by the recovery manager will be lost. Additional logs may

    # be required for media recovery of offline data files. Use this

    # only if the current version of all online logs are available.

    STARTUP NOMOUNT

    CREATE CONTROLFILE REUSE DATABASE "EP88DMO" NORESETLOGS NOARCHIVELOG

    -- SET STANDBY TO MAXIMIZE PERFORMANCE

    MAXLOGFILES 8

    MAXLOGMEMBERS 4

    MAXDATAFILES 256

    MAXINSTANCES 1

    MAXLOGHISTORY 453

    LOGFILE

    GROUP 1 (

    '/u01/oradata/EP88DMO/log1a.dbf',

    '/u02/oradata/EP88DMO/log1b.dbf'

    ) SIZE 20M

    -- STANDBY LOGFILE

    DATAFILE

    '/u04/oradata/EP88DMO/system01.dbf',

    '/u08/oradata/EP88DMO/wawork.dbf'

    CHARACTER SET WE8ISO8859P15

    ;

    # Recovery is required if any of the datafiles are restored backups,

    # or if the last shutdown was not normal or immediate.

    RECOVER DATABASE

    # Database can now be opened normally.

    ALTER DATABASE OPEN;

    # Commands to add tempfiles to temporary tablespaces.

    # Online tempfiles have complete space information.

    # Other tempfiles may require adjustment.

    ALTER TABLESPACE PSTEMP ADD TEMPFILE '/u05/oradata/EP88DMO/pstemp01.dbf'

    SIZE 524288000 REUSE AUTOEXTEND OFF;

    # End of tempfile additions.

    #

    # Set #2. RESETLOGS case

    #

    # The following commands will create a new control file and use it

    # to open the database.

    # The contents of online logs will be lost and all backups will

    # be invalidated. Use this only if online logs are damaged.

    STARTUP NOMOUNT

    CREATE CONTROLFILE REUSE DATABASE "EP88DMO" RESETLOGS NOARCHIVELOG

    -- SET STANDBY TO MAXIMIZE PERFORMANCE

    MAXLOGFILES 8

    MAXLOGMEMBERS 4

    MAXDATAFILES 256

    MAXINSTANCES 1

    MAXLOGHISTORY 453

    LOGFILE

    GROUP 1 (

    '/u01/oradata/EP88DMO/log1a.dbf',

    '/u02/oradata/EP88DMO/log1b.dbf'

    ) SIZE 20M

    -- STANDBY LOGFILE

    DATAFILE

    '/u04/oradata/EP88DMO/system01.dbf',

    '/u08/oradata/EP88DMO/wawork.dbf'

    CHARACTER SET WE8ISO8859P15

    ;

    # Recovery is required if any of the datafiles are restored backups,

    # or if the last shutdown was not normal or immediate.

    RECOVER DATABASE USING BACKUP CONTROLFILE

    # Database can now be opened zeroing the online logs.

    ALTER DATABASE OPEN RESETLOGS;

    # Commands to add tempfiles to temporary tablespaces.

    # Online tempfiles have complete space information.

    # Other tempfiles may require adjustment.

    ALTER TABLESPACE PSTEMP ADD TEMPFILE '/u05/oradata/EP88DMO/pstemp01.dbf'

    SIZE 524288000 REUSE AUTOEXTEND OFF;

    # End of tempfile additions.

    #

     

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Paul.Soltermann_at_vonroll-isola.com: "[HPADM] SUMMARY: problems printing umlaute Q=F6=FC_?="

    Relevant Pages

    • [HPADM] SUMMARY: RE: How to extract lines from a file using sed without using line numbers.
      ... # parameters and can be included in the database initialization file. ... # control file and uses it to open the database. ... # the current versions of all online logs are available. ... # Commands to add tempfiles to temporary tablespaces. ...
      (HP-UX-Admin)
    • Re: Tracking Log In and Log Out times of Users
      ... The fact that the database is on the server should be irrelevant. ... Type mismatch and then highlights Set rst = ... On my startup form, (that opens every time the database is open, ... I then went to the load ...
      (microsoft.public.access.modulesdaovba)
    • RE: Compacting MDB help
      ... The autoexec macro opens a ... The FrontEnd.mdb's main switchboard has a cbo to switch back end ... FECompact.mdb runs the few lines of code to compact the FrontEnd.mdb ... I'm quite certain that you can't Compact an open database from within itself ...
      (microsoft.public.access.modulesdaovba)
    • Re: Code causes error 2486 in access 2000, IPF in 2002
      ... Compact the database to get rid of this junk: ... Allen Browne - Microsoft MVP. ... Windows 98 machine. ... update queries and opens another form - ...
      (microsoft.public.access.formscoding)
    • Re: bug? Repeated OpenForm / SizeToFit operations
      ... closing the database and attempting to ... Microsoft Access was unable to create the Database window. ... I have to admit, neither the "undo" warning you got, nor my Internet ... > Dismiss this second dialog the table opens. ...
      (microsoft.public.access.formscoding)