<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sqlloader / Sh Shell Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973811#M928239</link>
    <description>Hi Yog / RK...&lt;BR /&gt;&lt;BR /&gt;Thanks for ur reply....&lt;BR /&gt;i think i can check for .BAD file and if it doesnt exist then i can assume the table is loaded completely..&lt;BR /&gt;&lt;BR /&gt;am i right ?&lt;BR /&gt;&lt;BR /&gt;Raj !!!</description>
    <pubDate>Thu, 15 May 2003 03:35:25 GMT</pubDate>
    <dc:creator>Prabhu_7</dc:creator>
    <dc:date>2003-05-15T03:35:25Z</dc:date>
    <item>
      <title>Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973808#M928236</link>
      <description>I have a shell script , from which i call sqlload statement.&lt;BR /&gt;&lt;BR /&gt;SQLLoad &amp;lt; ...... &amp;gt; &lt;BR /&gt;&lt;BR /&gt;this loads data file into my database table.After loading i do lot of process.&lt;BR /&gt;&lt;BR /&gt;But at this point i want to compare no of rows in datafile and database table and ensure that all rows are loaded successfully and then proceed with other process, else i need to throw error EXIT and come out.&lt;BR /&gt;&lt;BR /&gt;How to do this ? Pls help very urgent ....&lt;BR /&gt;&lt;BR /&gt;Thanks!!!!&lt;BR /&gt;Raj&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Thu, 15 May 2003 02:46:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973808#M928236</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-05-15T02:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973809#M928237</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;Are your using 9iR1 or up?&lt;BR /&gt;&lt;BR /&gt;If yes, you can try external tables (provides the ability to query a flat file using SQL). With this the need to use sqlldr is lessened.  I find the flexibility of SQL over SQLLDR control files to be so useful that I would opt for an external table over sqlldr in most all cases.&lt;BR /&gt;&lt;BR /&gt;This should help fix the problem.&lt;BR /&gt;&lt;BR /&gt;Otherwise, you can compare the log file generated by the load with the number of records processed after each load process. &lt;BR /&gt;For example:&lt;BR /&gt;the log file will contain a section with the following lines:&lt;BR /&gt;...&lt;BR /&gt;Table DEPT:&lt;BR /&gt;  4 Rows successfully loaded.&lt;BR /&gt;  0 Rows not loaded due to data errors.&lt;BR /&gt;  0 Rows not loaded because all WHEN clauses were failed.&lt;BR /&gt;  0 Rows not loaded all fields were null.&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;Regards&lt;BR /&gt;Yogereaj</description>
      <pubDate>Thu, 15 May 2003 03:23:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973809#M928237</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-05-15T03:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973810#M928238</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;here is an example of oracle.&lt;BR /&gt;&lt;BR /&gt;u load data file using sqlldr&lt;BR /&gt;&lt;BR /&gt;sqlldr user/passwd controll=file.ctl data=datafile.dat&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;u will get the datafile.log &lt;BR /&gt;datafile.bad&lt;BR /&gt;&lt;BR /&gt;if datafile.bad is zero then all your rows and tables are in tact.&lt;BR /&gt;&lt;BR /&gt;u can check other wise datafile.log it will tell errors reported.&lt;BR /&gt;&lt;BR /&gt;u can compare controlfile.log and datafile.bad and u can find it out.&lt;BR /&gt;&lt;BR /&gt;radhakrishnan</description>
      <pubDate>Thu, 15 May 2003 03:26:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973810#M928238</guid>
      <dc:creator>Radhakrishnan Venkatara</dc:creator>
      <dc:date>2003-05-15T03:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973811#M928239</link>
      <description>Hi Yog / RK...&lt;BR /&gt;&lt;BR /&gt;Thanks for ur reply....&lt;BR /&gt;i think i can check for .BAD file and if it doesnt exist then i can assume the table is loaded completely..&lt;BR /&gt;&lt;BR /&gt;am i right ?&lt;BR /&gt;&lt;BR /&gt;Raj !!!</description>
      <pubDate>Thu, 15 May 2003 03:35:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973811#M928239</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-05-15T03:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973812#M928240</link>
      <description>yes.&lt;BR /&gt;&lt;BR /&gt;when you load the data, make sure to use the BAD=&lt;SOME filename=""&gt; option on the command line to avoid reading and writing the same file in during the load!&lt;BR /&gt;&lt;BR /&gt;sqlldr userid=yd/yd@mydb control=load_working.ctl bad=working.bad data=new.bad&lt;BR /&gt;&lt;BR /&gt;After the load, if there are any records in WORKING.BAD, they would be really bad records, records that violated some other constraint, and must be reviewed.&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;Yogeeraj&lt;/SOME&gt;</description>
      <pubDate>Thu, 15 May 2003 04:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973812#M928240</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-05-15T04:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973813#M928241</link>
      <description>If you are using 9i, I recommend using the external table option new to 9i. &lt;BR /&gt;&lt;BR /&gt;The internal table option allows you to create a table that loads the flat file using sqlldr in a behind the scenes manner. To you it looks like a table, but it is really a flat file. &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;create table employees_ext&lt;BR /&gt;(employee_id number,&lt;BR /&gt; first_name char(30),&lt;BR /&gt; last_name char(30),......)&lt;BR /&gt;ORGANIZATION EXTERNAL(     -- External Table&lt;BR /&gt;TYPE oracle_loader         -- Access driver&lt;BR /&gt;DEFAULT DIRECTORY data_dir -- Files Directory&lt;BR /&gt;ACCESS PARAMETERS          -- Similar to SQLLDR&lt;BR /&gt;( RECORDS DELIMITED BY NEWLINE&lt;BR /&gt;  FIELDS TERMINATED BY ', '&lt;BR /&gt;  BADFILE 'bad_emp_ext'&lt;BR /&gt;  LOGFILE 'log_emp_ext'&lt;BR /&gt;  MISING FIELDS ARE NULL)&lt;BR /&gt;  LOCATION ('empl.txt'))&lt;BR /&gt;REJCECT LIMIT UNLIMITED;&lt;BR /&gt;&lt;BR /&gt;This example creates a table employees_ext. You can do select count(*) on it and any read operation that you would normally do. Note that the same sqlldr parameters are the same as the access parameters.&lt;BR /&gt;&lt;BR /&gt;So, you can do stuff like:&lt;BR /&gt;&lt;BR /&gt;insert into emp as (select * from employees_ext);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;select count(*) into extcount from employees_ext;&lt;BR /&gt;select count(*) into empcount from emp;&lt;BR /&gt;&lt;BR /&gt;if extcount &amp;lt;&amp;gt; empcount then&lt;BR /&gt;   dbms.output.putline('COUNTS DO NOT MATCH');&lt;BR /&gt;   rowback;&lt;BR /&gt;   exit;&lt;BR /&gt;endif;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is one of my personal favorite features of 9i. &lt;BR /&gt;&lt;BR /&gt;-Good Luck</description>
      <pubDate>Fri, 16 May 2003 17:17:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973813#M928241</guid>
      <dc:creator>R. Allan Hicks</dc:creator>
      <dc:date>2003-05-16T17:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973814#M928242</link>
      <description>Unfortunately i use Oracle 8.0&lt;BR /&gt;&lt;BR /&gt;:-(&lt;BR /&gt;&lt;BR /&gt;Thanks all.&lt;BR /&gt;&lt;BR /&gt;Raj!!!</description>
      <pubDate>Fri, 16 May 2003 18:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973814#M928242</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-05-16T18:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973815#M928243</link>
      <description>Unfortunately i use Oracle 8.0&lt;BR /&gt;&lt;BR /&gt;:-(&lt;BR /&gt;&lt;BR /&gt;Thanks all.&lt;BR /&gt;&lt;BR /&gt;Raj!!!</description>
      <pubDate>Fri, 16 May 2003 19:00:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973815#M928243</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-05-16T19:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sqlloader / Sh Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973816#M928244</link>
      <description>Unfortunately i use Oracle 8.0&lt;BR /&gt;&lt;BR /&gt;:-(&lt;BR /&gt;&lt;BR /&gt;Thanks all.&lt;BR /&gt;&lt;BR /&gt;Raj!!!</description>
      <pubDate>Fri, 16 May 2003 19:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sqlloader-sh-shell-script/m-p/2973816#M928244</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-05-16T19:00:18Z</dc:date>
    </item>
  </channel>
</rss>

