I have this issue in SQL SERVER 15.0, in SQL have various ways to access to DB using IP, using Hostname, using (local) or just dot (.)
When access to SQL management studio or using a SQL in my code using and IP to access to server I receive a query result with 60.300 lines and when access using just dot for example I receive 149 more lines. But when I execute again query in IP connection I receive now same number of lines in dot.
I can't find solution for this, its some type of cache from SQL? Dot (.) is more fast than IP? or some configuration I have?
When connecting to SQL server instance, using any of these means "connect to local default instance of SQL Server", that is the instance on the machine where Management Studio (client) is running.
LOCALHOST
127.0.0.1
. (dot)
(Local)
If you do not want to connect to the local copy of SQL, you should provide the remote server DNS name or IP address.
To complicate things a bit more, SQL server has a concept of a named instance, so you can have multiple instances of SQL server running on the same host computer. These are referred to by specifying a named instance name after the server name.
For example: 192.168.0.1\NamedInstance
To resolve your issue, make sure you are connecting to the correct instance. If you are connecting to the same instance and getting different results, it could be a timing issue.
Related
I know this is a dumb question but it's really impeding my progress.
When using LINQpad I am able to easily connect to my SQL Server Express, but I cannot figure out the connection string for my SQLDEVELOPER server.
Here is the information I can find regarding my server:
Would this be enough information to figure out the connection string I need?
I have tried heaps of combinations of MSSQLSERVER / V-ADLWS12 / MSSQL14 and still nothing.
Thanks for any help
Check out the instance name column in your second screenshot:
the MSSQLSERVER instance is the default, unnamed instance which you can connect to use . (means: local server - this machine), (local) or localhost (or also: machinename)
Any other instance is a named instance, which you can connect to using .\SQLEXPRESS, or (local)\SQLEXPRESS, or localhost\SQLEXPRESS, or yourmachinename\SQLEXPRESS
If you're connecting to a remote SQL Server, just replace the . with the machine name of that remote SQL Server machine
....All I needed for the connection string was a dot.
.
I'm more happy than confused
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.
Can someone explain why after installation of SQL Server some PC get a suffix of \SQLEXPRESS and some don't? Is there an option to change it?
Any suggestions or tips would be appreciated.
That is the SQL Server instance name for the new SQL Server you installed. A single machine can host multiple instances of SQL Server. The naming convention you see: hostname\instance_name is used to identify the different SQL Server instances running on a single machine.
When you install SQL Server Express, the default instance name created is SQLEXPRESS.
See:
Default instance name of SQL Server Express
How to: Identify a SQL Server Express Instance
Instance Configuration
The hostname is used for machine to machine networking. That is the same name that is used for Netbios/SMB file sharing services (\\hostname) and normally resolved for TCP/IP services through DNS (http://hostname).
The hostname\instance_name is purely a SQL server naming convention. Its only purpose is to identify a running instance of SQL server. The SQL server client network libraries know how to resolve these instance names. The standard network stacks do not. This means the following do not work:
ping hostname\instance_name
\hostname\instance_name
http://hostname\instance_name
The \instance_name only works with SQL server network clients.
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.
I have an SQL Server with SQL Server Engine and SQL Server Analysis Services (2008 R2). The physical name of the server is SQ21. For beeing flexible we created a dns alias (Host A) which points to this server (respectively the IP Adress of the Server).
This works fine in nearly all scenarios
Sql server management studio
Deplyoing of SAAs Projects (Deployment Server)
We have one problem. If we want process the saas database i get an error:
"Error in relational Module. With the Datasource with ID could not be established a connecton"(attention, this is a tranlsation made by me from german, so the exact term could be slightly different)
As soon as I change the Datasource-Server Property back to the physical server it works.
What could be the problem? Kerberos? Or could it be that the both servers (sql server engine and saas) are on the same server?
I had this same issue and was able to find a fix. You have to disable strict name checking on the server and add an entry to the BackConnectionHostNames list in the registry that matches the alias you want to use. See workaround method #1 of this article for details on doing both (don't worry that the article is for SharePoint; the procedure applies to any app that uses loopback checking for authentication, which includes SSAS 2005/2008). You may also need an SPN that matches your alias, so if it doesn't work after making the registry changes (and rebooting), try adding the SPN also.
Does the machine have more than one IP address? If so, it could be that MSSQL is not listening on the address to which the DNS host name resolves.
It could also be that the DNS entry has not propagated yet, or for some other reason your server is not resolving the host name to the correct IP address. From a command prompt on the SQL Server machine, type
nslookup host.domain.com.
(use the DNS host name in place of host.domain.com, of course, and the "." at the end is important). You should get something like this:
Server: resolver.for.yourserver.com
Address: 12.34.56.78
Non-authoritative answer:
Name: host.domain.com
Address: 98.76.54.32
If that last address is not bound to the SQL Server or you don't get an answer, that's the issue.