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.
Related
I am facing server name problem in SQL Server 2012. When I click on configure distribution I get an error:
Unable to connect to server. Specify the actual server name.
I changed my server name and restarted the services but unable to connect through new server name.
Basically, I am doing this on local domain based server.
Kindly suggest a suitable solutions.
After you rename a SQL Server machine, you will also need to rename the SQL Server instance itself using:
sp_dropserver <old_name>;
GO
sp_addserver <new_name>, local;
GO
For more information, see Microsoft's article called Rename a Computer that Hosts a Stand-Alone Instance of SQL Server.
I think what your probably finding is that changing the Windows server hostname doesn't actually change the original SQL Server instance name which still gets used for certain services. Run the following on the DB engine:
SELECT ##SERVERNAME
You'll probably find a different value to what your expecting from the OS.
There isn't really a solution to this that I'm aware of without re-installing SQL Server on the newly named box.
Also be careful with names that exceed to the 15 character NetBIOS limit.
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.
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.
We've been experiencing a strange issue with SQL 2008 R2 (10.50.1600) installed as a named instance. In order for any external clients to connect, we have a certain procedure we have to follow, but should not have to. Now I did in fact open the TCP/IP and Named Pipes protocols on the SQL server and restarted it, this isn't the problem. We're on an Active Directory Domain (running from Server 2003). The problem exists no matter what OS the server or client is (XP, 2003, 2008, Vista, 7, 64bit, 32bit, etc.). The problem also persists from anything which can connect, for example, SQL Management Studio, ADO (from our applications), etc.
The problem is that before any client can connect to this server, each client machine must first connect to this server through ODBC (and we don't use ODBC). Any attempt to connect to a 10.5 SQL server before doing this results in "Server does not exist or access denied". But once we can connect in the ODBC (through Named Pipes), then everything else starts to work. The same issue occurs both when using the Computer Name and IP Address. In fact, if we want to connect with computer name \ instance name, then we have to do so first in the ODBC, and then if we want to connect via the IP address \ instance name, then we have to do the same also for that.
We've been having to do this on every single client computer. Again, once the ODBC is able to connect to this SQL server through Named Pipes, then all future attempts from that client work.
What could be causing this to occur? How to avoid it? I should not have to do this "ODBC Trick" as we've been calling it. I've never had this issue on any other version of SQL.
The issue might be related to the SQL Browser service. Each sql instance will have a different port number - try connecting from the client as IP Address,Port (e.g. 123.123.123.1,1433) - this will exclude DNS and Browser from the equation
Edit: now knowing that it is browser related, try see why clients can't access SQL Browser (usually Port 1434). Service not started? Possibly firewall blocking?
Microsoft have tied down everything security wise now by default, so any new configuration now generally requires quite a bit of detailed security planning, policy configuration, permissions etc. Welcome to the age of non-trust ;)
You could easily test your connection by creating a simple file. Follow the steps here at "How to test an SQL Server connection": http://teusje.wordpress.com/2012/02/21/how-to-test-an-sql-server-connection/
I have two development teams, that come from different groups.
Group A develops against a local default instance of Sql Server 2008 R2;
Group B develops against a local named instance of Sql Server 2008 R2.
Is there a way to setup an alias such that both groups are coding against the same name? As it stands right now we have a war of Connection Strings as group B changes (local) to ./DEV and group A changes it back again?
In SQL Server Configuration Manager, under the SQL server native client configuration section there is a subsection called "aliases" you can add an alias into here that points to your named instance. You just use the alias as if it is the default instance on a server with the name of the alias. We use this exact model and have only one connection string that points to a standard alias. Each developer has the same alias name pointing to their own instance.
Aliasing to a Local SqlExpress Instance
To expand on Ben's answer, I had the specific requirement to alias a connection string pointed at a specific Server Instance, and instead re-route this to our local developer Sql Express instances, i.e. to alias from:
SomeServer\SomeInstance
to
.\SQLExpress
This proved somewhat tricky until I found this link here. My Sql Express instance was running on the standard port 1433 (i.e. adapt to suite)
Enable TCP/IP for SqlExpress
Since aliasing is done via TCP/IP ports, TCP/IP protocol must be enabled. (Opening SqlExpress for remote access isn't necessary if you are working locally).
Using Under Sql Server -> Configuration Tools -> Sql Server Configuration Manager:
At the same time, set the Listen All property to Yes.
Enable LocalHost IP's
Ensure that both IPv4 (127.0.0.1) and IPv6 (::1) localhosts are active and enabled.
On each IP's, Leave the Dynamic Port at zero (as the name suggests, the port will be allocated dynamically). The IPAll Dynamic and TCP Ports are then used globally.
You'll need to restart the MSSQLServer / SqlExpress service to effect the change.
Creating Aliases (32 and 64 bit)
Under the Sql Native Client xx Configurations, this requires simply adding the alias "From" Server\Instance as the Alias Name and the actual server + instance as the Server (i.e. my local SqlExpress instance). I was able to connect via both port 1433, or the dynamic port on IpAll (9876), although saw no reason to use the latter. The aliases must be done for both 32 and 64 bit client configurations.
You should now be able to connect using the aliased SomeServer\SomeInstance via SSMS.
Other Notes
Since I was aliasing to a local instance, I did NOT have to add an alias for the from host, SomeServer to a DNS or LocalHosts. This will likely be required however if you are aliasing to a remote server (plus I guess some other security headaches)
I did not need to have the Sql Browser service running.
So it would seem that the Sql Client configuration takes care of the substitution prior to any network or security steps.
Personally, I'd make them all use the same box.
That said, you can set local aliases per developer's box using SQL Server Client tools.
Anything IP address or server name based (such as hosts file or DNS) will fail because instance names (and ports used) are different