Hi
I have a SQL Werver based website. My hosts don't allow me to have access to the database via Enterprise Manager, so I'm having to administer the site using ASP and SQL, which is not proving to be too difficult.
However I really need to have a local copy of the database, for testing and development purposes, but my hosts are not willing to backup the database to a file and allow me to download it, and recreate the database locally. They said I should also do this with script.
Now I've found some script in Books Online which goes as follows:
-- Create a logical backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
DISK ='c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1
Obviously I've replaced the database names and paths. But it doesn't work. I've placed the above code in the CommandText property of an ADODB.Command Object,and executed. No errors are returned, but it's definitey not creating a backup file in the desired location.
Any ideas? I want the complete database - structure and data - so I can recreate it on my local copy of SQL Server.
Help!
I have a SQL Werver based website. My hosts don't allow me to have access to the database via Enterprise Manager, so I'm having to administer the site using ASP and SQL, which is not proving to be too difficult.
However I really need to have a local copy of the database, for testing and development purposes, but my hosts are not willing to backup the database to a file and allow me to download it, and recreate the database locally. They said I should also do this with script.
Now I've found some script in Books Online which goes as follows:
-- Create a logical backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
DISK ='c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1
Obviously I've replaced the database names and paths. But it doesn't work. I've placed the above code in the CommandText property of an ADODB.Command Object,and executed. No errors are returned, but it's definitey not creating a backup file in the desired location.
Any ideas? I want the complete database - structure and data - so I can recreate it on my local copy of SQL Server.
Help!