Skip to content
Advertisement

Tag: database-administration

Replace Database WIth Copy Of Other Database

As part of our testing process, I’m trying to automate the following: Drop DatabaseB. Create a backup of DatabaseA Recreate DatabaseB from the backup of DatabaseA I had hoped something like this would work RESTORE DATABASE DatabaseB FROM DISK = ‘c:tempDatabaseA.bak’ WITH REPLACE, but that turns out to want to overwrite the existing ldf and mdf files for DatabaseA. It