If you want to change the physical location of the data file and log file, click on Files pane and change the target location for the data and log files. Note that it is best practice to keep data files and log files on separate drives:. Click OK. It will initiate the database restoring process. Once the database restores successfully, a popup appears stating that the database has been restored successfully.
We can also prepare the database by executing the database installation script on SQL Server. To do that, first, you must download the installation scripts of AdventureWorks and AdventureWorksDW databases. Once files are downloaded, extract those files using WinRar or any other data compression tool. After extracting the files, execute the following steps:.
Similarly, to install AdventureWorksDW , you must download the installation scripts. Every new version of SQL Server has a corresponding version of sample database.
This is because the newer versions of SQL Server has new features. These new features are incorporated in the sample database and released as a new version few days after the SQL Server release. It will have the data and the objects needed for experimenting SQL Server For example, the default location for a default instance of SQL Server is:.
Select Device and then select the ellipses Select Add and then choose the. If you moved your file to this location but you're not able to see it in the wizard, this typically indicates a permissions issue - SQL Server or the user signed into SQL Server does not have permission to this file in this folder. Select OK to confirm your database backup selection and close the Select backup devices window.
Check the Files tab to confirm the Restore as location and file names match your intended location and file names in the Restore Database wizard. An example to restore AdventureWorks is provided below, but the database name and installation file path may vary depending on your environment.
This auto-populates the rest of the fields such as Database , Target database and Restore to. When you create a new database in Azure SQL Database, you have the option to create a blank database, restore from a backup or select sample data to populate your new database. On the Additional settings tab, choose Sample as the existing data under Data source :. This method does not currently provide data validation so is intended for development and testing and should not be used for production.
If you haven't already done so, restore the sample database to SQL Server.
0コメント