How to: Import Database Objects to Data-tier Applications
To create and manage databases using the latest version of Data Tier Applications (DACPAC), install the most recent release of SQL Server Data Tools from Get Started with Microsoft SQL Server Data Tools.
You can initialize the set of objects in a new data-tier application (DAC) project by importing the objects defined in an existing database. You could use this approach, for example, if you want to start the development of a new version of an application that uses an existing database. Use the Import Data-tier Application Wizard in Visual Studio 2010 to import the objects in the existing database to your DAC project.
If you are importing from an existing database, you can only import objects that are supported in DAC projects. The Import Data-tier Application Wizard stops the import if it encounters unsupported objects in the source database. For more information about a list of the supported objects, see Features Supported in Data-tier Applications.
You can import objects from databases on instances of the SQL Server Database Engine running SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, and SQL Azure.
You can also extract a DAC package from the database by using the Extract Data-tier Application Wizard in SQL Server Management Studio, and then import the package. For more information, see How to: Import Data-tier Application Packages.
You can also import database objects from a script if you have the script that created the existing database. For more information, see How to: Import Database Scripts to Data-tier Applications.
To use the Import Data-tier Application Wizard
On the Project menu, click Import DAC.
The Import Data-tier Application Wizard appears.
You can also right-click your DAC project in Solution Explorer or Schema View, and click Import DAC.
Click Next to advance to the Specify Import Options page after you read the introductory page of the wizard.
To import objects directly from a database, select the Import from an Instance of SQL Server option. In the Connection string box, specify a connection string for the instance of the Database Engine or SQL Azure that contains the database. You can also click Edit to open a SQL Server connection dialog box. The wizard builds a connection string using the connection properties that you specify.
In the Database Name box, select the name of the database that has the objects to be imported.
The Import server selection policy option does not apply to imports from a database; you must manually configure a server selection policy after running the wizard. For more information, see Configuring the Server Selection Policy.
Click Next to advance to the Summary page.
The Summary page reports the set of objects found in the database. All supported objects that can be imported to the DAC are marked with a green circle icon. If you are importing from a database, some objects may be reported as supported with warnings (yellow triangle icon), and some reported as unsupported (red circle icon). The import does not proceed if the database contains unsupported objects.
Click Next to proceed with the import and advance to the Import Objects page.
The Import Objects page reports the success of the import operation. A progress bar reports how much of the import operation remains to be done. The Status window displays status messages reporting the success or failure of the import operations.