Transfer data

  • Hi,

    How do you load data from a remote server? Which is

    not connected with your network?

    pls clear

    THanks

    JK.

     

     

     



  • If you can't set up a secure connection either by using SSL Certificates with SQL Server or over an encrypted tunnel like with VPN, you can always resort to transfering data via CDs and DVDs. If you're just looking to transfer the data and now a whole database, look at using bcp to get the data out of the originating server.

    K. Brian Kelley
    @kbriankelley

  • Dear Kelly,

     

    Is there any possibilities to do with SP_ATTACHDB. if yes how?

    please explain it.

     

    thanks

    JK.

  • Yes. However, it does mean taking the database offline on the first server. Basically, it's like this:

    1) Write down what files make up the database to be copied. An easy way to do this is through Enterprise Manager.

    2) Execute sp_detach_db on the database to be copied. This will take the database offline. Make sure you plan for that!

    3) Copy all database files (refer to the list you made) to another place. If you can copy directly to the second server, do that. Otherwise, if there is a location both servers can see copy there. If that doesn't work, copy the database files to a place where you can burn a CD or DVD.

    4) Re-attach the database on the first server using sp_attach_db (this will bring the database on-line on the first server).

    5) Once the files are on the second server, use sp_attach_db to bring the database on-line.

    This assumes you've handled getting the logins/users mapped correctly. Otherwise, you'll have the data, but you may need to do some security clean-up.

    K. Brian Kelley
    @kbriankelley

  • Thanks for your clear idea Kelley.

    JK

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply