Saturday 29 March 2014

Using SQL Server database on other computer connected with LAN

By default Remote connections in SQL Server Express is turned off.
Just turn on the remote connections for SQL Express, enable TCPIP protocal and restart the service, check errorlog whether it's listening on all network adapters Now try to connect using the machine name (since it's dynamic) from the client pc
here is a step
  • Open SQL Server Configuration Manager
  • Select SQL Server Network Configuration
  • Chose your instance of SQL Server
  • Make sure that TCP/IP protocol is enabled
  • Right click TCP/IP protocol
  • Select properties
  • Click IP addresses tab
  • Scroll down to IP4. The IP address of the server should be here. Set active to yes and enabled to yes. Set TCP port to 1433
  • Scroll down to IPAll. Set TCP port to 1433
  • Make an inbound firewall rule for port 1433
  • open sql server management studio, right click server instance, properties->connections-> allow remote connections. Security-> SQL Server and Windows Authentication mode
  • restart sql server service
  • restart sql server browser
now use sql connection string COMPUTERNAME for E.g
data source=COMPUTERNAME;database=databasename;user id=sa;password=pass;" providerName="System.Data.SqlClient"
 
 
Reference Link:
http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx 

Thursday 20 March 2014

Update TFS workspaces

To update tfs workspace name with your computer name execute this line of code in visual studio command prompt.


C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>tf workspaces /updateComputerName:SUYPC073


/collection:http://asi-tfs-app01:8080/tfs/asi


For other tfs workspaces commands go to this link

http://msdn.microsoft.com/en-us/library/54dkh0y3.aspx

Total Pageviews