SQL Prompt cannot retrieve objects from . Possible Reasons

Provides intelligent code completion for SQL Server editors.

Moderators: Anu Deshpande, Aaron Law, David Priddle

SQL Prompt cannot retrieve objects from . Possible Reasons

Postby cmcnear » Wed Dec 18, 2013 10:19 pm

Working in Visual Studio 2013 with SQL Server database projects. Now whenever I attempt to open a .sql file within the projects I get the error indicated in the title for the first time I open each file.

Interesting to note is the server/database name is .

Also looking at the SQL Prompt log using the Show Log menu item I see the following information
Code: Select all
18 Dec 2013 20:13:00,810 [1] WARN  RedGate.SqlPrompt.Plugins.PromptPlugin - Automatic Refresh Suggestions plug-in disabled due to error
System.Data.SqlClient.SqlException (0x80131904): 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) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   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.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   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 RedGate.SqlPrompt.Plugins.AutoRefreshPlugin.AutoRefresh.#Wjzc()
ClientConnectionId:00000000-0000-0000-0000-000000000000

Additionally looking in the Event Viewer I see the following information(from earlier in the day):

Code: Select all
Log Name:      Red Gate Software
Source:        Ssms
Date:          12/18/2013 9:38:34 AM
Event ID:      32
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      cmcnear8770w7.int.appriss.com
Description:
RedGate.SIPFramework.Connect
#17:Failed to resolve assembly Microsoft.SqlServer.SqlEnum
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at System.String.Substring(Int32 startIndex, Int32 length)
   at RedGate.SIPFramework.Connect.#gqdd(Object #Zsf, ResolveEventArgs #ead)

Event Xml:
<Event xmlns=\"http://schemas.microsoft.com/win/2004/08/events/event\">
  <System>
    <Provider Name=\"Ssms\" />
    <EventID Qualifiers=\"0\">32</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime=\"2013-12-18T15:38:34.000000000Z\" />
    <EventRecordID>143</EventRecordID>
    <Channel>Red Gate Software</Channel>
    <Computer>cmcnear8770w7.int.appriss.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>RedGate.SIPFramework.Connect
#17:Failed to resolve assembly Microsoft.SqlServer.SqlEnum
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at System.String.Substring(Int32 startIndex, Int32 length)
   at RedGate.SIPFramework.Connect.#gqdd(Object #Zsf, ResolveEventArgs #ead)
</Data>
  </EventData>
</Event>



I am currently using version 6.2 of SQL Prompt and have submitted this error on several ocassions as it has been occurring for several versions.
cmcnear
 
Posts: 1
Joined: Wed Dec 18, 2013 10:11 pm

Postby Anu Deshpande » Fri Dec 20, 2013 11:10 am

Sorry for the error.

I have logged a support ticket for you and will email you shortly.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge


Return to SQL Prompt 6

Who is online

Users browsing this forum: No registered users and 0 guests