Category Archives: Imported from BeyondRelational

These posts are imported from my old blog page: http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx

#0152–SQL Server-Connecting to a SQL Sever named instance using the IP address and TCP/IP port number


Perhaps one of the most common questions on the forums is “Can I connect to my SQL Sever named instance using the IP address and/or TCP/IP port number?”. It was this question that prompted me to write today’s post.

Last week, I wrote about how to use SQL Server utilities to determine the port number on which the SQL Server service is listening for connection requests. I will be using this information as base to start off today.

Assumptions & Disclaimer:

  1. This post demonstrates an administrative procedure that deals with SQL Server instance security. Please do not perform the steps outlined in this post without consulting your database administrator
  2. It is assumed that the SQL Server under question is configured for accepting remote connections via TCP/IP protocol

Connecting to a named instance using a TCP/IP address and port number

Any SQL Server instance, named or default, can be connected to by using the TCP/IP address and the port number, provided it is configured to allow remote connections. All one needs to do is:

  1. Determine the TCP/IP port at which the SQL Server instance is listening on by using one of the methods shown here
    • You can get information about the hosts’ IP address can be available by using the “ipconfig” command line utility.
  2. Once the IP address and the TCP/IP port number are available, launch the SQL Server Management Studio
  3. In the “Connect to Server” dialog box, mention the server name in the following format:
    • <IP address>,<TCP/IP port number>
    image
  4. Click on “Connect” and notice that the SSMS is now connected to the desired SQL Server instance by using just the IP Address and the TCP/IP port number
    image

    I hope that this post will be helpful to all those who are looking for solutions on how to use the TCP/IP address and port number to connect to a specific SQL Server instance. Please note that using IP addresses and port numbers may not be a successful connection strategy if the server is on a DHCP network (where the IP address may change with each restart).

    Until we meet next time,

    Be courteous. Drive responsibly.

    #0152–SQL Server-Connecting to a SQL Sever named instance using the IP address and TCP/IP port number


    Perhaps one of the most common questions on the forums is “Can I connect to my SQL Sever named instance using the IP address and/or TCP/IP port number?”. It was this question that prompted me to write today’s post.

    Last week, I wrote about how to use SQL Server utilities to determine the port number on which the SQL Server service is listening for connection requests. I will be using this information as base to start off today.

    Assumptions & Disclaimer:

    1. This post demonstrates an administrative procedure that deals with SQL Server instance security. Please do not perform the steps outlined in this post without consulting your database administrator
    2. It is assumed that the SQL Server under question is configured for accepting remote connections via TCP/IP protocol

    Connecting to a named instance using a TCP/IP address and port number

    Any SQL Server instance, named or default, can be connected to by using the TCP/IP address and the port number, provided it is configured to allow remote connections. All one needs to do is:

    1. Determine the TCP/IP port at which the SQL Server instance is listening on by using one of the methods shown here
      • You can get information about the hosts’ IP address can be available by using the “ipconfig” command line utility.
    2. Once the IP address and the TCP/IP port number are available, launch the SQL Server Management Studio
    3. In the “Connect to Server” dialog box, mention the server name in the following format:
      • <IP address>,<TCP/IP port number>
      image
    4. Click on “Connect” and notice that the SSMS is now connected to the desired SQL Server instance by using just the IP Address and the TCP/IP port number
      image

      I hope that this post will be helpful to all those who are looking for solutions on how to use the TCP/IP address and port number to connect to a specific SQL Server instance. Please note that using IP addresses and port numbers may not be a successful connection strategy if the server is on a DHCP network (where the IP address may change with each restart).

      Until we meet next time,

      Be courteous. Drive responsibly.

      #0151 – SQL Server– Which TCP/IP port is my SQL Server listening on?


      Some questions never cease to come up on various forums. The most common of them seems to be: What TCP/IP port is my SQL Server listening on? In today’s post, I will quickly demonstrate two simple ways to answer this question.


      Assumptions & Disclaimer:



      1. This post demonstrates an administrative procedure that deals with SQL Server instance security. Please do not perform the steps outlined in this post without consulting your database administrator
      2. It is assumed that the SQL Server under question is configured for accepting remote connections via TCP/IP protocol

      Method 01: Using the SQL Server Configuration Manager


      Launch the SQL Server configuration manager using one of the following ways:



      1. Go to Start –> Programs –> Microsoft SQL Server 2012 –> Configuration Tools –> SQL Server Configuration Manager
      2. Go to Start –> Run –> “SQLServerManager11.msc”


















      The SQL Server Configuration Manager would look something like that demonstrated in the screenshot below:
      image
      Navigate to the “SQL Server Network Configuration” node and choose to see the information about the Protocols for your SQL Server instance.
      image
      Double-click on the “TCP/IP” protocol (or right-click and choose “Properties”)
      image
      Navigate to the section “IPAll” of the “IP addresses” tab.
      The value of “TCP Dynamic Ports” is the port that this SQL Server instance is listening on
      image

      Method 02: Reading the SQL Server Error Log


      The second method that I am about to demonstrate now, involves reading the SQL Server error log through the SQL Server Management Studio. This can be achieved using T-SQL queries also, and if you are interested, do leave a comment and I will cover that in one of my future posts.











      Login to the SQL Server Management Studio (SSMS) and navigate to the Management –> SQL Server Logs node
      image
      Open the most current log by double-clicking on the “Current” node.
      Scroll down through the event log untill you see an entry that reads something similar to:
      image

      This entry contains the port number on which the SQL server is listening to.


      I hope you found this post useful. In my next post, I tackle one of the other most frequently asked questions – “Can I connect to my SQL Sever named instance using the IP address and/or TCP/IP port number?


      Until we meet next time,


      Be courteous. Drive responsibly.

      #0151 – SQL Server– Which TCP/IP port is my SQL Server listening on?


      Some questions never cease to come up on various forums. The most common of them seems to be: What TCP/IP port is my SQL Server listening on? In today’s post, I will quickly demonstrate two simple ways to answer this question.


      Assumptions & Disclaimer:



      1. This post demonstrates an administrative procedure that deals with SQL Server instance security. Please do not perform the steps outlined in this post without consulting your database administrator
      2. It is assumed that the SQL Server under question is configured for accepting remote connections via TCP/IP protocol

      Method 01: Using the SQL Server Configuration Manager


      Launch the SQL Server configuration manager using one of the following ways:



      1. Go to Start –> Programs –> Microsoft SQL Server 2012 –> Configuration Tools –> SQL Server Configuration Manager
      2. Go to Start –> Run –> “SQLServerManager11.msc”


















      The SQL Server Configuration Manager would look something like that demonstrated in the screenshot below:
      image
      Navigate to the “SQL Server Network Configuration” node and choose to see the information about the Protocols for your SQL Server instance.
      image
      Double-click on the “TCP/IP” protocol (or right-click and choose “Properties”)
      image
      Navigate to the section “IPAll” of the “IP addresses” tab.
      The value of “TCP Dynamic Ports” is the port that this SQL Server instance is listening on
      image

      Method 02: Reading the SQL Server Error Log


      The second method that I am about to demonstrate now, involves reading the SQL Server error log through the SQL Server Management Studio. This can be achieved using T-SQL queries also, and if you are interested, do leave a comment and I will cover that in one of my future posts.











      Login to the SQL Server Management Studio (SSMS) and navigate to the Management –> SQL Server Logs node
      image
      Open the most current log by double-clicking on the “Current” node.
      Scroll down through the event log untill you see an entry that reads something similar to:
      image

      This entry contains the port number on which the SQL server is listening to.


      I hope you found this post useful. In my next post, I tackle one of the other most frequently asked questions – “Can I connect to my SQL Sever named instance using the IP address and/or TCP/IP port number?


      Until we meet next time,


      Be courteous. Drive responsibly.

      #0150 – Tech Ed 2012 (India) – Day 03 – SQL Server Day – Go Big!


      As many of you would know by now, these days I am attempting to summarize my experience at Tech-Ed 2012 (India) held from March 21-23, 2012 at Bengaluru, India.


      March 23, 2012 was the day I was most looking forward to – because it was SQL Server Day! Today was the day when TechEd had a dedicated track – Know your Data – a Day in the life of a DBA. It was also the festival of Ugadi, and hence there was very little traffic on the roads of Bengaluru. I had worked till late the night before, but that did not stop me from gulping down 2 cups of coffee and reaching the venue before time! Without much ado, I will get right on with the details of the day’s proceedings.


      Day 03 – Keynote


      Although Day 3 had 2 starting keynotes, the SQL Server track was going to be held at the same location where the Visual Studio sessions were held the day before. A lot of people turned up and hence doors had to be closed for new entries. With no overflow lots, I did not want to be late to the sessions. I wanted to be sure to be ahead in the line, get a seat and then not move at all!


      I, therefore, attended only the first keynote by Chakrapani Gollapalli, General Manager – Consumer Channels Group,Microsoft India. Aptly titled – “This year, Microsoft will kick some A**”, this session was about the presence of Microsoft in the consumer community.


      IMG_0217


      Here are some highlights of Microsoft’s achievements in 2011:

















      IMG_0221
      1 Million downloads of Windows 8 customer preview within 24 hours of it’s release
      IMG_0223
      The growth of the Windows phone – Called a “design gem” – 65,000+ apps, 500+ new features and 100,000+ registered developers

      IMG_0225

      The XBOX 360 tops the Nintendo Wii & the PS3 for the 1st time in yearly global sales

      IMG_0227


      The consumer channels group focuses on 4 products (Windows, Windows Phone, Office and the XBOX) through 4 channels – Retailers, Operators, OEMs and Direct marketing.


      After the TechEd, I have 2 more things on my wish-list – the Windows Phone and the XBOX 360! Microsoft has truly lived up to their customer mission of “creating a product desire through an unbroken demand chain”.







      IMG_0230
      IMG_0231

      Day 03 – Sessions


      Peeling SQL Server like an Onion: Internals Demystified


      Speaker: Vinod Kumar, a.k.a. “Extreme Experts” (B|T)


      This one did not make me cry Smile – was it really about onions? Well, jokes apart, the topic was all about SQL Server internals and therefore, there was no possibility of demos. Even then, Vinod had the audience hooked.


      The key takeaways from this session were:



      • How does storage alignment (512b v/s 512E) impact SQL Server?
      • Security changes inside SQL Server 2012

        • 19 new permissions now available
        • How it is possible to unknowingly violate the principle of least privileges?
        • Virtual Account, Service Account with SID

      • Recovery Time Objectives, Recovery Point Objectives & how SQL Server 2012 will help improve them

        • Changes to check-pointing (direct v/s indirect check-pointing)
        • VLFs and the associated changes done in SQL Server 2012
        • Finally, a lesson to not only design a good backup/restore strategy, but to also test it!

      • Memory changes

        • Multi-page allocator
        • Can you have more than 8K pages in the buffer pool?
        • Is the max. memory setting on your SQL Server accurate?

      • AWE is no longer supported in SQL Server 2012

        • 32-bit guys – UPGRADE!

      • And, by the way, SQL Server licensing has changed – it’s now a core-based license as opposed to a socket-based model

      Read more about it on Vinod’s Blog here: http://blogs.extremeexperts.com/2012/03/08/teched-india-2012-sql-server-internals/















      IMG_0234
      The first session, the keynote just got over, and look at the crowd ready for Vinod’s session
      IMG_0245
      How does storage alignment (512b v/s 512E) impact SQL Server?
      IMG_0250
      Here’s how FSUTIL can help SQL DBAs..

      Speed Up! – Parallel Processes and Unparalleled Performance


      Speaker: Pinal Dave, a.k.a. “SQLAuthority” (B|T)


      Performance tuning is a very hot topic for all SQL Server sessions. But, performance benefits and issues due to parallelism within SQL Server is something that no speaker has ever talked about in India. Pinal took it up and presented a whole series of demos on how parallelism affects query performance and how to use DMVs to detect parallelism issues. With a very practical example involving a manager and 8 employees, Pinal demonstrated the scenarios in which one would want parallelism and where one would want to avoid it. The key takeaways were:



      • SQL Server is smart enough to make the right choice
      • It depends – doesn’t exist in the case of SQL Server. There’s always an answer for a question

      Read more about his session at: http://blog.sqlauthority.com/2012/03/13/sql-server-speed-up-parallel-processes-and-unparalleled-performance-teched-2012-india/ and http://blog.sqlauthority.com/2012/03/22/sql-server-techedin-presenting-tomorrow-on-speed-up-parallel-processes-and-unparalleled-performance-at-teched-india-2012/















      IMG_0256
      Pinal explaining what Parallelism is
      IMG_0260
      Pinal congratulating a participant for a correct answer
      IMG_0263
      More serious stuff – detecting and fixing parallelism issues

      Keep your database available: ALWAYS-ON


      Speaker: Balmukund Lakhani (B|T)


      One of the most awaited features in SQL Server 2012, the High-availability & Always ON enhancements were demonstrated by the one and only – Balmukund. The key takeaways were:



      • AlwaysON extends Windows clustering
      • A shared storage disk is no longer required to configure clustering
      • One Primary database, four secondary replicas, and two secondary synchronous replicas can be configured
      • Readable secondaries, supporting DBCC and backups
      • Log backup and Full backup with COPY_ONLY option can be performed on any replicas
      • Log backups done on all replicas does not break across replicas and therefore can be used as part of recovery strategy

      Read more about the session at: http://sqlserver-help.com/2012/03/20/keep-databases-always-availablealwaysonteched-2012-india/











      IMG_0270
      Explaining the backup capabilities of AlwaysON replicas
      IMG_0274
      Demonstrating the configuration of a “primary” secondary

      Lesser Known Facts of SQL Server Backup & Restore


      Speaker: Amit Banerjee (B|T)


      Backup & Restores are something without which a DBA’s day isn’t complete. Amit Banerjee demystified some of the many myths around backups & restores within SQL Server.



      • Three types of Backup Methods are available within SQL Server:

        • T-SQL (the “regular” one)
        • VSS (Volume shadow backups)
        • VDI (Virtual Device Interface backups)

      • What causes an I/O freeze error during 3rd party backups and is it really an error to be worried about?
      • For VSS storage, should the underlying backup software also need to support the features extended by SQL Server to use shadow backups?
      • Various types of backups and their significance:

        • Full/Differential backups
        • Log backups
        • File & File Group backups

      • Piecemeal restore of a database
      • What is the importance of the buffer count and max. transfer size values?
      • Learnt that there is a tool called SQLBackup Simulator that can help troubleshoot failed backups!

      Read more about this session on Amit Banerjee’s blog at: http://troubleshootingsql.com/2012/03/13/teched-india-2012-session/















      IMG_0279
      What is this backup/restore all about?
      IMG_0283
      A light-hearted spoof on Balmukund Lakhani (B|T) to break the ice with the audience
      IMG_0286
      Demonstrating SQLBackup Simulator

      Day 03 – TechEd 2012 – Closing keynote


      After 3 days of power-packed sessions, networking and demos, it was finally time to end TechEd 2012. As we moved towards the keynote area, fans came over to meet Pinal Dave, a.k.a. “SQLAuthority” (B|T) and get their copies of the SQL Server Interview Questions & Answers book signed by him.


      IMG_0298


      Pinal Dave signing a copy of his book for a fan. In the background: Rajashekaran Vengalil


      Seize The Opportunity


      The closing note started off by a Kolaveri dance by none other than Moorthy Uppaluri, General Manager, Academia, Microsoft Corporation. With absolutely no room (standing, sitting or otherwise), the key takeaways from his session were:



      • TechEd India 2012 was the biggest TechEd India event ever
      • How Microsoft has studied and followed Hype cycles to commoditize IT
      • Data scientist will be a new profession
      • Social networking is going to change in the future
      • It is the time for the developer community to think bold, act big and create differentiated applications to stay ahead – it’s time to seize the opportunity!










































      IMG_0302
      The fully-packed keynote hall. Every soul that attended TechEd was here.
      IMG_0300
      Moorthy doing a little “Kolaveri”
      IMG_0303
      Moorthy Uppaluri beginning the closing keynote of TechEd 2012
      IMG_0315
      The hype cycles that Microsoft is current riding
      IMG_0321
      The success stories of India – why India needs to seize the opportunity?
      1. Young Entrepreneurs
      2. Internet Growth – fastest growing 3G market
      3. One of the largest mobile user base
      4. Host of the one of the costliest sports – the Indian Grand Prix
      5. E-commerce
      6. Hollywood is now coming to Bollywood!
      IMG_0328
      The Microsoft Momentum
      IMG_0329
      Presenting the winners of the Windows 8 camp (Hyderabad and Bengaluru) with Intel laptops
      IMG_0339
      Some of the best and most re-tweeted tweets were presented with a gift
      IMG_0342
      The “Go DOs” – 3 key takeaways for all developers
      IMG_0214
      It was a privilege attending TechEd 2012. I will be back for TechEd 2013!
      Thank-you Microsoft!

      Until we meet next time,


      Be courteous. Drive responsibly.