0% found this document useful (0 votes)
46 views1 page

Restore AdventureWorks2022 Database

This SQL script restores a database backup file to a new location, moving the data and log files and replacing any existing database.

Uploaded by

wikaka6903
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Restore AdventureWorks2022 Database

This SQL script restores a database backup file to a new location, moving the data and log files and replacing any existing database.

Uploaded by

wikaka6903
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

USE master;

RESTORE DATABASE AdventureWorks2022


FROM DISK = '/var/opt/mssql/data/AdventureWorks2022.bak'
WITH MOVE 'AdventureWorks2022' TO '/var/opt/mssql/data/AdventureWorks2022.mdf',
MOVE 'AdventureWorks2022_log' TO '/desired/path/AdventureWorks2022.ldf',
REPLACE;

You might also like