Showing results for 
Search instead for 
Did you mean: 
Resolver II
Resolver II

Connect to MS SQL Server 2014 without gateway

Trying to figure out how to connect to my MS SQL 2014 server using JSON since I cannot use FOR JSON.


Using a static JSON file is simple enough, but I need be to able to update that JSON data as the SQL Server is updated.




Not solved and do not believe it can be solved.

View solution in original post

Community Support
Community Support

Hi @tkrupka ,

Is this problem solved?

If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If not, please let me know.

Best Regards

Not solved and do not believe it can be solved.

View solution in original post

Community Support
Community Support

Hi @tkrupka ,

Unless data source is cloud data sources like Azure SQL Database, others all need a Gateway for refresh.

And you might need a data gateway if your data sources are behind a firewall, require a VPN, or are on virtual networks.


Best Regards,



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Resolver II
Resolver II

So I know I can get table data using PowerShell using the following basic code:



#--Establish connection to SQL Server--#
$connectionString = "Server=$Instance; Database=DEQ_DB; Integrated Security=True;"

#--Main Query--#
$query = "select * from RunData"

$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString

$command = $connection.CreateCommand()

$command.CommandText = $query

$result = $command.ExecuteReader()

$table = New-Object "System.Data.DataTable"


$table | select $table.Columns.ColumnName | ConvertTo-Json


This will give me the JSON output for a table.  But I would have to manually do the updating myself.


I want to be able to click on the refresh tab in power bi and gather the data without having to use a gateway.

Helpful resources

PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors