Saturday, February 22, 2014

Last modified Tables & Stored Procedures details in Microsoft SQL Server

Let's find out the last modified Tables & Stored Procedures details in MSSQL by writting a simple Query.

For User Tables
SELECT * FROM sys.objects WHERE type='U' ORDER BY modify_date DESC

For Stored Procedures
SELECT * FROM sys.objects WHERE type='P' ORDER BY modify_date DESC

These Queries fetching records from system object table order by last modified date & time.  

Friday, February 21, 2014

Enable remote connections for SQL Server Express 2012

  1. Run SQL Server Configuration Manager.
  2. Go to SQL Server Network Configuration > Protocols for SQLEXPRESS.
  3. Make sure TCP/IP is enabled.
So far, so good, and entirely expected. But then:
  1. Right-click on TCP/IP and select Properties.
  2. Verify that, under IP2, the IP Address is set to the computer's IP address on the local subnet.
  3. Scroll down to IPAll.
  4. Make sure that TCP Dynamic Ports is blank. (Mine was set to some 5-digit port number.)
  5. Make sure that TCP Port is set to 1433. (Mine was blank.)
(Also, if you follow these steps, it's not necessary to enable SQL Server Browser, and you only need to allow port 1433, not 1434.)