May 17, 2024 at 12:49 pm
Just came across something weird. Was wondering if anyone else has ever seen this.
All the years I've worked with SQL server linked server objects, I have always put "SQL Server" in product name. All the code examples on the internet include that or mention (in BOL) "Product name Type the product name of the OLE DB data source to add as a linked server."
So imagine my surprise when I investigated a linked server connection issue and found Product Name as the initials of the application name. Something like "OD" for example. To be clear, this AOR has several working linked servers with this same set up. So the issue I'm investigating can't possibly be caused by a wrong product name... I think.
Has anyone ever seen someone do this with a linked server?
Does this mean that product name is just a label? Or does it really affect the linked server depending on how the security is set up?
May 18, 2024 at 1:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
May 24, 2024 at 6:59 am
Hi,
I hope understand your question correct.
We got both, Linked Server via "SQL Server" and via "MSOLEDBSQL".
If we had to use the SQL-Server type, the name of the linked server target is the name of the linked server.
If we use the MSOLEDBSQL type, we are able to use any kind of name for the linked server.
The tag product name is not used with the MSOLEDBSQL type.
Kind regards,
Andreas
May 24, 2024 at 11:18 am
Is "Product Name" just a tag, then? Not actually required for the linked server to function?
May 24, 2024 at 1:22 pm
Product name is not required. - however if it is supplied through the UI as "SQL Server" the other fields (@provider, @datasrc, @location, @provstr, and @catalog ) don't need to be supplied and on this case the linked server will be created as the server name (+ instance where applicable)
it is not desirable to do it this way - the linked server name should be a generic name, not tied to the underlying servername/instance.
so doing it through code it allows you to both have it as a script on source control/git and to have full control over the name of the linked server.
example for a linked server to SQL Server
exec master.dbo.sp_addlinkedserver @server = N'BIPRD', @srvproduct = N'', @provider=N'MSOLEDBSQL' , @datasrc = N'myservername'
another one to oracle
exec master.dbo.sp_addlinkedserver @server = N'BIORAPRD', @srvproduct = N'', @provider=N'OraOLEDB.Oracle' , @datasrc = N'myservername:1521/CSID', @provstr = N'FetchSize=64000;'
and then a few other commands to setup server login and server options - all of which you can see if you script a existing linked server
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply