SaveAs/Export SQL DB to desktop so I can FTP via email

Posted on 2006-05-03
Medium Priority
Last Modified: 2008-03-10
I have a db in SQL Server Enterprise Manager that I need to drop in an FTP folder as SQL or send via email.

How do I do export from Enterprise manager????

Thanks in Advance!!!
Question by:selms
  • 4
  • 3
LVL 23

Expert Comment

by:Saqib Khan
ID: 16599786
in Query Analyzer do this..

Backup database Database_Name to disk = 'c:\Filename.BAK' WITH INIT

(change Database name)

it will make Database File in your C Drive with the name Filename.BAK.

now you can Email or FTP this File to whoever you want.

Author Comment

ID: 16599936
okay... typed this into the Query Analyzer:

Backup database TravelApprover to disk = 'c:\TravelApprover.BAK' WITH INIT

But then how do I acutally get it to EXECUTE...

tried save, save as,  didn't work...

LVL 23

Expert Comment

by:Saqib Khan
ID: 16599960
hit "F5" or the Play button from Top.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 16600162
I tried both f5 and the play button,  in both instances, this message shows up on the Results section of the Query Analyzer,

Processed 384 pages for database 'TravelApprover', file 'Travel_Security_Data' on file 1.
Processed 1 pages for database 'TravelApprover', file 'Travel_Security_Log' on file 1.
BACKUP DATABASE successfully processed 385 pages in 0.102 seconds (30.850 MB/sec).

but then I go to my cDrive and there is nothing there - I even did a search on the entire drive for TravelAprover.BAK just in case it ended up somewhere else.

Am I missing something???

LVL 23

Expert Comment

by:Saqib Khan
ID: 16600340
Remember it will store the File on the "C" Drive of SQL server Machine, not your Local Computer, as i assume SQL Server is Intalled on a different computer.

Author Comment

ID: 16600517
You're probably right, it's installed on another virtual server somewhere,  but I don't have access to that.

Is there a way to save directly to "my desktop" and not the "SQL's C Drive" since I don't have access?

I can open a new question/topic if necessary... Thanks!!!
LVL 23

Accepted Solution

Saqib Khan earned 2000 total points
ID: 16600546
if you are in Domain Coltroller envirnoment, and SQL Server can talk to your Pc without any login info then you can share a Folder on your PC and point to it.

Backup database TravelApprover to disk = '\\Pc_Name\shared_Folder_Name\FileName.Bak' WITH INIT

otherwise tell whoever manages the Server to give you the File.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question