February 14, 2002 at 11:02 am
Hi,
I am a Visual Basic programmer and I have following problem. I use Windows NT and MS SQL Server 7. I need to Backup a Database (called TRWasser) at a path saved in Win Registry (that's no prob > VB). For example "C:\MSSQL7\Backups\TRWasser\TRWBKP.bak". I even don't know the ending of SQL Backup files, I think it's *.bak. I need to do this per T-SQL code. Well i don't really know how to backup and restore that f****** database. Can anyone help me? I need to do this as soon as possible. Oh i forgot, when restoring the database, it should get another name (for example 'TRW001' or 'TRW002' and so on). Online Help is dumb. Internet dumber (is that word right??? :-)). Books couldn't help me much. Please email me at rann@gmx.at.
Thanks anyway
Rannh from Austria
February 14, 2002 at 11:05 am
Oh I forgot again!
I only need to backup that database once and then restore it again and again.
HEEEELP
February 15, 2002 at 2:01 am
Wow, thanks to all, thats just too much......
February 26, 2002 at 2:23 pm
Try this:
USE MASTER
BACKUP DATABASE Northwind
TO DISK = 'd:\backup\Northwind.bak'
RESTORE DATABASE TestDB
FROM DISK = 'd:\backup\Northwind.bak'
WITH MOVE 'Northwind' TO 'd:\test\testdb.mdf',
MOVE 'Northwind_log' TO 'd:\test\testdb.ldf'
-- repeat for each database you want to restore
RESTORE DATABASE TestDB2
FROM DISK = 'd:\backup\Northwind.bak'
WITH MOVE 'Northwind' TO 'd:\test\testdb2.mdf',
MOVE 'Northwind_log' TO 'd:\test\testdb2.ldf'
Michael J. Carter
Volcanic Technologies
February 27, 2002 at 1:16 am
thank you
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply