4 Replies Latest reply on Mar 13, 2015 1:05 AM by 1022573

    Can import connection informaiton  by command line?

    1022573

      Dear all,

       

      This is from David of Japan FM .

      Usually, we use the GUI to import  the exported  connection infomation(such as conn.xml),

      but  my customer want to import connection infomation by using command line,

      is there command line can import connection information?

       

      Best Regards

      David.

        • 1. Re: Can import connection informaiton  by command line?
          thatJeffSmith-Oracle

          Sorry, not today.

           

          But you could probably script it all in Windows/NIX. Just copy the files over, but you won't be able to get the passwords in the more modern versions.

          • 2. Re: Can import connection informaiton  by command line?

            But you could probably script it all in Windows/NIX. Just copy the files over, but you won't be able to get the passwords in the more modern versions.

            Huh? What 'modern versions' are you referring to.

             

            Up through Sql Dev 4.0.2.15.21 the connections.xml file has ALL of the needed connection info including the encrypted passwords.

             

            Copying a 'Reference' element from one connections.xml file to another works for me:

               <Reference name="scott

            " className="oracle.jdeveloper.db.adapter.DatabaseProvider" xmlns="">

                  <Factory className="oracle.jdevimpl.db.adapter.DatabaseProviderFactory1212"/>

                  <RefAddresses>

                     <StringRefAddr addrType="OracleConnectionType">

                        <Contents>BASIC</Contents>

                     </StringRefAddr>

            . . .

                     <StringRefAddr addrType="oraDriverType">

                        <Contents>thin</Contents>

                     </StringRefAddr>

                     <StringRefAddr addrType="port">

                        <Contents>1521</Contents>

                     </StringRefAddr>

                     <StringRefAddr addrType="user">

                        <Contents>scott</Contents>

                     </StringRefAddr>

            . . .

                     <StringRefAddr addrType="password">

                        <Contents>YbNLQXEvvLY=</Contents>

                     </StringRefAddr>

            . . .

                  </RefAddresses>

               </Reference>

             

            • 3. Re: Can import connection informaiton  by command line?
              thatJeffSmith-Oracle

              the more recent versions won't let you get passwords by just copying files over, you have to provide a password/hash to get them

              • 4. Re: Can import connection informaiton  by command line?
                1022573

                Thanks a lot.

                My customer is using Sql Developer 4.0.3.

                As a result ,this version  also can not import connection.xml by using command line.