Forum Discussion
khanjaved
6 months agoMicrosoft Employee
T‑SQL Magic Command (%%tsql) Error in Microsoft Fabric Notebook on Fabric SQL Database
Hello, My T-SQL command executed from a Microsoft Fabric Python notebook against a Fabric SQL Database was working fine last week, but it has suddenly stopped working. There is no change from our ...
AsgerLB
6 months agoResolver I
HI khanjaved thanks for getting back!
Have you tried adding the -session parameter along with your others? It seems like MS documentation specifies if you are using the tsql magic you must first establish a session connection:
https://learn.microsoft.com/en-us/fabric/data-engineering/tsql-magic-command-notebook#using-t-sql-magic-command-as-line-magic
Br
Asger
khanjaved
6 months agoMicrosoft Employee
AsgerLBYes I tried, And I think with the session you can run the %tsql magic cmd in the next cell, alone with %%tsql look like its not going to be helpful.