Hot answers tagged

8

Do not do it in SQL. From the few things that can be categorized as 'stupid use of SQLCLR', making expensive lengthy network calls ranks as #1. At the very very very very least, make sure the CLR code calls Thread.BeginThreadAffinity() before it goes into waiting for the intertubez to respond (DNS lookup and reverse lookup included). The proper way to ...


7

The GRANT syntax allows you to specify multiple users in a single query. You can't do it with a wildcard, but if you already have the list you can do this: GRANT SELECT,INSERT,UPDATE ON db1.* TO 'user1', 'user2', 'user3', 'user4', 'user5', 'user6';


6

One minor drawback would be that you would need to add a Subject Alternative Name (SAN) to the certificate that is bound to SQL Server if you are using encrypted connections. This could be a significant pain if you have a "shared" server that hosts a number of smaller applications and you want to set up an alias for each application. If you are using a ...


5

What would be the drawbacks of telling my developers to use a DNS entry to point to their respective databases in their ConnectionStrings? Technically, now, one of the drawbacks is that they aren't going to change their connections strings... when, say, they should be adding in connection specific keywords such as MultiSubnetFailover. You'll also have a ...


4

The Availability Group Listener name is a Computer Name Object (CNO) in Active Directory, not just a DNS entry: http://technet.microsoft.com/en-us/library/ff367878(v=exchg.150).aspx Its location in AD determines where it gets registered. If you want to create a different one somewhere else, you can create a DNS CNAME (alias) pointing to the real ...


3

This is how DNS works with multiple servers the client will ask the servers in a round-robin fashion. if an entry is removed from one of the DNS servers the client will get Non-existent domain as an answer from that server and will not query the other. Here you can get an overview but it boils down to this The DNS Client service queries the DNS servers in ...


2

Be aware that when you use DNS CNAME with a SQL database you need to be aware of the TTL setting. This setting tells a system how long the DNS entry should be cached for before a trip back to the DNS server is required. You will probably need to adjust the TTL in advance so that when you do make the switch, you don't have client systems that have the old ...


2

We have a four node cluster (SQL Server 2014 on Windows 12) and we recently setup heart beat network on the nodes following a best practices source after experiencing some cluster instability issues. Health checking goes across any available interface, some interfaces have metrics lower or higher than others but the loss of a single interface should be ...


2

SQL Server always returns NULLs in this case. I know of no way to globally (through server settings or connection strings) cause it to return empty strings or zeroes instead of NULLs. And I do not think it is a database library issue--using different drivers won't change a thing. This is just the way SQL Server behaves. If you want to convert NULLs to ...


2

I feel terrible for forgetting about this question!!! I have located and fixed the problem as follows. When the DNS names were added to DNS, the corresponding reverse lookup was not created. This resulted in MySQL not being able to perform the reverse lookup from the IP address to the correct DNS name, and therefore rejecting the connection. So, we added ...


2

As documented under GRANT Syntax: Account Names and Passwords  [ deletia ] You can specify wildcards in the host name. For example, user_name@'%.example.com' applies to user_name for any host in the example.com domain, and user_name@'192.168.1.%' applies to user_name for any host in the 192.168.1 class C subnet. The simple form user_name is ...


2

What's the logic behind this requirement from the sysadmin side? The cluster is going to register the DNS in the same domain that the cluster exists in, not a subdomain of the domain that the cluster is in. You can put a CNAME in place in sql.company.com that points to your DNS name in company.com, but you'll need to be able to update the DNS record in ...


2

A simple list of name/address pairs with an index on each would be sufficient if absolutely all you needed to do was lookup one from the other. Unfortunately you will find that the DNS protocol has larger requirements than that so if you intending to interact with the public domain name system you have much more work ahead of you. See http://en.wikipedia.org/...


2

You need to identify which queries are taking some time to execute and optimize accordingly. By default mysql does not log slow queries, so you have to add the following to your mysql config file - log-slow-queries slow_query_log_file = /var/log/mysql/mysql-slow.log long_query_time = 10 // in seconds - you can replace this with another number. For any ...


2

For each new client connection, the server uses the client IP address to check whether the client host name is in the host cache. If not, the server attempts to resolve the host name. First, it resolves the IP address to a host name and resolves that host name back to an IP address. Then it compares the result to the original IP address to ensure that they ...


1

I have come across this issue with my dev environment usually when during the setup of the cluster, i skip the warning for network binding. When you run a cluster validation, do you receive any warnings or errors on the network. Anyways this link fix my issue. @Amr provided the solution to issue. https://social.technet.microsoft.com/Forums/ie/en-US/c77c0b69-...


1

This sounds a lot like you need to add MultiSubnetFailover=true to your connection strings. See https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#connecting-with-multisubnetfailover That article explains fully why you need it enabled and even why you should specify it even if only ...


1

as dns domains are parsed from the end, it's useful to also store them that way - e.g: For bar.foo.co.uk you'll keep uk.co.foo.Bar. It makes both indexing and prefix searches simple and fast. In the example above you'll search for uk.co.foo.% - a simple search for regular index. Note: it's the same way many directory (ldap,dns, etc. ) searches work.


1

The PostgreSQL protocol cannot support hostname based virtual servers, because the client doesn't send the hostname of the server in the initial connection packet like HTTP does in the Host header. Your only option is to add additional Elastic IP addresses. You will need to be able to tell which traffic came from which IP. Because EC2 instances don't have ...


1

It very well may be a server setup issue... but not the MySQL server. Based on the description of your problem so far, this doesn't sound like it's really related to MySQL. From MySQL's perspective, all of its incoming connections are coming from the same place -- the server running the API and phpMyAdmin. In fact, it's hard to see how it's possible ...


1

Not sure why you think you need to change this at the driver level. Can't you just change your query to the following, which should work fine on both SQL Server and DB2: SELECT OrderID, COALESCE(CustomerName, '') AS CustomerName FROM OrderTable LEFT JOIN CustomerTable ON OrderCustomerID = CustomerID (Though you may want to properly qualify your ...


1

I'm not sure what you have tried yet, but here's the obligatory link to the MySQL docs on how MySQL will resolve hostnames. Specifically: The thread takes the IP address and resolves it to a host name (using gethostbyaddr()). It then takes that host name and resolves it back to the IP address (using gethostbyname()) and compares to ensure it is the ...


Only top voted, non community-wiki answers of a minimum length are eligible