I've got some SSIS packages stored as varbinary, and I can load them into a temp table like so:
Use SSISDB
if object_id('tempdb..#package') is not null begin drop table #package end
create table #package ( package varbinary(max))
insert into #package (package) EXEC SSISDB.catalog.get_project 'my_folder','my_project'
select * from #package
this returns a very long varbinary string which starts with 0x
Problem: when I try and convert the varbinary to nvarchar, it is still the same 0x...
varbinary. I think it is encrypted.
Question: How can I decrypt these varbinary strings and convert them to a searchable format?
I think I need a key, but I'm not sure where those are stored.
Best Answer
Update:
So the package is not encrypted. As Billinkc said, it is zipped as a .ispac file.
These .ispac files first have to be exported from the database, then extracted into their components, which can be one or more .dtsx packages.
Microsoft provide a powershell script that will export every .ispac from your database:
https://gallery.technet.microsoft.com/scriptcenter/ImportExport-projects-bca5f29f
Fill out the connection string, and all your packages will get saved to
C:\SSIS
From here, the packages need to be extracted, which I did using python: