invalid file operation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OraMaster
    New Member
    • Aug 2009
    • 135

    #16
    Originally posted by raagadeepthi
    I got that. But iam not sure where and how exactly i have to place the file in the server directory.

    More over iam not sure if i have privileges to do so.
    Hi raagadeepthi

    It's not very difficult to put a file on server directory. You can take help from your DBA's for this. If this is also not possible then leave it.
    Another way to load data into an Oracle table is using SQL Loader. For this you need not to have a file located on server :)

    Happy coding.
    Let me know if this solves your problem

    Kind Regds,
    Bhushan

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #17
      You can use command line FTP to ftp the file to the server. Something like:

      ftp <server>
      User: <username>
      331 Password required for server.
      Password: <password>
      230 User <username> logged in.
      ftp> lcd d:\
      ftp> cd D:\Public\eDR\u tl_dir
      ftp> put sample1.txt
      ftp> bye

      Comment

      • raagadeepthi
        New Member
        • Sep 2009
        • 19

        #18
        Any idea on how to read data from input file normally without UTL pakages as iam new to oarcle.

        I know how to load using Loader and toad but as i need to provide DBA guys a script i need to do this.

        Please help.

        Comment

        • OraMaster
          New Member
          • Aug 2009
          • 135

          #19
          Originally posted by raagadeepthi
          Any idea on how to read data from input file normally without UTL pakages as iam new to oarcle.

          I know how to load using Loader and toad but as i need to provide DBA guys a script i need to do this.

          Please help.
          Hi raagadeepthi

          Please decide on where you are going to read a file from? If your file is on server then external table is one way to get the file data into an Oracle table. You can provide external table script to your DBA's but again you need to put your file on Oracle Server. Other than this I don't think altenative way to achieve this.
          Best of LUCKS!!!

          Kind Regds,
          Bhushan

          Comment

          • raagadeepthi
            New Member
            • Sep 2009
            • 19

            #20
            I need to read the data from file stored in local machine and insert data into table.

            Comment

            • OraMaster
              New Member
              • Aug 2009
              • 135

              #21
              Originally posted by raagadeepthi
              I need to read the data from file stored in local machine and insert data into table.
              Hi raagadeepthi

              The Oracle DBMS can only read data from files on the same server
              via UTL_FILE or external tables. You can "push" the data from a
              client machine into Oracle using SQL*LOADER (which as a
              client-side tool), or FTP the files from your local machine to
              the data server where you can use UTL_FILE or external tables.

              Otherwise if it is necessary, you can design a form (client server- 6i) that can be load file in a clob in database and a storage procedure to load data from clob
              into database tables,or if your client is web like design a form in 9i or 10g version that can be load file in a clob in database and a storage procedure to load data from clob into database tables, in this case you mast use webutil package, or Use HTMLDB for load file from client in a clob in database and a storage procedure to load data from clob into database tables or
              make a loader script on client and run it in a form with host in
              client-server 6i version or webutil_host in Forms 9i or 10g.

              BOL!!!

              Kind Regds,
              Bhushan

              Comment

              • amitpatel66
                Recognized Expert Top Contributor
                • Mar 2007
                • 2358

                #22
                Oracle Database Server is installed in another machine. So the UTL_FILE will be able to operate on Physical directories that are in that particular machine and not in client local machine. You connect to database using Client Tool SQL Plus.

                Either FTP the file as I said using Command Line if you have Server details
                Else ask the Server Admin to Place the file in the Server and then you can execute your procedure to upload the data.

                Comment

                Working...