M
MikeTI
Jan 26, 2010
Hi all
I am using VB Net 2008 and SQL 2008.
I am taking a backup of a local SQL Server Database using the following
code:
Dim backup As SQLDMO.Backup = New SQLDMO.BackupClass()
Dim sqlserver As SQLDMO.SQLServer = New SQLDMO.SQLServerClass()
sqlserver.LoginSecure = False
sqlserver.Connect("MIKETI-PC\sqlexpress", "sa", "sapassword")
backup.Action = SQLDMO.SQLDMO_BACKUP_TYPE.SQLDMOBackup_Database
backup.Database = "TestDataBase"
backup.Files = "C:\SQL_BACKUP\TestDataBase.bak"
backup.BackupSetName = "Test01"
backup.BackupSetDescription = "Database backup description"
backup.Initialize = True
backup.SQLBackup(sqlserver)
How can I take a backup of a remote SQL Server Database on my local PC ??
Regards
Mike TI
Hi all
I am using VB Net 2008 and SQL 2008.
I am taking a backup of a local SQL Server Database using the following
code:
Dim backup As SQLDMO.Backup = New SQLDMO.BackupClass()
Dim sqlserver As SQLDMO.SQLServer = New SQLDMO.SQLServerClass()
sqlserver.LoginSecure = False
sqlserver.Connect("MIKETI-PC\sqlexpress", "sa", "sapassword")
backup.Action = SQLDMO.SQLDMO_BACKUP_TYPE.SQLDMOBackup_Database
backup.Database = "TestDataBase"
backup.Files = "C:\SQL_BACKUP\TestDataBase.bak"
backup.BackupSetName = "Test01"
backup.BackupSetDescription = "Database backup description"
backup.Initialize = True
backup.SQLBackup(sqlserver)
How can I take a backup of a remote SQL Server Database on my local PC ??
Regards
Mike TI