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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.