sqlldr: use data = file name, but also 'fix'...

Hello

I would like to know if it helps to specify the size of record for example, "fix 96" in a direct charge.
the recording is fixed and has decimal/characters only.


In this case, how can I specify that the rec is "fix" without Hardcoding the file name in the control file?

It seems he can follow only INFILE, which involves hard - coded file name but I want the file name for the ctl file becomes reusable.

for example, data sqlldr = < Filename > "Challenge 96" control = < generic_controlfile >




Thank you.

Rustydud

You can generate your control on the fly file. For example, under unix

Start with a generic.ctl file:

...
INFILE %filename% "fix %recsize%"
...

Now provide the actual values you want:

filename=$1
recsize=$2

cat generic.ctl | sed -e s/%file%/$filename/ | sed -e s/%recsize%/$recsize >/tmp/specific.ctl

sqlldr u/p control=/tmp/specific.ctl

Any use to you?

HTH

Nigel cordially

Edited by: nthomas on January 8, 2009 13:46 (added missing %)

Tags: Database

Similar Questions

  • El Capitan in all applications, File &gt; Open displays all by date. Icons by date, by date, by date, file names. I hate this. How can I view by NAME, as previous OSX?

    With the help of El Capitan, in all the applications, "File > Open" all groups by date (see red circles below). Icons by date, date, genre, date, all by date, file names. I hate this. How can I do view by NAME, as the previous OSX?

    You have chosen to organize the display by date. Change votes to zero, or name.

    Reorganize the key one above "day" is in yesterday on your screenshot.

  • I created a live account using my domain name, but I can't check because I can't in my Inbox as my accounts not verifyied,

    I created a live account using my domain name, but I can't check because I can't in my Inbox as my accounts not verifyied,

    I'm going round in circles. :
    I get this message: you have created * address email is removed from private life * as your Windows Live ID, but it must be checked until you can use it. To check, you can check your email at the * address email is removed from the privacy * and follow the instructions in the message, we have sent you.
    But it won't let me in the Inbox to check my email as my unverified accounts?

    Your question is part of Windows Live Solution Center.
    Given that you do not specify Windows Live Mail or Windows Live Hotmail, here is the main link and you can pick the right forum for your question:
    http://windowslivehelp.com/

  • How do you change installation date file name IE 20130618_293.jpg to all IMG293.jpg

    How do you change installation date file name IE 20130618_293.jpg to all IMG293.jpg

    If it's just a personal folder, and then right-click on the file, select Rename , then change the name to what you want and press enter. Avoid changing the file extension (.jpg in this case) as it may cause problems with it being recognized as the wrong file type.

  • Problems with the "use tiny file names...". "checkbox in the settings of WebHelp box

    Given that the RH 9 is only able to run on Windows, the checkbox "Use tiny file names..." ' (see image below) can cause some unexpected problems when generating output for a unix (or linux) platform. I found this recently when generating output of web for a project that is visualized on a linux platform machine and met hundreds of broken links unexpected help.

    WebHelp Settings - User LowerCase for Unix.jpg

    If this is the first time you generate your project output, this function works very well - it converts all topics, image files and all what it takes to display help, lower case. However, if for some reason, you had generated previous outputs without this box, and now you have decided that you want all your files output in lower case, just check this box and regenerating the output will not work.

    The reason is simple - the Windows operating system does not distinguish between upper and lower case in file names (e.g., fichier.htm name is the same as the FILE name.) (HTM). UNIX (and linux) are case-sensitive and treat these files are two separate files. Therefore, HR fact not (cannot) change existing file in your folder names with this checked out and gives no message indicating such when generating the output. In this case, the only way to solve this problem is to delete the folder containing your output files and have HR to regenerate your project from scratch.

    I had an additional problem which has made things even worse. In a project for a linux platform, I have unchecked the box during the creation of project by accident (perhaps over a period of days or weeks). Then, due to another problem, I had to restore my project at an earlier stage. At this point, I discovered that my necessary help links of the files using lowercase and uppercase the filenames for all work very well.

    I've seen no mention of this in the HR documentation, so I thought that I must draw the attention of the HR community.

    Yes - just to clarify, I'm taking everything I publish on.

    Reminder - just those who publish in a Unix/Linux warning environment if you need to change the case of file names in your folder you post on and you already have stuff in there with the same name, you will need to delete the files first before you republish.

  • Date, file name, the stamp

    I looked for hours to get a script that will work in Illustrator CS4 that will put a block of text on the page identification:

    Date, file name and the user name on the document (Council of art)

    I'm not versed in the scripts. Can someone help me?

    You just want to give this review. IM yet to learn this JavaScript stuff and I'm sure it can be cleaned.

    #target illustrator

    main() {} function

    If (app.documents.length == 0) {}

    Alert ("Please have an"Illustrator"document before running this script.");

    return;

    }

    var app.activeDocument = docRef;

    with (docRef) {}

    If (saved == false) save();

    var filePath = path;

    If (inCollection (linked text frames, "cartridge-file'")) {}

    frameA var = textFrames.getByName('titleblock-file');

    frameA.contents = name;

    }

    If (inCollection (linked text frames, "cartridge-path '")) {}

    frameB var = textFrames.getByName('titleblock-path');

    frameB.contents = unescape (fullName);

    }

    If (inCollection (linked text frames, "cartridge-date'")) {}

    frameC var = textFrames.getByName('titleblock-date');

    If (filePath.created! = null) {}

    var creatDate = filePath.created.toString ().split(' ');

    var creatDate = creatDate [1] + "" + creatDate [2] + "" + creatDate [3];

    frameC.contents = creatDate;

    }

    }

    If (inCollection (linked text frames, "cartridge-revised'")) {}

    Var box = textFrames.getByName('titleblock-revised');

    If (filePath.modified! = null) {}

    ModDate var = filePath.modified.toString ().split(' ');

    Var ModDate = ModDate [1] + ' ' + ModDate [2] + ' ' + ModDate [3];

    frameD.contents = ModDate;

    }

    }

    If (inCollection (linked text frames, ' titleblock-editor "")) {}

    War-horse var = textFrames.getByName('titleblock-editor');

    frameE.contents = "Mark Larsen"

    }

    }

    }

    main();

    function inCollection (ObjArr, "stringname") {}

    var x = false;

    for (var i = 0; i)< objarray.length;="" i++)="">

    If (ObjArr [i] .name == stringname) x = true;

    }

    Return x;

    }

  • Restore rman 10g with different data file name.

    Hi all.

    I am successful restoration sauvegardΘ (Veritas Netbackup) one 10.2.0.5 database.

    The original database was a 2 node Rac 10.2.0.5 on asm without OMF.

    I'm trying to restore on another host with the same version 10.2.0.5 and even platform (Sparc Solaris), but single instance database.

    RMAN complete successfully, the restore, but the names of the data files are different from what is written in the controlfiles so

    the database can go up but not open.

    It is not only a question of path, the look of database for a file of data like this:

    System.261.622119076 (the right way of the asm source environment)

    but instead, rman restore this data as a file

    o1_mf_system_2ixfh90q_.dbf

    This seems a name OMF.

    I don't understand the reason.


    Can I use the command set newname for each data file?


    Thanks in advance.




    I restored the database successfully.

    In init.ora I don't use the setting as a CONVERT.

    I don't know why but I had to restore archived log first. something like

    DESTINATION ARCHIVELOG TO GAME ' / u01/app/oracle/oradata/PDM/arch;

    RESTORE ARCHIVELOG ALL;

    then:

    RMAN > RUN

    {

    SBT ALLOCATE CHANNEL t1 TYPE of AIRCRAFT;

    Restore controlfile;

    }

    After this:

    editing of database startup

    and I extracted the list of data files:

    + DATA /...

    + FLASH...

    then

    change the editing of the database;

    RUN {}

    SBT ALLOCATE CHANNEL t1 TYPE of AIRCRAFT;

    SBT ALLOCATE CHANNEL t2 TYPE of AIRCRAFT;

    SBT ALLOCATE CHANNEL t3 TYPE of AIRCRAFT;

    SBT ALLOCATE CHANNEL t4 TYPE of AIRCRAFT;

    the value of newname for datafile 1 to ' / u01/app/oracle/oradata/PDM/system.261.622119067';

    St newname for datafile 2 to ' / u01/app/oracle/oradata/PDM/undotbs1.262.783621567';

    the value of newname for datafile 3 to ' / u01/app/oracle/oradata/PDM/sysaux.263.622119149';

    the value of newname for datafile 4 to ' / u01/app/oracle/oradata/PDM/undotbs2.265.622119189';

    the value of newname for datafile 5 to ' / u01/app/oracle/oradata/PDM/users.266.622119281';

    the value of newname for datafile 6 to ' / u01/app/oracle/oradata/PDM/gcs_data.272.622547291';

    the value of newname for datafile 7 to ' / u01/app/oracle/oradata/PDM/gcs_indx.275.622548237';

    the value of newname for datafile 8 to ' / u01/app/oracle/oradata/PDM/gcs_lob.276.622548403';

    the value of newname for datafile 9 to ' / u01/app/oracle/oradata/PDM/pdm_data.273.622547535';

    the value of newname for datafile 10 to ' / u01/app/oracle/oradata/PDM/pdm_indx.274.622547861';

    the value of newname for datafile 11 to ' / u01/app/oracle/oradata/PDM/tbs_htmldb.277.623757195';

    the value of newname for datafile 12 to ' / u01/app/oracle/oradata/PDM/w3docdb_data.278.623757345';

    the value of newname for datafile 13 to ' / u01/app/oracle/oradata/PDM/w3docdb_index.279.623757371';

    the value of newname for datafile 14 for ' / u01/app/oracle/oradata/PDM/w3docdb_lob.280.623757407';

    the value of newname for datafile 15 to ' / u01/app/oracle/oradata/PDM/aspect_data.295.636897363';

    the value of newname for datafile 16 t to ' / u01/app/oracle/oradata/PDM/pdmct.319.650450905';

    the value of newname for datafile 17 to ' / u01/app/oracle/oradata/PDM/pdmct.320.650451825';

    the value of newname for datafile 18 to ' / u01/app/oracle/oradata/PDM/pdmpm.321.660676573';

    the value of newname for datafile 19 to ' / u01/app/oracle/oradata/PDM/undotbs3.327.783526691';

    the value of newname for datafile 20 to ' / u01/app/oracle/oradata/PDM/pdmed_data.330.787137071';

    the value of newname for datafile 21 to ' / u01/app/oracle/oradata/PDM/pdmed_idx.329.787137111';

    until ' to_date ('2015 - 12 - 02:13:00:00 ',' yyyy-mm - dd:hh24:mi:ss');

    RESTORE THE DATABASE;

    switch datafile;

    recover the database;

    }

    at database startup has tried to recreate the DATA + redolog in and + FLASH as well

    I've deleted all the possible redolog except the redolog that have been verified as CURRENT or ACTIVE

    (I don't understand why in montage mode I have active and current redolog).

    SELECT GROUP #, ARCHIVED, STATUS FROM V$ LOG;

    ALTER database drop logfile group x.

    For the rest of the redolog I used:

    change the database file rename '+ DATA/pdm/onlinelog/group_1.257.622119063' to ' / u01/app/oracle/oradata/PDM/group_1a ";

    change the database file rename '+ FLASH/pdm/onlinelog/group_1.257.622119065' to ' / u01/app/oracle/oradata/PDM/group_1b ";

    change the database file rename '+ DATA/pdm/onlinelog/group_5.259.622119065' to ' / u01/app/oracle/oradata/PDM/group_5a ";

    change the database file rename '+ FLASH/pdm/onlinelog/group_5.259.622119065' to ' / u01/app/oracle/oradata/PDM/group_5b ";

    change the database file rename '+ DATA/pdm/onlinelog/group_7.269.622123949' to ' / u01/app/oracle/oradata/PDM/group_7a ";

    change the database file rename '+ FLASH/pdm/onlinelog/group_7.263.622123951' to ' / u01/app/oracle/oradata/PDM/group_7b ";

    change the database file rename '+ DATA/pdm/onlinelog/group_8.270.622123951' to ' / u01/app/oracle/oradata/PDM/group_8a ";

    change the database file rename '+ FLASH/pdm/onlinelog/group_8.264.622123951' to ' / u01/app/oracle/oradata/PDM/group_8b ";

    alter database disable change tracking block;

    change the database open.

  • Tablespace with a data file name in double and the directory added

    Version Oracle 11.1.0.7
    AIX platform

    I have exactly the same directory for the tablespace even a tablespace with 2 files with exactly the same name.

    I don't think it was possible for Oracle create two data files in the same directory with exactly the same data file for a tablespace name.

    The difference between the two seems to be the sizes - one is 10G, the other is 10 m autoextend on but with maximum size is equal to the size of create.

    It is not possible to table either both are full.

    Please notify.

    Thank you.

    You have a character that is hidden in the name of the file. Use ls for your operating system which shows the special characters (ls - lb or something, man ls).

  • Add the date file name

    I have tried automatically add a date in a name items in the render queue.

    I have the following.

    var x = app.project.renderQueue.item (1) .outputModule (1);

    Alert (x.file.name);

    This returns the name of the file that will be output, but I cannot change this value. The said script guide this attribute is read/write, but I can't understand how to edit.

    Thank you.

    var d = new Date();

    var separator = ' / ';.

    var dateSuffix = (d.getMonth () + 1) m:System.NET.SocketAddress.ToString () + separator + d.getDate () m:System.NET.SocketAddress.ToString () + separator + d.getFullYear (m:System.NET.SocketAddress.ToString () .substring (4, 2));

    Alert (dateSuffix);     Returns on 12-05-14

  • Coil using .dat file

    Hello

    I am trying to take a coil of several tables using the .dat file. The script used in the .dat file is given below. The problem is that I am able to connect to oracle using this script, but the parameters enviournment and coil doesnot come. Help, please.


    sqlplus demo_user/sms123@orcl

    ECHO has put lin 10000
    echo the value 50000 pages
    ECHO has set trimspool on
    echo set colsep «»
    echo left comments
    echo went off topic
    echo the value of the arraysize 5000

    echo c:\abc.txt COIL
    echo Select * FROM XMLTEST11;
    echo SPOOL OFF

    echo output

    Published by: Sonu on July 5, 2010 03:02

    put this part:

    echo set lin 10000
    echo set pages 50000
    echo set trimspool on
    echo set colsep ','
    echo set feedback off
    echo set heading off
    echo set arraysize 5000
    echo SPOOL c:\abc.txt
    echo SELECT * FROM XMLTEST11;
    echo SPOOL OFF 
    

    ... in his own example myscript.sql file and then call on the sqlplus command line...

    sqlplus demo_user/sms123@orcl @myscript.sql
    
  • ORA-01111: 129 data file name is unknown

    I have a 10.2.0.1 databases and a watch on another server on which recovery logs apply every 15 minutes.

    I have added a new file to the primary db backup server drive was full, so when he tried to automatically failed.

    I resolved the issue of space, but now I get the following error:

    ORA-00283: cool cancelled due to errors
    ORA-01111: name for the data file 129 is unknown - rename it to the correct file
    ORA-01110: data file 129: "C:\ORACLE\ORA10G\DATABASE\UNNAMED00129."
    ORA-01157: cannot identify/lock data file 129 - see DBWR trace file
    ORA-01111: name for the data file 129 is unknown - rename it to the correct file
    ORA-01110: data file 129: "C:\ORACLE\ORA10G\DATABASE\UNNAMED00129."

    I tried to manually copy the files from the live database and I tried a command alter database rename file but that tells me name change is not allowed if management standby is set to automatic. I had a search but cannot see a solution, any ideas?

    Thank you
    Robert

    Step 1:-check the name of the data file on the backup database

    Select name from v$ datafile; -This command should display the name of the data file as UNNAMEDxxxxx

    STEP 2:-ON THE BACKUP DATABASE
    ALTER system set standby_file_management = "manual";

    Step 3:-rename the data file
    ALTER database create datafile 'C:\ORACLE\ORA10G\DATABASE\UNNAMED00129' as 'C:\ORACLE\ORA10G\DATABASE\actual_dbfile_name.dbf '.

    Step 4:-on the backup database
    ALTER system set standby_file_management = "auto";

    Step 5:-on the backup database
    recover managed standby database disconnect;

  • existing file of data created with the data file name

    Hi Experts

    We accidentally created a data file with the same name in the same place
    TABLESPACE_NAME           FILE_NAME                                                  FILE_ID STATUS    ONLINE_ size in MB AUT maxbytes in MB
    ------------------------- ------------------------------------------------------- ---------- --------- ------- ---------- --- --------------
    WP_DATA                   /NEXWPLPR/dbase/wpdata/wp_data01.dbf                             8 AVAILABLE ONLINE  32767.9844 YES     32767.9844
    WP_DATA                   /NEXWPLPR/dbase/wpdata/wp_data02.dbf                            12 AVAILABLE RECOVER
    WP_DATA                   /NEXWPLPR/dbase/wpdata/wp_data02.dbf                            11 AVAILABLE ONLINE        1000 NO               0
    on OS lavel
    -rw-r-----  1 oracle dba  1048584192 Oct 21 12:44 wp_data02.dbf
    -rw-r-----  1 oracle dba  1048584192 Oct 21 13:09 wp_data02.dbf
    -rw-r-----  1 oracle dba 34359730176 Oct 21 13:10 wp_data01.dbf
    Please suggest how we can solve the problem?

    Database: 10g
    OS: linux

    Concerning
    Rahul
    Rahul

    Published by: 825075 on October 21, 2011 05:25

    One of them is 2 characters at least other two. You have twice ascii code 32, it's space.
    What happens if you run now:

    select file_id,file_name from dba_data_files
    where file_name='/NEXWPLPR/dbase/wpdata/wp_data02.dbf  ';
    

    Notice the 2 spaces at the end.

    Nicolas.

  • Network error mystery - Windows cannot access \\server\users when you use the netbios name, but works fine when you use the full domain name.

    Hi all:

    Mystery - I have a Win 7 work company that cannot access a particular action.  I get the following error-"you are not allowed to access \\server\users.  Contact your network administrator to request access.  However, these users can access these files successfully on other computers, and also if I use the fqdn or the IP instead of the "netbios name server", it connects successfully.

    Environment:

    -Workstation and server at the same time in the same AD Windows 2008 r2 domain.

    -All users, admin and non admin, cannot access this share when connecting to this computer only.

    -ACCESS to the other actions on the same server, as well as actions on other servers.

    -The biggest mystery to me - if I type the FQDN, \\server.domain.local\users, it works!  What the?

    I tried:

    -Deletion of the domain and add it again, no improvement.

    -Check Event Viewer, nothing jumps (not red or yellow).

    -Enabled auditing for access to objects on the server, it does not show a failure in the security event log.

    -Turn off the firewall of my computer.

    -UN-share and re - share the directory.

    -Give everyone full control (the fact that it works well with de facto authorities a little full domain name, a candidate little likely, but I have an open mind).

    For anyone wishing to offer their 'help' by asking me to make some sort of workaround as re - install windows or turn off netbios or use only of the full domain name here on out or whatever, please Don ' t bother.  I appreciate your help, but I am quite able to reinstall and I'm not interested unique hacks that affect this otherwise network well managed, I'm looking for a solution that will allow me to save time and is a long-term solution.

    In my view, that a key point here maybe I can connect successfully using \\server.domain.local\users, but not \\server\users.  Someone at - it some thoughts?

    In DNS server of youe, go to the area in question and in the use of select search before Wins wins tab and enter the address of your wins server if you have one. If not, install one.

  • I have two different file names, but the files inside of them are exactly the same

    Hi all

    I was running a double Finder folder.  I realize that in my Directory user (c:\users\myname) there are a few paths to the same folder, but referred to by different names.  One of them is C:\users\myname\AppData\Local\ the other folder is C; \users\myname\Local Settings.  Both of these 'files' link to the same files on the hard drive.  The double file Finder think that these files are duplicated because they seem to be in different folders, but they are in fact the same files singled twice.  The C:\users\myname\Local settings directory has a symbol that looks like a shortcut, but it does not behave as such.  There is no way to remove it without deleting the file in the other folder.

    Is a problem in the file system, or is it simply one of the oddities that I should just ignore?

    Thanks for any help

    It is a feature of the NTFS file system. Vista uses in several reasons such as compatibility.

  • Delta and other Greek characters that can be used in file names

    A client wants to know if she can use delta and some other Greek letters as characters for folder or filenames in Windows Explorer.  We have Windows 7 64-bit machines.

    If so, how it will make them appear?  It's alt + a different number?

    You can actually find those who use the character map as well.  If you click on the "Advanced view" check box, you can search for a character by name.  Here is where I looked for a 'more' and found the sign "more negative" that you mentioned.

    After that you find, when you highlight the symbol in the upper part, the code hits will be shown below, if there is one.  Some symbols (probably the majority) do not have a code of strike.

Maybe you are looking for