Azure Data Studio – Extension – “sqlops-spexecutesql-to-sql”


Reviewing a few SQL Statements and noticed some of them came across as prepared statements.

Wanted to see if I will be able to understand them by converting them to plain generic SQL.


Sample SQL

Here is a sample SQL

       N'select *
        from WideWorldImporters.Application.Countries
        where CountryName =  @_msparam_0'

     , N'@_msparam_0 varchar(4000)'

     , @_msparam_0=N'Brazil'

Traditional SQL

Here is a hand crafted comversion

declare @_msparam_0 varchar(4000)

set @_msparam_0=N'Brazil'

select * 

from WideWorldImporters.Application.Countries 

where CountryName =  @_msparam_0

Azure Data Studio


I know there is an extension for that….



  1. Launch Azure Data Studio
  2. Access Extensions panel
  3. Review list of extensions
    • Settled on sp_executesqltosql => Convert sp_executetosql => Pejman Nikram
  4. Click on Install
  5. GitHub
  6. Add Extension Azure Data Studio
    • Returned back to Azure Data Studio
    • Accessed menu option ( File \ Install Extension from VSIX Package )
    • In the Open File Dialog pointed towards the folder where I saved the file
  7. Refreshed Extensions
  8. Attempt Conversion
    • Launched new query window
    • Pasted SQL that contains sp_executesql
    • Access extension menu by invoking Help Key ( F1 )
    • Enter convert into window
    • Chose sp_executesql to sql: convert
  9. No magical conversion
  10. Current Version
    • Noticed that the version installed is 0.0.1
    • Revisited GitHub
    • Awared Downloaded v 1.0.0 is available
  11. Downloaded latest version
  12. Installed via previous path
  13. Review Extensions Version
  14. **** Nothing ****


List of Extensions


Access Extensions

Enabled Extensions


Bugs Filled

  1. GitHub
    • Azure Data Studio
      • Extension “sp_executesql to SQL” is not working


I don’t think I am home yet.

BTW, v1.0 was released on June 30th, 2019.


  1. Pejman Nik
    • GitHub
    • GitHub – PejmanNik/sqlops-spexecutesql-to-sql

One thought on “Azure Data Studio – Extension – “sqlops-spexecutesql-to-sql”

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s