SDU Tools: Migrate SQL Server Object Names to PostgreSQL Names

A while back I wanted to do some testing of Azure Database for PostgreSQL and I needed a database to work with. So I thought I'd try to migrate a basic WideWorldImporters database across to PostgreSQL.

I wrote scripts to do the main migration but then decided that I wanted to change the names of the columns.  While a large number of people use PascalCased names in SQL Server, it's really, really common to use snake_cased names in PostgreSQL. Object names in PostgreSQL are also limited to 63 characters. I needed to alter these names while generating the scripts and I didn't want to do that manually.

To make it easy, in our free SDU Tools for developers and DBAs, we added a function PGObjectName to help.

You can see it in action in the image above, and in the video here:

To become an SDU Insider and to get our free tools and eBooks, please just visit here:

http://sdutools.sqldownunder.com

 

Leave a Reply

Your email address will not be published.