How to add linkedserver in MSSql with MySQL - sql-server

I have situation where my SQL Server installed in one of the server and MySql is installed in my local machine. i need to add MySql as linked server to MSSql. Because i need to query the MySql database from open query property of MSSQL. I need to know how to connect with IP since these two are completely unknown in the sense of machine.

please have a look in to the image
step 1
step 2
choose the mysql in the product name (other data source)

Related

Present databases on 2 SQL Servers like they are all on 1

I have 2 SQL Servers, with several different databases on each. I want to present them as a single SQL Server showing all of the databases on either Sql Server.
We have yearly archive databases, so 1 database for each year. This year we decided to deploy a new SQL Server that will host newer years, so older yearly databases are on the old server, and future will be on new one.
I know I can link the servers, but I am not sure if I can do it in the transparent way so that no application has to change the query - so far I always had to use linked server explicitly in each query that uses it.
TLDR: I want to access databases on another SQL Server via main SQL Server so that app doesn't know or care about SQL Server details and don't need to have if (Year > 2021) {then use this server } else {use that server} type of logic and can behave like all databases live on the same server.
You can follow the below steps:
Create a linked server pointing to older server
Create an Empty Database in the new server, corresponding to older database in the older server.
Create synonym for each object in the older database in the Empty database
Now, When you refer to synonyms in the empty database, it will appear as if the older database resides in the new server.

Can I change the host name of a system running SQL Server?

Does the change of the host name of the server impact the functioning of Microsoft SQL Server?
Yes, there are some additional steps that you need to perform after changing the host name.
I could not find the relevant documentation for SQL Server 2012 online any more, but here is the official document for SQL Server 2016-2019:
Rename a Computer that Hosts a Stand-Alone Instance of SQL Server
In a nutshell, you need to execute
sp_dropserver <old_name\instancename>;
GO
sp_addserver <new_name\instancename>, local;
GO
to update system metadata and then restart SQL Server.
Additional steps (see the linked document above) might be necessary if you use:
a failover cluster,
replication,
Reporting Services,
database mirroring,
Windows groups containing a hard-coded reference to the computer name,
remote logins,
linked server configurations or
named pipes.
Obviously, the connection strings of any clients connecting to your server will need to be updated as well.

Configure remote connections without sql server installation?

We have an application called IpSwitch Whatsup and it's installed in a machine that I can connect to remotely as administrator. This is all in our intranet.
We need to connect to the sql server database being used by IpSwitch Whatsup, but this particular machine doesn't have sql server installed. On the other hand, in sql server configuration manager there is indeed a sql server installation for whatsup (the entry says SQL Server (WHATSUP)).
So, two questions:
How does one go about in connecting to this database? I'm pretty sure I know the name of the database and I already know the server name and instance, so I would like to connect to this DB from a sql server installation in another machine.
How does one configure a sql server installation to receive remote connections if it doesn't have sql server installed?
Thanks.
For the first question, you just type in (or browse) the appropriate instance name and authentication options using SSMS - which is the GUI tool used to manage sql server instances. Note - the term "sql server installation" can mean different things so it is not a useful reference.
As for the second question, review the information here. Note that any task you do in SSMS can be done via tsql - you can see the appropriate commands using the script button in the SSMS dialog windows.
And you can also (and probably should based on these questions) install SSMS on the same machine as your server instance so you can do "anything" "anywhere". Now would probably be a good time to review your disaster recovery options (and start backing up your databases regularly).

How to view a list of databases under server in SQL Anywhere like we do in MSSQL

I am very new to SQL Anywhere. I have been working MSSQL for a long time.
So in MSSQL, if we need to see the list of database under server, we can see that under Server Explorer.
How can I do same in SQL Anywhere?
I have just installed SQL Anywhere 16 and have no idea how to find Server name etc.
There should be a program called "SQL Central" (scjview.exe) that was installed with SQLAnywhere server. Run that and you should be able to see the servers.

Need to remotely create an ODBC connection to a SQl server

I have an Access 2007 database with a table in it that is linked to a SQL server. I need to roll this version of the database out to approximately 10 people in different states. In order to do that, they need an ODBC connection to the SQL server installed on their machines. I am looking for a way to do this remotely. Either through VBA in the database itself or perhaps a Batch file linked to their shortcut....I am open to ideas....
If you're naming the SQL Server instance and database exactly the same way on each machine, you should be able to create a DSN on your testbed machine, use it to link tables, then convert it to a DSN-less connection and distribute that.
system ODBC is configured via the registry -- see HKLM\SOFTWARE\ODBC\ODBC.INI. You will need a key to match the DSN name and an entry in ODBC Data Sources for the key.

Resources