Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Tored
Frequent Visitor

Are only SQL Server Analysis Service databases possible when adding a data source?

When I connect my database (SQL Server) as a data source, Power BI tells me that it is a SQL Server Analysis Service database, even though I don't want to connect an Analysis database at all, but just a normal SQL Server database.

 

My Code:

 

 

string dataSource = "LocalSQLServer";
dbWithDataSource.Model.DataSources.Add(new ProviderDataSource() 
{ 
   Name = dataSource, 
   Description = "A data source definition that uses explicit Windows credentials for authentication against SQL Server.", 
   ConnectionString = "Provider=SQLNCLI11;Data Source=MyDatabaseServer;Initial Catalog=MyDatabase;Integrated Security=SSPI;Persist Security Info=false;",
   ImpersonationMode = Microsoft.AnalysisServices.Tabular.ImpersonationMode.ImpersonateAccount, 
   Account = @"AccountName", 
   Password = "password", 
}

 

 

image.png

2 REPLIES 2
luisrh
Responsive Resident
Responsive Resident

TOM is for Tabular Object Models,  not sql server.   

Tored
Frequent Visitor

You're right. I have adjusted the initial post.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.