??? ??? ??????? ?????? ??? ?????? ?? ????? ????? ?????? ????? ???? ??????

?????? ????????? ?????? ?????????
???? ???????: 313295 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ??????? ????? ????? ????? ???? ?????? ???? ????? ?? ????? ??????? ??? ??????? ?????? ?????? ???? SQL.

?? Microsoft Data Access Components (MDAC) 2.6 ?????????? ??????, ????? ????? ????? ???? ?????? ???????? ??????? server name ?? ????? ???????. ????? ????? ????? ????? ???? ???? ???? ??? ??????? ?????? ??? ??????? ?????? ??? ??? ???? ???? ??????? ??. ???? ?? ???? ??? ?????? ????? ???? ??? ?????? ???????? ??????? ???????? ????? ??????? ?? SQL Server.

??? ???? ??????? ????? ??????? ???? ??? ??????? ???????? Osql ??????? ?? SQL Server ? ??????? ??? ??????? ????? ???? ??????? TCP/IP:
osql -Stcp:myServer,portNumber -E
				

????? ????????? ????????

???? ????? Microsoft Visual C# .NET ????????? ???????? ?????? ????? ????? ????? ???????. ????? ??????? ?? ??? ??????? ???? ????? ?? ????? ???? ????????:
using System;
using System.Data;
using System.Data.SqlClient;

namespace getCurrentProtocol
{
	/// <summary>
	/// Main Application Driver Class
	/// </summary>
	class Driver
	{
		static void Main(string[] args)
		{
			string sCxn = "server=myServer;Integrated Security=SSPI; database=master";
			//string sCxn = "server=np:myServer;Integrated Security=SSPI; database=master";
			//string sCxn = "server=tcp:myServer;Integrated Security=SSPI; database=master";
			//string sCxn = "server=rpc:myServer;Integrated Security=SSPI; database=master";
			//string sCxn = "server=lpc:myServer;Integrated Security=SSPI; database=master";
			string sCmd = "SELECT net_library from sysprocesses where spid=@@spid";
			SqlConnection cxn = new SqlConnection(sCxn);
			SqlCommand sqlCmd = new SqlCommand(sCmd, cxn);
			SqlDataAdapter sqlDa = new SqlDataAdapter(sCmd, cxn);
			DataTable dt = new DataTable();
			try 
			{
				sqlDa.Fill(dt);
				Console.WriteLine("Hit ENTER to continue ...");
				Console.ReadLine();
				foreach (DataRow dr in dt.Rows)
					Console.WriteLine(dr["net_library"]);
			} 
			catch (SqlException e)
			{
				Console.WriteLine(e.StackTrace);
				Console.WriteLine("SQL Error Number: " + e.Number);
				Console.WriteLine("SQL Error Message: " + e.Message);
				
			}
		}
	}
} 
				
????????? ????? ??????? "?" ???? ??????? ?????? ???? ???:
string sCxn = "server=myServer;Integrated Security=SSPI; database=northwind"
				

??????? ????? ??? ????? ?????? ??????

??? ????? ???????? ???????? ??????? ????? ??????? ???? ??????? ?????? ?????? ?????? ???? ??????:
  • TCP/IP:
    server=tcp:hostname
    ????? ???? ??????? ????? ??? ???? ????. ?????????? ???? ?????? 1433.
    server=tcp:hostname, portNumber
  • ??????? ??????? ???????:
    server=np:hostname
    ????? ???? ??????? ????? ???? ????? ????? ????.
    server=np:\\hostname\pipe\pipeName
    ??? ??????? ???? ??????? sql\query. ??? ??? ???? ???? ???? ??? ??????? ????? ???????? ??????:
    MSSQL $ instnaceName\sql\query
  • multiprotocol:
    server=rpc:hostname
    ????? ???? ??????? ????? ?????????? ???????.
    server=rpc:hostname, protocol
    ??? ????? ?????? ?????????? ?????????? ??????? ?????? ??????? ???? ??????? ??? ???? ?? ???? ???????? ???? ????? ???????:
    ?? ??? ??????????? ??? ??????
    ???????????? ???????
    ncacn_np??????? ??????? ???????
    ncacn_ip_tcp??????/??????? ???????? ???????? ?????? (TCP/IP)
    ncacn_nb_nb???? ???? ???????/??????? ??????? (NetBIOS) ??? ??????? ????? ???????? ?? NetBIOS (NetBEUI)
    ncacn_spx????? ????? sequenced (SPX)
    ncacn_vns_sppVINES banyan
    ncadg_ip_udp???? ???????? ???????? ???? ?????? ???????? (UDP) TCP/IP
    ncadg_ipx????? ??? internetwork (IPX) ???? ?????? IPX
    ncalrpc??????? ????? ??????

  • ?????? ???????:
    server=lpc:hostname
  • NWlink IPX/SPX:
    server=spx:hostname
  • VINES banyan:
    server=vines:hostname
  • ?????? Apple:
    server=adsp:hostname

?????

????? ?? ?????????? ?? ?????? ???? Microsoft ?????? ??? ?????:

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

???????

???? ???????: 313295 - ????? ??? ??????: 28/????/1426 - ??????: 6.5
????? ???
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2000 64-bit Edition
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.6 Service Pack 1
  • Microsoft Data Access Components 2.6 Service Pack 2
  • Microsoft Data Access Components 2.7
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Workgroup Edition
????? ??????: 
kbmt kbhowtomaster KB313295 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????313295

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com