Before my migration from MSDE (SQL Server 2000) to SQL Server 2008 R2 Express, I used the following sentence to take a backup of my database :
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn>sqlmaint.exe
-S \"(local)\\SQLEXPRESS"\
-D \"DB Name"\
-BkUpDB \@"C:\Documents and Settings\emmug\Application Data\CalibrationSystem\Backup"\
-BkUpMedia DISK
But now, I get this error :
Microsoft (R) SQLMaint Utility (Unicode), Version 10.0.1600.22
Copyright (c) Microsoft Corporation.
The SQLDMO 'Application' object failed to initialize (specific error: One of the library files needed to run this application cannot be found.)
So I saw that SQLDMO was not supported in SQL Server 2008 R2 but I could use Microsoft SQL Server 2005 Backward Compatibility Components. Unfortunately, that doesn't work.
Microsoft now uses SQL Server Management Objects (SMO) but there don't give any code sample to help me.
So is there somebody know a solution for my issue ?
Thanks
Emmanuel