SQL Server – Reading BACPAC Files

If you have been reading my blog for a while now you would know that a common technique to move to Azure SQL DB is to use BACPAC files. Just a reminder, see the below image.

mainpac

I had a bacpac file but I forgot about the contents, partly because of the bad naming convention, test.bacpac isnt great right? However for whatever reason you may  want to know what tables are within the bacpac, this being the main point of the post!

If you do a little “editing” with file extensions you will be able to see what the bacpac file contains. Let’s get to it. As you can see below I have a test.bacpac file.

Step 1 – Take a copy of the file and change the extension to .ZIP.

convert1

Step 2 – Extract the ZIP file to whatever location you desire.

newfolder

Step 3 – View the folder structure and navigate to the Data folder.

DataFolder

Step 4 – The table list is here.

tablelist

Very cool right? Just to prove it is the correct list this is my view of the tables via SSMS.

listSSMS

 

 

Leave a Reply