0
我一直無法使用Win32 :: SqlServer成功連接到我的SQL Server(2005)。服務器位於另一臺機器上。我正在使用最新版本的ActivePerl和模塊。如何使用Win32 :: SqlServer遠程連接?
使用(在C#)的ADO.NET提供,我可以在連接字符串連接成功: Data Source=1.2.3.4,1553;Initial Catalog=dbname;User Id=username;Password=pw;
在努力將此轉換到Perl中,我已經嘗試以下:
my $conn = Win32::SqlServer::sql_init();
$conn->setloginproperty('ConnectionString', 'Data Source=1.2.3.4,1553;Initial Catalog=dbname;User Id=username;Password=pw;');
print $conn->connect();
同時,我已經嘗試設置服務器,登錄信息,以及初始數據庫單獨使用setloginproperty()。
這些都失敗消息的超時時間已經達到後:
SQL Server message 2, Severity 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Message 08001 from 'Microsoft SQL Native Client', Severity: 16
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Message HYT00 from 'Microsoft SQL Native Client', Severity: 16
Login timeout expired
Terminating on fatal error at mkadm.pl line 54