locked
How to upload SQL-server database to FTP? RRS feed

  • Question

  • Hello,

    I want to upload a SQL-server database to FTP. How do I do that? Do I just move the database file or do I need to use a tool?

    Also, Is it correct that it´s not a good idea to zip an SQL-server database file?

    Thanks in advance!

    Monday, September 9, 2013 4:09 PM

Answers

  • Hi MP,

    To upload the database to FTP, you need to backup database first, then you can upload the backup file to FTP server.

    Syntax: 

    BACKUP DATABASE [DBNAME] TO  DISK = N'D:\DBNAME.bak' 
    GO

    To learn more about backing database use this link -> http://technet.microsoft.com/en-us/library/ms186865.aspx

    At Client server, you can restore the Database back, please use this link to learn about restore : http://technet.microsoft.com/en-us/library/ms190372.aspx


    Regards Harsh


    • Edited by Harsh Kumar Monday, September 9, 2013 4:30 PM
    • Marked as answer by mp703 Monday, September 9, 2013 5:55 PM
    Monday, September 9, 2013 4:28 PM
  • Hi 

    Take backup of the required database. See the link bellow

    http://technet.microsoft.com/en-us/library/ms187510.aspx#SSMSProcedure 

    If you are using SQL 2008r2+ version, then backup can be compressed. 

    Upload the backup file to the FTP

    Vt


    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

    • Marked as answer by mp703 Monday, September 9, 2013 5:55 PM
    Monday, September 9, 2013 4:29 PM
  • Zipping will not hurt and should make your bak file smaller.

    Regards, Dean Savović

    • Marked as answer by mp703 Monday, September 9, 2013 5:55 PM
    Monday, September 9, 2013 5:35 PM

All replies

  • Hi MP,

    To upload the database to FTP, you need to backup database first, then you can upload the backup file to FTP server.

    Syntax: 

    BACKUP DATABASE [DBNAME] TO  DISK = N'D:\DBNAME.bak' 
    GO

    To learn more about backing database use this link -> http://technet.microsoft.com/en-us/library/ms186865.aspx

    At Client server, you can restore the Database back, please use this link to learn about restore : http://technet.microsoft.com/en-us/library/ms190372.aspx


    Regards Harsh


    • Edited by Harsh Kumar Monday, September 9, 2013 4:30 PM
    • Marked as answer by mp703 Monday, September 9, 2013 5:55 PM
    Monday, September 9, 2013 4:28 PM
  • Hi 

    Take backup of the required database. See the link bellow

    http://technet.microsoft.com/en-us/library/ms187510.aspx#SSMSProcedure 

    If you are using SQL 2008r2+ version, then backup can be compressed. 

    Upload the backup file to the FTP

    Vt


    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

    • Marked as answer by mp703 Monday, September 9, 2013 5:55 PM
    Monday, September 9, 2013 4:29 PM
  • Thanks for the replies! So, I must backup the database first? Is it ok to zip the bak file afterwards?

    Thanks again,

    Martin

    Monday, September 9, 2013 5:30 PM
  • Zipping will not hurt and should make your bak file smaller.

    Regards, Dean Savović

    • Marked as answer by mp703 Monday, September 9, 2013 5:55 PM
    Monday, September 9, 2013 5:35 PM