Windows batch file issue for Dbf to csv

Hello,
I am in a tough situation.I need to create a batch file in windows to convert .dbf file to .csv.
i am using below code for doing this .
dbf_2_ora.bat.....
f:
cd \Retail_Work\DATA_201\test
copy C_N_DETL.DBF C_N_DETL_TEST.csv
when I am running above bat file "C_N_DETL_TEST.csv" is creating but when I am opening this file data is separated by "tab".
kindly help me to create a csv file from dbf file withput spaces/tab/whitespaces.
hel[p me                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

IMPORT DATA is a server side command (just as the documentation tells you)
The SAP HANA server cannot access your workstation or the folders on it.
This (and a lot more around data import/export) has been discussed a lot here in SCN already.
A little research effort would have clarified this.
- Lars

Similar Messages

  • Is it possible to call a windows batch file from PL/SQL block ??

    Hi gurus,
    Would require your help.Is it possible to call a windows batch file from PL/SQL block ??If yes can you give an example for the same or any workaround for the same.
    Regards
    Vijay

    You didn't specify a database version, but if you are 10g or higher, it's quite straightforward using an external job type in DBMS_SCHEDULER. Funnily enough i'm looking at something similar myself at the moment.
    Useful guide to some of the issues here Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

  • Is there any command in windows batch file similar to the unix grep command

    Hi,
    I have a batch file which will return status of the Database to a file ex: "OPEN". Now I want to read this output file and check for the "OPEN" string from another batch file. any suggestions?. This is similar to "grep" command in unix. I want this to be done in windows batch file.
    This is my actual batch file
    rem -- Description: Check whether the Database is UP
    rem -- Usage:
    rem -- ORACLE_SID is input parameter for the file
    rem --
    rem --start of batch file
    @echo off
    set ORACLE_SID=%1
    echo connect plp/ltd1plp@%1
    echo set cmdsep on
    echo set cmdsep '"'; --"
    echo set term on
    echo spool c:/status_log.log
    echo select status from v$instance;
    echo spool off
    ) | sqlplus /nolog
    rem --end batch file
    Thanks.

    The same link from [google cache|http://209.85.229.132/search?q=cache:EJrm9tgj0a8J:www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/find.mspx+windows+find&cd=1&hl=en&ct=clnk&client=opera]. Also you can use help:
    find /?

  • Call Oracle Stored Procedure with Parameters from Windows Batch File

    Hi,
    I have an oracle procedure that requires two parameters to execute, start date and end date as such:
    CREATE OR REPLACE PROCEDURE insert_orders(
    pSTART_DT IN varchar2
    , pEND_DT IN varchar2
    I want to create a windows batch file to execute the procedure but want to be able to specify the parameters (ie start and end dates) in the batch file as opposed to changing the sql file that the batch file uses to execute the procedure but I don't know what the syntax is. I tried the following but it still doesn't work.
    Sql File: call_insert_orders.sql
    execute insert_orders('&1','&2');
    exit
    Batch File:
    sqlplus username/password @call_insert_orders.sql %01-jan-2010% %01-jan-2011%
    When I execute the batch file, my DOS window still prompts me to enter value 1 so I think it recognizes that there is a variable being used but is not able to fill in the actual value I specify. I'm not an experienced DOS/Windows Batch File person so I'm guessing it's my syntax that's screwed up. There is not a lot of documentation on this subject matter hence my post on this forum. Any helps would be appreciated.
    Thanks

    Hello,
    Just try the same DOS command without all the % sign.
    In MS-DOS, the % at the beginning and at the end of a string are for variables. Which means your batch is looking for a variable called 01-jan-2010 and a variable called 01-jan-2011, but those are the values you want to pass, not the name of variables.
    As they are not defined, nothing is passed to the sqlplus script, and that is why you are prompted for values.
    Hope it will help.
    Regards,
    Sylvie

  • Is it possible to call a windows batch file from PL/SQL

    Hi gurus,
    Would require your help.Is it possible to call a windows batch file from PL/SQL??If yes can you give an example for the same or any workaround for the same.
    Regards
    Vijay

    Hi!
    Youn need some extproc related entries in you listener.ora and tnsnames.ora file.
    *1. In the listener.ora:*
    Defining the listener process is done in two parts.
    The information contained in each listener differs!!!
    The first part is as follows:
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))  <---  *ADD THIS LINE
          (ADDRESS = (PROTOCOL = TCP)(HOST = yourhostname)(PORT = 1521))
      )The seoncd part is as follows:
    SID_LIST_LISTENER =
      (SID_LIST = 
        (SID_DESC =
          (GLOBAL_DBNAME = YOUR_GLOBAL_DBNAME)
          (ORACLE_HOME = c:\oracle\product\10.2.0)  <-- THIS IS YOUR ORACLE_HOME
          (SID_NAME = YOUR_SID)                            <-- SID
        (SID_DESC =                                              <--- ADD THIS LINE
          (SID_NAME = PLSExtProc)                          <--- ADD THIS LINE
          (ORACLE_HOME = c:\oracle\product\10.2.0) <--- ADD THIS LINE AND EDIT TO YOUR ORACLE_HOME
          (PROGRAM = extproc)                                <--- ADD THIS LINE
          (ENV = "EXTPROC_DLLS=ANY")                  <--- ADD THIS LINE
        )                                                                <--- ADD THIS LINE
      )*2. In the tnsnames.ora you need to add the following entry:*
    *(The KEY value entered must be match to the KEY value entered int the listener.ora file!)*
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
      )Finally you need to restart your listiner. After restarting there will be a service called "PLSExtProc" in your listener.
    This are only examples for extproc configuration, your tnsnames.ora and listener.ora can be differs.
    FIRST MAKE MAKE A BACKUP OF YOUR ORIGINAL tnsnames.ora AND listener.ora FILES
    For more information please check metalink note 68061.1 "EXTPROC: Creating External Procedures on Windows NT"
    Bestr Regards
    Norbert

  • Problem in connecting to sqlplus from windows batch file (DOS)

    Hi All,
    We have a new 10g Oracle database installed on windows server. I am trying to write a windows batch file to
    1) Connect to SQLPLUS
    2) Execute a script
    3) Disconnect from SQLPLUS.
    Example File Name:- execsql.bat
    SET ORACLE_SID=CAUT
    SET SCHEMA_IN=%1
    SET PASS=DEV
    SET script=%2
    sqlplus %SCHEMA_IN%/%PASS%@%ORACLE_SID% @%script%
    if %errorlevel% NEQ 0 echo ERROR: %ERRORLEVEL% else echo OK
    Now if i run this bat file like :- execsql.bat DEV script1.sql
    DEV= schema name,
    script1.sql = this file contains select * from dual;
    The code runs fine, but if i change dual to dual1 the sql error's out but not able to catch the error in the batch file.
    Reason why i would like to catch the error is this batch file would be scheduled through Autosys job scheduler and for autosys any exit code >0 is an error. Please help me in rewriting this batch script.
    Thanks
    Sam.

    Hello,
    What if you run this in SQL*Plus before you run the SELECT:
    whenever sqlerror exit failure

  • Maxl within Windows Batch File

    Hello,
       I am trying to schedule an Automatic Essbase Archiving command . Function is to Disable connects , Archive , Unarchive and Enable connects . I know the Maxl commands which perform this action but just wanted to make sure how to portray this within a Windows Batch file.
    Within the Batch file , abc.bat can I insert those commands . To enter the shell we need essmsh command , but I didnt wanted to get into decrypting , encrypting the ID etc to do that . So is there a way to get it done within the Windows batch file ?
    Thanks !!

    Yes its Straight forward case ,create a batch file which call the maxl script.The batch file should contain the user id and password of Essbase and the maxl script should contain the parameters of Essbase archiving
    The content of batch file for Essbase archiving process
    echo off
    set ESSUSER=admin
    Set ESSPWD=Password
    set ESSSERVER=localhost
    set ESSAPP=Sample
    set ESSDB=Basic
    SET ESSBASE SERVER PATH=D:\Hyperion\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer
    set MaxlScript=D:\Hyperion\Middleware\user_projects\epmsystem1\Essbaseserver\essbaseserver1\bin
    essmsh "D:\Archieve.mxl" %ESSUSER% %ESSPWD% %ESSSERVER%
    ===================================================================================================
    Maxlscript Content for Archieving
    spool on to "D:/bck.log";
    set timestamp on;
    login $ESSUSER $ESSPWD on $ESSSERVER;
    display session all;
    alter system kill request all;
    alter system logout session all force;
    export database $essApp.$essDB all data to server data_file 'd:\alldata.txt';
    alter database $essApp.$essDB force archive to file "D:/sample.arc";
    alter database $essApp.$essDB end archive;
    spool off;
    logout;
    exit;
    Similarly can you create batch files for Cube restoration .I hope the above example helps you
    Thanks,
    Sreekumar Hariharan

  • Where windows batch file which log off windows lies ?

    where windows batch file which log off windows lies ?
    to which me can call from java code to log off my pc?

    You should use a brute-force algorithm on the on/off switch on your pc. I suggest a rate of 30 hits per minute.

  • Where windows batch file lies which log off windows ?

    where windows batch file lies which log off windows ? wana log off my pc from java code

    grc.com has a program (very small) that does it. The program is called "wizmo" and is written in Assembly.
    If you are using Windows NT/2000/XP you can get a program in MS Windows Resource Kit called "shutdown.exe" but the program does only the shutdown job. You must manually turn the machine off.

  • Batch /exe file to convert dbf to csv for sqlldr loading..!

    Hi all,
    I am having a tough problem as below.
    I need to load a .dbf file into a oracle table by sql loader.
    Can to tell me the best way to convert .dbf file to .csv so that I can load it via sql loader.
    I need some batch file or exe file code to convert .dbf to .csv file.
    i was doing it manually as in below steps.
    1- open .dbf file in excel.
    2-save it as .csv option.
    3-use sql loaderfor converted .dbf file.
    I want to save my manual work of excel.Kindly help
    kindly light into it...
    rgds,
    pc

    There are lots of dbf to CSV converter available in net and you can find by Google!. In the Tom's package you can change a little bit to generate a CSV file.

  • What is the default program to run windows batch files?

    I am working on windows 7 and I found that "notepad" was set as the default program for opening my .bat files. when I try to execute the batch file by double clicking, it is opened by notepad.
    I have tried setting cmd.exe as the default program, it just opens the command prompt.
    What is the default program I should set for executing .bat files?
    I hav also tried using assoc .bat = batfile. The batch file runs fine from command prompt.

    This is not a scripting question.  It is a break/fix issue.  Contact you support person or Admin for assistance fixing this.
    http://www.sevenforums.com/general-discussion/53877-bat-files-open-notepad-instead-running-help.html
    ¯\_(ツ)_/¯

  • Java and Batch File Issue - need urgent help

    I have a java program which calls a batch file. This batch file calls another java program. I want an option so that I can close this java program from main program.
    If i try process.destroy then it will call batch file and not java program.
    I can't go away with batch file.
    I will appreciate if someone can help me.

    khannap wrote:
    Hi, Thanks for the help but this doesn't seem solving my problem completely. I will appreciate if you can help more.
    I will explain you the scenario -
    1. There is java program provided as an external program to me.Only changes things slightly.
    2. This java program is called using batch file. When batch file is started this java program starts and listens on a socket for incoming data.I would want to wrap the launch of this java program in another JVM so we can use process.destroy().
    3. I am writing a program to check performance of the above java program. I want to call this java program from my program in a loop having some varying config data. When I run the loop first time I create a batch file at run time which executes the batch file provided by vendor. This batch file starts the socket. Once my message list is over then my loop goes to executing the batch file again with different config parameters. But this time I run into issue because my previous java program is not killed after message sending was over.Would it be acceptable to mung the 3rd party batch file to insert a wrapper JVM?
    Even if i use threads I don't think I can get rid of batch file.I did not suggest getting rid of batch files.
    So, I need to find a way so that when any iteration of loop is over then this socket program is killed. These 3rd party java programs - do they not have a "terminate" command you can put at the end of your message list?
    Even if i closed the socket from my client program that doesn't help because server is still listening and waiting for new client.
    I need to kill server which was started by batch file.On Linux it would be fairly simple to modify your batch file to determine what the process id is and send the process a signal to terminate it.
    Not sure what you can do on Windows.

  • Partitioning previously used Windows NT File System for use with Mac and PC

    With reference to this thread I found when searching for a solution: Can Windows NT File System(NTFS) format external hard drive work on iMac?
    Below is the comment which led to me creating this new thread.
    "rkaufmann87Sep 8, 2014 8:26 AM Re: Can Windows NT File System(NTFS) format external hard drive work on iMac?
    in response to djj19
    djj19 wrote:
    Hi there,
    I am about to follow your advice also for the same issue, the worry I have is that when I select partition 1, it says "To erase and partition the selected disk..." and so I am worried that if I do this it will erase the current contents of the hard disk drive (which were copied there from PCs in previous use).
    If so, is there a way to use the hard disk drive with a mac without erasing the contents?
    Thanks
    Your case is different and NO do not partition the EHD yet unless you are prepared to completely erase your PC data. Before progressing though, do you intend to share the EHD with a PC and your Mac? If so this is not advisable but it is possible, however you will need to compromise. Please answer that question first and then we can proceed with some advice.
    BTW it's generally not a good idea to ask a question in a thread that has already been answered, particularly one that is 3+ years old! In such a case it's normally better to create your own thread. "
    The answer to the question in the above comment is that ideally I would like to use with both Mac and PC, why is this not advisable?
    Please discuss my best options. I am wondering if I could transfer the current contents of the disk drive elsewhere, partition (which would erase) the disk drive, then put back the contents along with the new files which I have been trying to put on in the first place?
    If this were to work would I then be tied down to only using this disk drive with a Mac?
    Thank you.
    Message was edited by: djj19

    Ideally it is best to have seperate (discreet) EHD's for a PC and Mac due to their differences in HD formatting. However, this is not always feasable but there are alternative solutions availble. Among those are:
    Creating and useing a Dropbox account that can be shared by PCs, Macs, IOS and Android devices. Dropbox allows for 2GB of free storage and additional storage is available for a small monthly fee.
    Another possiblity is formating an EHD so that it may be shared by both a PC and Mac, this format is FAT 32. The downside of doing this is the size of the files written to the HD are limited to 4GB.

  • Executing sqlplus in windows batch file - URGENT

    Hi
    Is it possible to run sqlplus.exe thru batch file as follows.
    set PATH=%PATH%;C:\oracle\product\10.2.0\client_1\BIN;
    host sqlplus userid=test1/test12@testdev
    sELECT * FROM CASESTATUS
    Thanks
    murali

    hI
    It did not work. I have this question.
    1. Do I have to run this opening SQL/PLUS and then submit
    @C:\Test\SQL2.bat
    2. Or from Windows command run SQL2.Bat
    I tried both of them , it did not work. If I try from windows , I am getting SQLPlus connection window at all.
    Please help me.
    Murali
    set PATH=%PATH%;C:\oracle\product\10.2.0\client_1\BIN;
    sqlplus userid=test1/test12@testdev
    Ok so far but your select needs to be in a file if you want this to be executed.
    Put this in, f.ex, run.sql
    >>
    sELECT * FROM CASESTATUS
    >>
    then you can use
    sqlplus userid=test1/test12@testdev @run.sql <complete path if needed>

  • In windows batch file,how to check if connection to db is successful or not

    I want to do some operations in batch file. So i use command "sqlplus usr/pwd@con @operation.sql" to in the batch file. But how can i check if i connect successfully? The %ErrorLevel% is always 0

    Change your batch script as follows:
    (P.S. You could prompt for the values in the batch file as well)
    file: test.bat
    @echo off
    sqlplus /nolog @operation.sql <username> <password> <alias>file: test.sql
    define username='&1'
    define password='&2'
    define alias='&3'
    whenever sqlerror exit failure;
    connect &username/&password@&alias
    whenever sqlerror continue;Now you should get a failure message as a result of:
    whenever sqlerror exit failure;you can also exit with a specific value
    whenever sqlerror exit -5;

Maybe you are looking for

  • 3G iPod loses all of its settings if untouched for a day or more

    I have a 15GB third generation iPod that works fine except for one thing -- when I let it sit for about 36 hours and it goes into "deep sleep" mode, it loses all of its settings and it asks me to choose a language when I press a button to turn it bac

  • Making a still from FCP video

    I need to make a still (JPEG, tiff, ...) from a frame of my video on FCP so I can put it in a Word doc afterwards. How do I proceed? Thanks

  • 9.0.2.1.0 CD shows 9.0.2.0.0 in Installer

    I have a 9.0.2.1.0 CD for 9iAS Rel 2 released in Mar 03. However, the installer shows all the core components as 9.0.2.0.0 ?? What's the true version #? Its very confusing especially when there's a need to patch the 9.0.2.1.0 with atleast 4 patches a

  • Vendor Batch Field

    Hi, I need to make the Vendor Batch Field as an Input Field ( GOITEM-LICHA ) for the movement type 501. It is populatin g for 101 mvt type if the material is batch managed whereas for 501 even though the material is batch managed i am not able to get

  • Move Table on Ora 9.2 from tablespace to another (dictionary managed)

    Hello, is it possible to move tables with brtools from dictionary managed tablespace to another dictionary managed tablespace on Oracle 9.2 ?