4 Replies Latest reply on Sep 30, 2013 8:10 AM by BluShadow

    Windows Commands from PLSQL


      Hi All,


      ORACLE-BASE - Oracle Shell Commands From PL/SQL


      I have gone through the above article and tried to move/copy a file which is exists on windows 2008 server installed with Oracle I am succeded with the move/copy the file with in the server's different folder.


      If I run the below code, the file 'test1.jpg' was copied to D:\TEST_BLOB.


        host_command (p_command => 'copy D:\BLOB_EXTRACT\test1.jpg D:\TEST_BLOB');



      My doubt here is, I am not able to move/copy a file to a network drive. Can we able to do this by running the scripts mentioned in the above article.


      Here X: is network drive of different server. I am running the code without any errors but, the file is not getting copied.


        host_command (p_command => 'copy D:\BLOB_EXTRACT\test1.jpg X:\test');



      Please guide me.



        • 1. Re: Windows Commands from PLSQL

          Might have something to do with ACL Oracle Clusterware Resource Reference

          I'm just an underprivileged developer so it's only a guess.





          • 2. Re: Windows Commands from PLSQL
            Solomon Yakobson

            By default windows services are started under local system account which obviously has no permissions on mapped drives. You need to create a local user with same name as domain user with proper permissions on mapped drive. Then modify and start oracle services as that user.



            • 3. Re: Windows Commands from PLSQL

              Thanks SY. But I am not complete understood on this.


              I have a user 'DEMO.DEV', which i used to login to the DB server(Win 2008) and the Apps Server( Win 2003). I have the database user as 'DEMOTST'.


              Kindly clarify me on the above solution.


              Thanks in advance.

              • 4. Re: Windows Commands from PLSQL

                It's not who you log into oracle as, it's the user on the server that the Oracle services are running as.


                When the server it booted up, apart from the operating system itself, various programs and services are started by the server.  Some of those will start as the "root" or "Administrator" user, and some will be installed and running as some other user(s).  The Oracle database instance is one such service and will have been installed on the server so that it starts up under the guise of a particular user on that server. (We're talking server users, not database users).  Who that user is, depends on who installed the database instance and what options they chose when installing.  They could have picked the default options or they could have customized it to be some other user.  As we cannot see your server we cannot tell you exactly.  You'll have to speak to the person/DBA who installed it, or who can check for you.