Pagudu
Pagudu

Reputation: 11

Is it possible convert file .sql (I use MSSQL SERVER 2008 R2) to .bacpac with C# code?

I'm making an app (asp.net but not MVC) for deploy a project to windows azure, it works fine, but now I need export the local database to windows azure without use windows azure portal and for that I have to convert this file (.sql) to .bacpac, but I don't know how can I do that.

Upvotes: 0

Views: 448

Answers (3)

Mike Asdf
Mike Asdf

Reputation: 2319

If you have an SQL Database project in Visual Studio, you can compile it as a dacpac file. (A dacpac can be used for both new deployments and for upgrade deployments.)

(An SQL Database project lets you define all schema definitions as SQL files.)

Upvotes: 0

OuSs
OuSs

Reputation: 444

Find your happiness in this article named : How to Use Data-Tier Application Import and Export with Windows Azure SQL Database

http://social.technet.microsoft.com/wiki/contents/articles/2639.how-to-use-data-tier-application-import-and-export-with-windows-azure-sql-database-en-us.aspx

Upvotes: 0

Mgetz
Mgetz

Reputation: 5128

Maybe... but you can just export your database as a Data Tier Application which should create a .bacpac file, or you can use the SQL Azure Migration Wizard to help you move your application.

Upvotes: 1

Related Questions