Вопрос

I'm using a C# application to Backup and Restore DBs on a remote server using the microsoft.sqlserver.smo.dll.

Testing with my local machine, I can browse backup files to select the backup to use. Can this be done through code for the remote SQL Server using the SQL credentials similar to the way MSSMS does it?

My backups are saved with a certain naming convention (ie. "Ebuy_full_2013_8_7_H13_M40.bak") and I would like to be able to show these in the application so a decision about which backup file to restore can be made.

Thanks,

Rick

Это было полезно?

Решение

SOLVED: Based on a comment for another question I ran SQL Profiler to determine what functions MSSMS was using, found it was using master.dbo.xp_dirtree, was able to duplicate this in my app.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top