TechKnow

Author Topic: Exporting encrypted stored procedures of SQL2005 to SQL2012  (Read 1266 times)

0 Members and 1 Guest are viewing this topic.

Offline HcH

  • TechKnow Owner, Ethical Hacker
  • Administrator
  • Uber Member
  • *****
  • Posts: 9946
  • Karma: +2285/-111
Exporting encrypted stored procedures of SQL2005 to SQL2012
« on: September 02, 2015, 11:12:46 AM »
Hello TechKnow members and visitors!

I've been challanged to move a application from one server to another.

So this application just uses a SQL database and a few program files, nothing out of the ordinary.

However, once all the files and database have been moved, the application complained the stored procedures were missing.

I went back to the original server to discover that these are stored with encryption, this has been done highly likely by the software supplier to protect their product. All fine, but this company is hard to reach and I was unable to get support, time for another look at the situation...

As you know, there are plenty ways to export/import databases in SQL, I followed these steps in order to move the encrypted stored procedures:

1. Perform a SQL to SQL migration (this step might be unneeded, but could be since all required permissions and file locations are set)
2. Take the database instance offline
3. Get the original databases (MDF and LDF), copy them to the new server
4. Rename the database, DBNAME.MDF to DBNAME_Data.MDF, the LDF was fine
5. Start the database instance

That's really all! I've tried tricks using import/export and manual dumping, all failed, but this did the trick and the application works fine now.

HcH

Offline cyberwind

  • Site Donor
  • Newbie
  • *
  • Posts: 25
  • Karma: +12/-0
  • Uber-Noobie
  • Tablet / Size / Model: homemade/7/galaxy5
Re: Exporting encrypted stored procedures of SQL2005 to SQL2012
« Reply #1 on: November 04, 2015, 11:59:42 AM »
Did you have to upgrade any of the SQL statements?

Offline HcH

  • TechKnow Owner, Ethical Hacker
  • Administrator
  • Uber Member
  • *****
  • Posts: 9946
  • Karma: +2285/-111
Re: Exporting encrypted stored procedures of SQL2005 to SQL2012
« Reply #2 on: November 04, 2015, 03:27:52 PM »
Did you have to upgrade any of the SQL statements?
No, it all just ran fine :) That indicates the encryption is not upgraded or backwards compatible.