SQL Backup to Isolated storage from ADO.NET
Is it possible to create an SQL server database backup using c# ADO.net and outputting the .BAK file to Isolated storage?
开发者_开发知识库Thanks
What kind of isolated storage are you referencing?
How about:
create a stored proc to perform the backup.
BACKUP DATABASE [Foo] TO DISK = N'\\server\directory\Foo.BAK' WITH NOFORMAT, NOINIT,
NAME = N'Foo-FullBackup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GOcall this stored proc on the SQL Server from your C# client code
depending on your needs (isolated storage?) use
System.IO.File.Move()
to move the .BAK file from its source to your destination.
No. Because there is no way to get access to the isolated storage PATH by program, you can not tell SQL Server to put things there.
Also, for anything but the most trivial applications, the size limit on isolated storage would be a joke compared what you need for a db backup.
精彩评论