Cannot open backup device 'E:\web\rozalint\App_Data\21022013_042544.Bak'. Operating system error 3(The system cannot find the path specified.). Just want to know It is becuase sql proccess has not permission to access this folder or do I some thing wrong? any way to proggramatically Backup database from asp.net code ?
Programmatically Backup and DOWNLOAD Currently there's an ability to use the manual backup and download method: 1. Site Manager -> MS SQL Manager -> Manage -> Backup Database 2. It then backs up DB to : /App_Data/dbname_backup.bak 3. FTP Download from /App_Data. There's another way that is incomplete: 1. Via T-SQL: BACKUP DATABASE [<dbname>] TO DISK = N'd:\dbbackup\userdb\<user_dir>\<dbname>.bak' WITH NOFORMAT, NOINIT, NAME = N'<backup_name>', <options> 2. I would LOVE to have a way to programmatically FTP-download it! This feature would allow developers to create meaningful periodic database download client-side software.
currently you cannot use code to create and download a MS SQL backup file because your SQL database is on a physically separate server. TSQL scripts used to generate the backup will run, but the resulting backup will not be accessible because the SQL server does not have a FTP service, and you do not have access to it's file structure. I suggest that you make a post in our Suggestions/Ideas sub forum, when the marketing team see sufficient demand for this feature they will try to implement it.