Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. eagertotry

    delete all lines between two patterns

    Thanks PHV. Yeah, it was as simple as that. But then there are days. I was doing it with awk and somehow couldn't get it. Futurelet, awk code gives error for me: $ awk '/BEGIN/,/END/{next}1' file awk: syntax error near line 1 awk: bailing out near line 1
  2. eagertotry

    delete all lines between two patterns

    I am trying to delete lines from a file between a pair of patterns. I know this can be easily done in sed or awk, but I am not getting it today. cat file1 something # BEGIN to be deleted this one too # END whatever I want to delete all lines from BEGIN to END, both included. Any help is...
  3. eagertotry

    Can't create a new database via SQL

    Check the alert_<SID>.log in background_dump_dest. There must be listed the error that caused the database to crash. It could be either a space issue on file systems where Oracle software is or an internal error due to very high SGA (such as memory issue).
  4. eagertotry

    using &quot;imp&quot;

    Just for completeness sake, if you really wanted the DDLs, SantaMufasa method is the way to go. However, if the objective is just to create all the objects in the schema with no data, you could do that directly in import with parameter ROWS=N.
  5. eagertotry

    RMAN Parameter\Setting Question

    The 2 parameters actually are for different purposes. CONTROLFILE_RECORD_KEEPTIME is used to keep the control file size from becoming too big on account of storing too many records of archive log history (v$loghistory) or backup details (in case no catalog is used). Archive log history is stored...
  6. eagertotry

    Before insert trigger but updating

    First, you don't need "set" to assign values to variables. Next, trigger works on each row at a time. I didn't quite get what you're trying to do in: set :new.reconciled = 'Y' where ( select bon.book from :new, bond where :new.bond = bond.bond ) = 99 ; Does the bond table also has a column...
  7. eagertotry

    ssh &quot;&lt;cmd&gt;&quot; in a loop

    Never mind. I found the answer in one of the other posts in this forum. Solution is to use "ssh -n". Thanks
  8. eagertotry

    ssh &quot;&lt;cmd&gt;&quot; in a loop

    I am trying to do this: #!/bin/ksh while read HOST do echo "Checking $HOST" ssh $HOST "ls" done <listofhosts The file "listofhosts" has one host name per line (about 50 lines). ssh keys have been correctly copied to all the hosts. The script works fine for the first host in the file but...
  9. eagertotry

    Stand By Database File Locations Different

    You may create a text pfile on the primary and copy it over to standby: create pfile=<filename> from spfile; Copy this over to standby, modify as needed. For standby databases specifically, there are parameters that address the different path names for datafiles and archive logs...
  10. eagertotry

    Stand By Database File Prep

    Yes, you can do it this way. As a "hot" backup thing, this works without a problem. You can create your standby database this way without a problem. Just make sure that you copy all the archive logs also to the standby location.
  11. eagertotry

    Change high_value of partition

    Things are much, much simpler. You can split partition: ALTER TABLE tname SPLIT PARTITION lastpname AT (newhighvalue) INTO (PARTITION newpartitionname, PARTITION lastpname); SPLIT is a great command, and very intelligent one. It would move minimal data around and would preserve all...
  12. eagertotry

    DBCA Templates

    You can copy templates from $ORACLE_HOME/assistants/dbca/templates to any other system in the same location. However, templates do not work across releases. You cannot use a 9i template in a 10g home.
  13. eagertotry

    Compiling invalid objects using a select statement

    Remove chr(39) from your code. It is adding extra single quotes that are not needed here. 1 declare 2 cmd varchar2(256); 3 begin 4 for rec in (select 'select * from global_name' cmd from dual) 5 loop 6 dbms_output.put_line(rec.cmd); 7 execute immediate rec.cmd; 8 end...
  14. eagertotry

    Problem creating materialized view with primary key

    Could you elaborate on: What's happening? Are you getting an error? It would be nice if you could post a sample of the DDL you're using to do this stuff, at least the one that is giving the error. Tks
  15. eagertotry

    Check field for numeric during Select

    I would use length(translate(mystr,'0123456789A','A')) If the string "mystr" contains only numeric characters, the length returned above would be null. If it contains at least one non-numeric character, it would return a non-null length. You may use nvl on top of this or simply check if length...
  16. eagertotry

    Array of Array

    for i in 1..3 loop for j in 1..3 loop value1 := nva(i)(j); dbms_output.put_line(value1); end loop; va1 := nva(i); dbms_output.put_line(value1); end loop; Of course, you would need to have valid values in the subscripted elements.
  17. eagertotry

    Array of Array

    Yes. You can have varray or varray and likewise for all other collection types. You can even have intermixed, for example, a varray of a nested table. declare type t1 is varray(10) of integer; type nt1 is varray(10) of t1; -- multilevel varray type va t1 := t1(2,3,5); -- initialize...
  18. eagertotry

    MTS and STATISTICS

    9i calls MTS as simply SHARED SERVERS. Nevertheless, the working and architecture is similar and older MTS parameters still show in v$parameter. If the database instance is running is using shared servers, you should dispatcher and server background processes on Unix: ora_dnnn_SID ora_snnn_SID...
  19. eagertotry

    XPath Query

    Doesn't seem anything wrong with it. However, try this: select extract(object_value,'/PurchaseOrder/Reference/text()').getStringVal() from "PurchaseOrder2148_TAB"; HTH
  20. eagertotry

    View Question

    It seems you want to list all addresses whether or not there is a corresponding phone#. Outer join should allow you to do that: CREATE OR REPLACE VIEW vw_web_registrations AS SELECT addr.address.house, addr.address.fst_dir, addr.address.street...

Part and Inventory Search

Back
Top