SMO Server Connection Manager - Visual Studio Integration Project Error - Transfer Logins

  • Hello,

    I'm trying to copy logins from our production server to a development server. I wanted to use the "Transfer Logins Task". Both the production and dev servers are running SQL 2014. I downloaded the Visual Studio extension (?). When I try to setup a connection to ANY of our SQL server instances (by adding the Transfer Logins Task to the package, then double-clicking the task, and going into "Logins", selecting <New connection...> and putting the server name in) I get an error:

    "TITLE: Microsoft Visual Studio

    ------------------------------

    Failed to connect to server .

    ------------------------------

    ADDITIONAL INFORMATION:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------

    The system cannot find the file specified

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    Here is the full text of the error:

    ===================================

    Failed to connect to server . (Microsoft Visual Studio)

    ------------------------------

    Program Location:

    at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()

    at Microsoft.DataTransformationServices.Design.SmoConnectionManagerForm.buttonTest_Click(Object sender, EventArgs e)

    ===================================

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

    ------------------------------

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------

    Error Number: 2

    Severity: 20

    State: 0

    ------------------------------

    Program Location:

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)

    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)

    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)

    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)

    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)

    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)

    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)

    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)

    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)

    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)

    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

    at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

    at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)

    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)

    at System.Data.SqlClient.SqlConnection.Open()

    at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect(WindowsIdentity impersonatedIdentity)

    at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()

    ===================================

    The system cannot find the file specified

    I can connect through SSMS no problem. I also can connect to the server if I setup a ODBC connection. It's just the SMO object that seems to be the problem.

    I've verified named pipes is enabled, remote connections is allowed, and the ONLY thing that seems to not be configured is the SPN. Is that my problem or is there another issue someone can point me to?

    Thanks!

    Nick

  • Open

    SQL Server Configuration Manager | SQL Server Network Configuration | Protocols for <InstanceName>

    and verify TCP/IP protocol is Enabled. Enable it if not enabled, and restart SQL Server. Double click TCP/IP, and on the IP Addresses tab, note the TCP Port.

    No need to enable NamedPipes - it is simply the last Protocol a client will attempt when TCP/IP fails.

    Test again.

    At a command prompt on the SQL Server box, run

    IPCONFIG

    and note the IP Address.

    At a command prompt on the SQL Server client that is running SMO, run

    PING /a <IPAddress>

    Don't worry if this fails (pings can be filtered/blocked).

    Install Telnet on the SQL Server client that is running SMO, and from a command prompt run

    Telnet <IpAddress> <TCPPort>

    If Telnet returns a blinking underline, the SQL Server client should be able to connect to SQL Server.

    If an error is returned, seek help from a Network or Domain Admin, or search for possible causes.

    Don't worry about the SPN for now - Kerberos falls back to NTLM when no SPN exists.

  • SoHelpMeCodd,

    Thanks for those steps. I performed them and I was able to use telnet to connect to the remote server from the SQL client. I tired connecting to a different port (since I wasn't entirely sure the dynamic port number was correct) and I got an error. When I used the one I found in properties of the TCP/IP in SQL Server Configuration Manager it returned with blinking line like you said it would.

    So I think I can rule out that it's not the server that has configuration problem.

    Could it be something wrong with the visual studio configuration install? The install is different then BIDS or SQL Server Data Tools. Seems like both of those programs you could install from the SQL media, but now you have to download them separately? Maybe I was just asleep when I did that part of the install.

    I'll try reinstalling visual studio for now; unless you have any other ideas.

    Thanks!

    Nick

  • Also, tried uninstalling visual studio and reinstalling Visual Studio 2013 (with SQL Data Tools). Same error:

    ===================================

    Failed to connect to server . (Microsoft Visual Studio)

    ------------------------------

    Program Location:

    at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()

    at Microsoft.DataTransformationServices.Design.SmoConnectionManagerForm.buttonTest_Click(Object sender, EventArgs e)

    ===================================

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

    ------------------------------

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------

    Error Number: 2

    Severity: 20

    State: 0

    ------------------------------

    Program Location:

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)

    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)

    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)

    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)

    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)

    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)

    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)

    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)

    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)

    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)

    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

    at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

    at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)

    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)

    at System.Data.SqlClient.SqlConnection.Open()

    at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect(WindowsIdentity impersonatedIdentity)

    at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()

    ===================================

    The system cannot find the file specified

  • Hmm. All I can think of is to run Sysinternal's Process Monitor on the box while a SMO attempt is being made, to determine what file was not found

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply