SQL Server Admin 2014 :: Picking Static Port Number For Named Instance
Apr 3, 2015Basically the question is, which number should I pick?
View 4 RepliesBasically the question is, which number should I pick?
View 4 RepliesI changed the Port of my named instance to use static port but still error log is giving two values ,why??
spid15sServer is listening on [ 'any' <ipv6> 50152].
spid15sServer is listening on [ 'any' <ipv4> 50152].
ServerServer is listening on [ ::1 <ipv6> 57518].
ServerServer is listening on [ 127.0.0.1 <ipv4> 57518].
I have TWO named SQL Server instances (on the same machine) and I need to know the port of each of them, how can I do that? Is it write to check the following:
Which one to take: "TCP Dynamic Ports" or "TCP Port"? and what is the difference between them anyways?
Can the two instances (or more) on the same machine use the same port?!
I've two instances(Default, Named[dynamicsFINANCE]) running on SQL server 2014. However, when I try to connect to named instance say (dynamicsFINANCE) using SQL authentication from local SSMS, I get below error message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
I assigned a static port number to the named instance [dynamicsFINANCE] 1450. I also setup the firewall rule to allow access to Port 1450.
Plan to setup AG on in both default and named instance of two nodes. Can we do it ?
View 9 Replies View RelatedI have an existing 2012 default SQL Express. It's set up on a VPS managed by a third party. I have an administrator account on this 2012 Windows server. I'm not much of a sysadmin or a DBA but I get around. ;)
I've installed a new NAMED instance on this VPS and can not connect to it with client tools (SSMS). If I remote in, I can connect this way.
What steps might a seasoned DBA expect to make when getting a new named instance ready for the world.
Assign a port? Check the port?
Open the firewall for the port?
Will this new named instance listen on a different port than the previously installed SQL Express instance?
I need to create a named instance on a sql cluster.
How do I perform this? Is it as simple as creating a named instance on a standalone machine? Is there anything I need to consider?
I try to connect from a pc to a SQL Server on another pc. Both pc’s are in a workgroup. I want to connect from a Windows Forms application to a named instance on the other computer. By now I have been able to connect from one pc to SQL Server on the other with tcp:smurfin, 52782.
I want to be able to use servernameinstancename (instead of portnumber) to make a connection in a Windows Forms application.
I’ve checked / tried te following:
•In the properties of the instance, tab Connections, the option Allow Remote Connections is enabled
•In Configuration Manager: TCP is enabled
•The service SQL Server Browser is started
•On the tab IPAddresses, in the section IPAll, there is NO portnumber for TCP Port. And TCP Dynamic Ports has the nummer 52782
•I have created un inbound rule for port 52782 and also for 1434 (SQL Server Browser). And to be on the save side: a rule for 1433 as well.
•Restarted the service
If I run the following code in SQL Server, that same port number (52782) is returned:
EXEC xp_ReadErrorLog 0, 1, N'Server is listening on', N'any', NULL, NULL, 'DESC'
GO
SELECT local_tcp_port
FROM sys.dm_exec_connections
WHERE session_id = @@SPID
[Code] ....
I have a new named instance (SQL Server 2005 x64 SP2 (Build 3159) Developer edition) setup with dynamic port selection. A default instance was also running on the server prior to the named instance setup.
SQL Server Browser service is running. Remote connections are configured on the named instance. But still remote clients can only connect when the port number is specified after the instance name (servernameinstancename,9999). Without the port number, "error 26 - Error locating Server/instance specified" is thrown.
Doesn't the SQL Server Browser service eliminate the need for clients to specify the port number? What am I missing?
Thanks.
Thanks for Microsoft's Windows XP Service Pack 2 and Windows Server 2003 that make the security much stronger. However, besides the invisible benefit so far, I have become the victim of this security policy.
I have several named instances of SQL 7/2000 installed in my machine. They are not visible out of the Microsoft new fire wall. I need to access the instances from outside the fire wall, but I don't know which port I should open for the instances.
From SQL online, the default instance of SQL server is connected through TCP/IP by default port 1433. I could successful open that port and made the default instance visible to outside. However, the port 1433 doesn't work for the named instances. SQL online said, the port for named instance is dynamically (by default) chosen the first time the instance is started. So, actually, I have no way to know the port.
Is there anyway that I can check the database or somewhere to get the port that is used by the named instance?
Thanks for any input and recommendation.
I have opened up a port on a remote SQL instance and can see that the port is LISTENING when using the PortQry tool. I have also set the TCP port in the TCP/IP properties in the IPAll section for that instance, yet I am unable to connect and get an error of
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=14998; (.Net SqlClient Data Provider)
I have done this on other instances, although they were default instances, and it has always worked fine.
Having problems running the BPA for 2012. We setup using a clustered environment, SQL Server installed using default instance, and a static port not 1433. When I try to run the BPA using the instance name it says it doesn't exist, and won't let me add a port number. However, if I use MSSQLSERVER as the instance name it runs with no port specified and returns results. I assume that it doesn't require a port because the default instance would pull from the Browser Service and the using MSSQLSERVER is the same as running the default on a standalone server. Are those assumptions correct?
View 2 Replies View RelatedWe have a bought in application written in Visual Basic 6 using ADO 2.7 to connect to SQL Server. The application has two connections strings and uses internal logic to determine which of the two connection strings connects to a read-write database. It does something as simple as trying an update that makes no changes to a very small table somewhere.
Previously this application connected to a Mirrored Database hosted on two Windows Server Failover Clusters and SQL Server 2005.For the future the App will be connecting this application to a SQL Server 2014 Availability Group.The Availability Group is made up of four servers, in a cluster, two at one site on Subnet A and the other two at a second site on Subnet B. The Availability Group has been given a Listener with a DNS name of AGLISTEST on port 1433 with two Static IP addresses, one for each subnet.
Our Contractor has configured the Application’s connection strings to connect to the two Static IP addresses assigned to the AG. He is of the opinion that although ADO has zero understanding of an Availability Group, at least one of the Static IP Address will translate to the Availability Group primary server because it is a Cluster Resource and so act like a Cluster IP Address on Windows Server Failover Cluster; i.e. sort of mimicking the previous configuration. This does work and he has demonstrated it, however I can’t find any article that proves to my satisfaction this is intended behavior not something that accidentally works. If it is accidental behavior then that would be something that might stop working at an unexpected point in the future.
All the research I have found relates to connecting to the AG Listener name, and all the multi-subnet issues and Active Directory issues that go with connecting using what is a legacy client.So; the question is, is this translation / redirection of static IP Addresses assigned to an Availability Group listener documented and safe?
We have transaction replication configured across multiple SQL instances and could find one of the replication (from publisher to subscriber) net transport sessions is happening via Named pipes rather than TCP. where to troubleshoot this issue and what action to be taken to make it happen via TCP.
View 0 Replies View RelatedI've been reading about the protocols and i've been trying to connect to my SQL SERVER using each one of the protocols, but i think I'm missing something, i dont have any problems using Shared Memory and TCP protocols, but I'm not pretty sure how to connect to my remote SQL SERVER using NAMED PIPES protocols. The books On Line of Microsoft refer that you can connect using this protocol using the next syntax: Connecting to a default instance by specifying a named pipe name:
APPHOSTpipeunitapp
Connecting to a named instance by specifying a named pipe name:
APPHOSTpipeMSSQL$SQLEXPRESSSQLquery
Connecting to default instance by name, forcing a named pipes connection:
np:APPHOST
Connecting to named instance by name, forcing a named pipes connection:
np:APPHOSTSQLEXPRESS
But I can't connect to my remote SQL SERVER, if i try the same with my local SQL SERVER i don't have any problems. I've been reading the articles so many times searching something about Named Pipes is only for local connections, but Microsoft say that it's posible to connect to a remote SQL SERVER, but i don't know how to do that. The firewall is disabled, I changed the APPHOST in the above syntax for the IP address of my SQL SERVER but it didn't work..
I'm trying to configure a named instances of SQL Server 2012 SP2 to have specific IP addresses and listen to that IP on port 1433. Alongside this, I have the default instance running on a different IP and listening to that on port 1433.I've managed to get them configured so that they are reachable using the IP, and looking at the log for each they are listening correctly on that IP on port 1433; in addition, the default instance connects fine using the SERVERNAME.However, when I try and connect to the named instance using the SERVERNAME/INSTANCENAME syntax, I receive the following:-
"Cannot connect to SERVERINSTANCE.
Instance failure. (System.Data)"
Configuration for the TCP/IP protocol for that instance is as follows:-
Protocol Tab
Enabled= Yes
Keep Alive = 30000
Listen All = No
IP addresses Tab
IP1
Active = Yes
Enabled = Yes
IP Address = 10.1.1.1
TCP Dynamic Ports = 0
TCP Port = 1433
[code]...
The SQL Browser service is running and prior to switching off Listen To All, I could connect to the instance remotely using the instance name.
I have a named sql instance on SQL 2012. The issue is that the clients is having problem connecting to it when the firewall is on, this is not consistent. The connection is fine when I disabled the firewall. When I turned the Windows firewall back on, it will work for awhile and it fails. I checked the SQL configuration manager and saw that a dynamic port is assigned to the named instance. I did put that in the firewall rule and unblock it. I also put TCP 1433 and 1434 as well as the browser service port, TCPUDP 2382 and it still didn't work.What is the best way to determine what port does the named instance are listening?
View 11 Replies View RelatedHow to set up a specific aliased instance name. I have installed two identical named instances on a server called LONPOCSQL. The instance names are FINPROD and FINREP, so when connection to them remotely I connect to LONPOCSQLFINPROD or LONPOCSQLFINREP. My question is how can I configure it so that I can connect remotely to the instances in by referencing them as FINPRODFINPROD and FINREPFINREP?
The reason for this is that I need to replace a very old system where the applications connect to the sql servers by referencing them as FINPRODFINPROD and FINREPFINREP respectively. I'm trying to set up a 2-node SQL alwayson AG cluster for HA+DR with one server in the prod DC and the other in DR. I need both instances to live one the same box.
1. As far as I'm aware SQL Aliases only work when the connection is local, remote connections fail
2. I can't create a DNS alias called "FINPRODFINPROD" and point it at a listener name as slashes "" are not allowed in DNS CNAMEs
3. My old boss once built a SQL 2008 R2 failover cluster with two instances on it called "lonsql40lonsql40" but there is no documentation on how he did it and I can't find anything on the web
I have built a SQL 2014 Always on Cluster. I need to create three Availability groups and listeners in the same instance. Do I need 3 separate IP address for each listener or one IP address can be shared for all 3 Listeners ?
View 3 Replies View RelatedSay I have 2014 AlwaysOn setup and working:
SQLNode1 ->Instance01
SQLNode2 ->Instance02
When I setup my listener: ListenerA...Do I need to use the instance name in it?
ListenerAInstance01 or ListenerAInstance02 depending on which SQLNode is the "active" availability group?
Am I better off to use the same instance name for both nodes, since my goal is to have all databases on both instances in the same availability group and sync'd? When SQLNode1 migrates over to SQLNode2 I will need to update the instance name in my connection string on the listener from ListenerAInstance01 to Instance02? When I connect with SSMS do I just use: ListenerAInstance01 (or 02)?
How you are handling the replication of the many instance-level objects/items (logins, linked servers, server roles, database mail, operators, on and on) to the replicas in an AlwaysOn topology.
I'm especially curious about DBAs managing larger SQL Server environments. In my current environment, we have approximately 80 production SQL instances containing about 650 databases that require high availability and disaster recovery.
We use mirroring today and have a solid, home-grown solution for replicating the instance-level items from production to disaster recovery. AlwaysOn changes things a bit since we'll have multiple replicas and of course the database could be active on any one of those at any time. So my concern is about instance-level items being created in one instance but never deployed to the other instances participating in the AG group.
Looking for query that lists all databases, in an instance, that are not accessed before a given date (e.g., not accessed before December 31, 2014)?
View 6 Replies View RelatedWhy do I leave my DB in Restoring State after attaching to the instance? Could not this fire a redo activity on Transaction Log?
Or, How does sql server undo all uncommitted transactions on active vlf during recovery?
I have heard that high numbers of VLF's aren't good. It can impact performance and can delay recovery time, so I wanted to test that.
I created 2 DBs with 100MB datafile and 50MB logfile.
TestDB log file had 100MB autogrowth
TestDB2 log file had 1% growth.
I inserted 1048576 records, took the backup
Ran DBCC loginfo and
TestDB had 40 VLFs and
TestDB2 had 165 VLFs
But when I restored both DBs, this is what I got.
TestDB:
RESTORE DATABASE successfully processed 42258 pages in 4.420 seconds (74.691 MB/sec).
SQL Server Execution times:
CPU Time = 125ms, elapsed time = 8323 ms.
TestDB2:
RESTORE DATABASE successfully processed 42257 pages in 3.943 seconds (83.724 MB/sec).
SQL Server Execution Times:
CPU time = 109 ms, elapsed time = 8314 ms.
Question is: Where is the difference? How TestDB which has 40 VLFs are better than TestDB22 which has 165 VLFs.
I have this query
SELECT top 100 Ltrim([text]),objectid,total_rows,total_logical_reads , execution_count
FROM sys.dm_exec_query_stats AS a
CROSS APPLY sys.dm_exec_sql_text(a.sql_handle) AS b
where last_execution_time >= '2015-04-07 10:01:01.01'
ORDER BY execution_count DESC
But the result of execution count is from the first. I want to know it only one day.
How you would calculate the average read/write latency experienced by a SQL Server instance during a specific time window in order to monitor this for multiple instances. From this MSDN blog, I know that you have to take multiple samples and do some calculations to get the correct latency.
[URL] ...
However, the SQLServer:Resource Pool Stats object tracks these numbers per resource pool and we want to get one number for the whole server. Since there can be a different base value for each resource pool, you can't simply sum the numerator values together. Here's some sample data from a server that illustrates the problem.
object_name counter_name instance_name cntr_value cntr_type
SQLServer:Resource Pool Stats Avg Disk Read IO (ms) default 307318919 1073874176
SQLServer:Resource Pool Stats Avg Disk Read IO (ms) Base default 25546724 1073939712
SQLServer:Resource Pool Stats Avg Disk Read IO (ms) internal 2045730 1073874176
SQLServer:Resource Pool Stats Avg Disk Read IO (ms) Base internal 208270 1073939712
I'm thinking I would need to do some sort of weighted average, but I'm not sure if that will result in the correct value. Here's the formula I am thinking about using currently before doing the calculation over time
((default * default[base]) + (internal * internal[base]))/(default[base] + internal[base])
Then to do the calculation over time, I'd use the changes in the calculated numerator and denominator to get the average.
Does this sound like to correct way to get this value? Is there a good way to verify?
I am writing a performance baseline test.
The first test writes 5000000 rows in one table. I realise this is not representative OLTP behaviour, but it worked me to start interpreting performance counters and to test several setups to be discussed with our server, storage and network administrators. This way we have been able to compare the results of different hard disks, Lun vs vmdk, 1GB vs 10GB network, AMD vs Intel, etc. This way I can also compare several SQL setups (recovery model, max memory config, ...)
The screenshot shows the results of 2 runs on the same server : Win2012R2, SQL2014, 16GB RAM.
In test 1 min/max server memory was set to 9215MB/10751MB
In test 2 min/max server memory was set to 13311MB/14847MB
The script assures the number of bytes inserted in the nvarchar columns is always the same.
This explains why the number of pages and the number of MB in the table are the same at the end of the 2 tests (column 5 and 6)
Since ca 13GB has to be written, the results of test 1 show the lead time is increasing once more than 10GB has been inserted (column 8 and 9) In addition you can see at that moment
- buffer cache hit ratio is decreasing
- page life expectance becomes "terrible"
- free list stall/sec increases
- lazy writes/sec increases
- readlatency increases (write latency does not)
In test 2 (id 3 in column 1 in the screenshot) those counters are not really influenced (since the 5000000 rows can all be stored in memory).
Now what I do not understand is :
Why the number of pages read (instance level) as well as the number of bytes read and the number of reads (databaselevel) is increasing extremely during run 1.
I expected to see serious impact on write behavior, since SQL server is forced to start flushing dirty pages once memory is filled. Well actually you can see here the number of writes (not the the number of bytes written) starts to increase faster in test 1 after 4000000 rows, but there's no real impact on write latency.
Finally I want to notice
- I'm the only user on this machine
- the table has a clustered index on a identity column
- there are no foreign key constraints
- inserts are executed using a loop, not one big transaction
- to monitor progress and behaviour/impact, each 10.000 loops the counters are stored using dmv queries
So I wonder why SQL Server starts to execute so many reads in test 1.
Database File Placement Layout? We are planning to implement a new SQL Server 2014 OLTP Database with a 1 TB Data file and 1 TB Log File. I am looking at the possible layout of the database files and trying to determine the best possible configuration. My knowledge/research tells me that items which need separate storage due to constant simultaneous access are:
Data files – should go on the fastest reading storage.
Log files – should go on the fastest writing storage.
TempDb – involves a lot of writing at the same time the data files are being read.
Indexes - (including full text indexes) - involves a lot of writing at the same time the data files are being read.
Also, are there any benefit to having multiple OLTP Database Log files? Because SQL Server writes to the log file sequentially, I do not see any advantages to having multiple database log files. In a SQL Server 2012 Class I took last summer, under “Determining File Placement and Number of Files”, it states “Use a single log file in most situations as log files are written sequentially.”
Our development team wanted to create a database user for each application user in the application and use these for granular data access control, which at first, sounded like a good idea but our initial testing ran into some interesting results.
Our target user base was about 15 million users with an estimated 1% concurrency rate, and finding no MS documentation on an upper limit to the number of users a database can have we began some load testing to see how the database performed. In the hundreds of thousands of users range our test database had a hard time performing well under light loads (even without any concurrent connections).
When we purged the users and reverted back to just a handful of service accounts, performance went back to "normal" under the same loads. I began to wonder if this is a situation where throwing more hardware at the problem would overcome the issue or if there is a practical upper limit to the number of users a single database can handle well.
(There were of course other cons to this arrangement and I certainly was never going to expand the users tree in the object explorer for a database like this, but we thought it a solution worth investigating.)
What is the largest number of users any of you have had in a single database?
I have a 2 node cluster having 4 cores each wherein having 3 instances of SQL 2008 R2 enterprise comprising of 60 databases, 20 on each instance. I need to setup mirroring for each of the databases to a secondary server having 4 cores and 3 instances. What i understand is that in this case the mirror server will be providing max of 512 worker threads and the 60 mirror databases would consume 240 threads.what all needs to be checked for looking into the feasabilty of going ahead with a async mirror setup as mentioned above.
View 0 Replies View RelatedI've installed the MDW (Mangement Data Warehouse) database on our central monitoring SQL Server. I've then added a number of servers to be monitored. The data is collected on the servers that are being monitored and uploaded to the central MDW Monitoring server.
On the servers that are being monitored, I'm seeing a large number (over 1000) of SPIDs being generated by 'SQL Server Data Collector'.
Is this normal behaviour? I've seen more blocking as a result of this.
Is there any way to reduce the number of SPIDs generated?
ID A B C AVG
------------------------
1 08 09 10 -
------------------------
2 10 25 26 -
------------------------
3 09 15 16 -
------------------------
I want to calculate the average of the larges two number from the column A,B & C for particular identity and store that average in the AVG column....
I have access to the default instance of a SQL Server ..... I have access to the QA only .. by reading the registry through the QA I get to knw that there are additional 4 more instances on the Server ..... is is possible to get the port on which they are listening using the QA ....
I knw that we can go to the servers network utility & see it there in the TCP /IP ... but i dont have access to that , neither do i have access to the error logs that tell me , on which port is SQL Server listening to
Can someone help