This repository provides the example database backup files necessary for setting up the database to work with the SnapObjects-Example, and .NET-DataStore-Example.
The origin of all the database backup files is AdventureWorks2012 from Microsoft. Because AdventureWorks2012 is only for SQL Server, we have ported it to Oracle, SQL Anywhere or PostgreSQL and created the database backup files for these databases as well, so you can run the examples with either SQL Server, Oracle, SQL Anywhere or PostgreSQL.
- AdventureWorks_for_sqlserver: SQL server 2012 or later
- AdventureWorks_for_oracle: Oracle 12c or later
- AdventureWorks_for_sqlanywhere: SQL Anywhere 17.0.9.4803 or later
- AdventureWorks_for_postgresql: PostgreSQL 10 or later
- Open SQL Server Management Studio and connect to the target SQL Server instance.
- Right-click on the Databases node, and select Restore Database.
- On the General page, use the Source section to specify the source and location of the backup database (AdventureWorks_for_sqlserver.bak) to restore.
- In the Destination section, the Database box is automatically populated with the name of the database to be restored. To change the name of the database, enter the new name in the Database box, for example, AdventureWorks.
- Click OK. This will initiate the database restore. After it completes, you will have the AdventureWorks database installed on your SQL Server instance.
-
Create an AdventureWorks database instance on the Oracle database server;
-
Copy the AdventureWorks_for_oracle.DMP file to the dpdump folder of the AdventureWorks database instance;
-
Execute the following command line to restore the database (the username/password in the command line shall be replaced with the actual database username/password):
impdp username/password@AdventureWorks schemas=HumanResources,Person,Production,Purchasing,Sales dumpfile=AdventureWorks_for_oracle.DMP
Note: It is possible that some data in the Description column of the PRODUCTION.PRODUCTDESCRIPTION table cannot be successfully imported during the Restore process. This issue can be ignored because it won't affect the database access.
- Find the dbsrv17.exe file in the Bin64 folder of the SQL Anywhere 17 installation directory;
- Run dbsrv17.exe and load AdventureWorks_for_sqlanywhere.db.
- Start pgAdmin;
- Create a new database AdventureWorks within the server you are using;
- Right click the database and choose Restore;
- Use the Browser button to select the database backup file AdventureWorks_for_postgresql.bak;
- Select Restore to start restoring the database.