So I've been working on this for a few hours now and have made no progress. I know this may be an easy/stupid question, so I apologize in advance for my extreme lack of knowledge here.
I have a MYSQL 5.7 database in which I am trying to push to a MS SQL 2008 database. The MYSQL database is local on my Ubuntu 16.04 machine. I have configured FreeTDS to try and do this.
The issue is the person only gave me these parameters which I believe are incomplete.
Server Address: database\SQLEXPRESS
User Name: DatabaseUser
Password: datapassword
Databasename: DBName
Don't I need an IP address/web address and a port to connect? It seems that the "string\SQLEXPRESS" format is not an actual server address (or may be for people who are on the servers network).
Additionally, since the MS SQL Sever is run on a windows machine, will I need my IP address to be white-listed, or does this depend on how the server was set up?
SQL Server addresses are specified via an IP address or hostname, followed by an (optional) instance name. The point of instance names are to differentiate between different instances of SQL Server on the same machine. Regular, non-Express versions of SQL Server don't have an instance name by default, so you should be able to just specify the server's IP or hostname in the address field:
Server Address: 192.168.0.1
SQL Server Express's instance does have a name by default, SQLEXPRESS. If you know you're connecting to a SQL Server Express instance, then most likely you're looking for
Server Address: 192.168.0.1\SQLEXPRESS
As far as connecting to the server, yes, the server needs to be reachable via TCP/IP from the client, so that presumably depends on your network setup.
You also need to enable remote access to the server. This setting is exposed in Management Studio -> Connect to server -> Right click on server, Properties... -> Connections node -> Remote server connections -> Check "Allow remote connections to this server". You might have to do this from a SQLMS instance on the server.
You also need to make sure that your preferred connection protocol (Shared Memory, Named Pipes, TCP/IP) is enabled. You can do this via Sql Server Configuration Manager, which should be installed on the server. Open it, then SQL Server Network Configuration Node -> Protocols for -> Enable or disable the protocols as desired.
Related
I have SQL Server Express installed on an Azure Windows Virtual Machine.
Steps I have taken:
updated the default port for SQL server in SQL Server Configuration Manager.
verified sql server is listening on that port (netstat -ano)
Added a Windows firewall rule to accept inbound traffic on that port (Scope of the rule limits to my static IP address)
added an inbound rule in Azure to allow access to that default port (Source IP address same as IP in Windows Firewall)
Verified Remote Connections are enabled in SSMS
Mixed authentication is enabled.
Verified user created is able to access the desired databases by logging in locally with Sql Server Management Studio. This is a sql server user and not a computer account
I am able to telnet and nc to the port.
The name of the SQL Server looks like this when i access it locally on the VM
localhost\SERVER_NAME or
hostname\SERVER_NAME
From a remote machine I am attempting to access this database using SSMS.
I have tried:
mydomain.com\SERVER_NAME -mydomain.com does resolve to the correct IP address
mydomain:1234\SERVER_NAME -1234 represents the default port that was set
I have verified the user name and password are correct. I have also tried turning off the Windows firewall which leads me to believe it might be the inbound rule in Azure but there's really nothing special to that rule, just allows traffic to the sql server port (1234, in this example).
What am i missing?
Can you please have a look to this article, if you did not yet, and ensure that you did all the steps required? To highlight a few important steps, please ensure:
Set the connectivity to publish
Use SQL Server Configuration Manager to manually enable the TCP/IP protocol
Use the SSMS to connect to your DB and use the following server address for your VM
Hope that it helps.
The correct connection string in SSMS is
mydomain,1234\SERVER_NAME
comma before port not colon.
I'll preface my question with: I am an absolute beginner with respects to the nature of MS SQL Server and have a layman's understanding of networking and 'computers' in general...
So, I'm trying to replicate an environment where:
There is an 'application server' which hosts HPE's ALM
This communicates with a database server with a Microsoft SQL Server DB
I currently have Microsoft SQL 2012 Server with a sample DB uploaded onto it on one laptop (Laptop 1) and the ALM software on the other laptop (Laptop 2). Both are connected to the same WiFi network.
Laptop 2 is asking me for Database parameters such as:
DB Host Name
DB Port Number (1433 by default)
OR Connection String
I have little idea of what I'm doing - I'd have thought it might be possible to connect to the DB through some sort of variant of the IP address of Laptop 1... but I'm unsure.
How can I connect to a MS SQL 2012 DB from one laptop to another? I realise this is probably a loaded question - I'd be happy if someone can point me in the right direction rather than an exact answer!
Thanks guys,
ST
I see two potential issues:
A corporate laptop might have firewall restrictions. So, you have to
open port 1433 for SQL Server.
Possibly you are playing with SQL Express, which by default, does not
have TCP/IP connection enabled. To enable it run "SQL Server
configuration manager", go to Network
configuration->Protocols->TCP/IP->Enable->restart SQL Server. Also check other properties. If static port 1433 is not set - set it.
Two types of adjustments must be set before connecting to the remote SQL Server. These settings are necessary because without them the connection to the remote SQL Server will not be able to be successfully created
Configuration settings:
-The SQL Server instance to allow the protocol being requested
-Allow access through the Window Firewall
1- Enabling TCP/IP protocol
2- Configuring Windows Firewall
For More details see the link :
https://www.sqlshack.com/how-to-connect-to-a-remote-sql-server/
I have got a remote server from client, and having sql server there connecting through local host.
Now I need to connect it through my local pc management studio.
What I need to do, Do I need any step up, or is there any place where I can find connection string to connect through remote.
Please advise.
To connect from your PC to a remote SQL instance, you will need the remote server's external IP plus the usual instance name and credentials
You will need to ensure that Firewalls etc are configured correctly on the remote server as per the link posted by scsimon
The target database is located on a LAN with a local IP. The local IPs are distributed by my modem's DHCP server and is something like 192.168.1.xxx. I've already redirected port 1433 to the machine which holds the sql server (192.168.1.xxx) and I can reach to it with a SQL Management Studio connection, using my WAN IP from the source machine. However, when I write my WAN IP as the Copy Database task's target, it returns an error which indicates that connection cannot be established.
Might I be missing the writing convention for the target? I tried the following (my WAN IP is 78.187.xxx.xxx and my target MSSQL Server's name is EXP32):
78.187.xxx.xxx
78.187.xxx.xxx\EXP32
\\78.187.xxx.xxx
\\78.187.xxx.xxx\EXP32
GO TO
-> SQL server configuration manager
-> On network configuration -> protocol for mssqlserver -> enable except VIA
-> go to component services and on services restart sqlserver and express if you have
PI'm trying to do replicate two data bases.
DB in LAN network (Publisher)
DB in virtual dedicated network (Subscriber)
According to my situation, replicate publisher implemented in my server in LAN network.But subscriber is implementing on a virtual dedicated server. i configured router port to my server machine in LAN network.using sql management studio on virtual server, i connected to the db in LAN network.But when i try to create subscriber using virtual server db i can't access to the publisher.(IN LAN network.) it gives errors as below.
"SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'BESTLIFE\BESTLIFECROWN'. (Replication.Utilities)"
Please help me to solve this .
You didn't say whether you used the GUI or scripts, but somewhere, a call got made to one of the stored procedures (likely sp_addsubscription) with a server name that doesn't match the actual server name. For instance, the error message above says that the server is called BESTLIFE\BESTLIFECROWN. If that's not the name of the server that you put in as hosting the subscriber, it's not going to work. Whether you need to add a DNS alias or whatever, that's the only value that will work for this setup.