SQL Server does not exist or access denied.

Posts   
 
    
Reginald
User
Posts: 24
Joined: 20-Jan-2006
# Posted on: 09-Nov-2009 00:30:29   

I get the error message below. I'm using Vista on a 64-bit box. I'm trying to connect to Sql Server 2008 (full instance). I've also got SqlServer Express installed. I've read a number of posting in the forums on this error but nothing works. It will correctly connect and list all the databases but after I select one and click create I get this. It seems to hang on retrieving schema 'db_accessadmin'. Everything else can connect just fine such as Sql Server Mgmt Studio, Visual Studio 2008, etc.

I've tried....

-rebooting -running llblgen as admin -opening ports 1433 and 1434 on firewall -turned firewall off -accessing server by localhost -accessing server by computername -windows auth -sql server auth (sa account)

Driver Version: 2.6.07292009

Message: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

StackTrace: -----[Core exception]-------------------- at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerSchemaRetriever.RetrieveSchema(String connectionString, IDBSchema schemaToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties) at bf.d()

Source: Microsoft OLE DB Provider for SQL Server

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 09-Nov-2009 09:59:00   

Is this a persistence/consistenet error?

Would you please try to reboot the machine?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39862
Joined: 17-Aug-2003
# Posted on: 11-Nov-2009 10:07:52   

Strange. The name you specify for server, do you specify .\SQLEXPRESS or something like that? As you have two versions installed, you have to specify a name for the service.

Frans Bouma | Lead developer LLBLGen Pro
Reginald
User
Posts: 24
Joined: 20-Jan-2006
# Posted on: 11-Nov-2009 12:51:09   

Got it working now. Rebooting did the trick. Weird but I rebooted before and it worked for a test DB but then when I tried to connect to the real DB that's when it failed. This time I rebooted and let the real DB be the first DB I connected to and it worked. Weird but I'm cool now. Thanks!

Reginald
User
Posts: 24
Joined: 20-Jan-2006
# Posted on: 17-Nov-2009 16:17:55   

I'm back in the dog house now. disappointed

It wont connect again. This is the most frustrating thing. It is beyond me how this app can connect to the server based on the SA account and retrieve all the table information, etc but not connect to retrieve anything else.

I rebooted my computer but it had no effect this time.

Same error msg:


[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.


-----[Core exception]--------------------
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.OleDb.OleDbConnection.Open()
   at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerSchemaRetriever.RetrieveSchema(String connectionString, IDBSchema schemaToRetrieve, SchemaFetchFlags fetchFlags)
   at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags)
   at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties)
   at aj.a(Boolean A_0, Hashtable A_1)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I even uninstalled SqlServer 2005 with no luck. I then stopped some unused SqlServer processes from my Services and set them to "manual" startup. This didnt work either.

Again, I'm on a 64-bit Vista box.

Please help fast as my trial days are dwindling fast.

-Reginald

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39862
Joined: 17-Aug-2003
# Posted on: 17-Nov-2009 17:01:35   

It's likely some firewall issue but I don't know what causes it to work sometimes but not always. The OleDb connection is used in our 2.6 driver for obtaining some data which is easy to obtain through the OleDbConnection's GetOleDbSchemaTable, and harder to obtain through native system table queries, hence the OleDbconnection and why all the other data is read OK, and it fails in this situation.

We use as connection string the same connection string as for the SqlConnection, with a prefix "PROVIDER=SQLOLEDB;", however as it's OleDb, it will connect through a different route than SqlConnection, and there the problem is likely caused by.

SqlServer 2005 comes with a service configuration, could you check please if the access to the service is opened for connections from the outside?

Also, if it fails, could you try in a little .NET console app the following code snippet: OleDbConnection con = new OleDbConnection("Provider=SQLOLEDB;data source={0};initial catalog={1};User ID={2};Password={3};persist security info=False;packet size=4096"); con.Open();

where you replace {0} with the server name, {1} with the catalog to connect to, {2} with the user, {3} with the password. That snippet above should give the same error.

Frans Bouma | Lead developer LLBLGen Pro
Reginald
User
Posts: 24
Joined: 20-Jan-2006
# Posted on: 17-Nov-2009 17:23:14   

Up and running now. I went to the sql server configuration manager. Then went to Sql Server network configuration. Then under protocols I noticed that TCP/IP was disabled. I enabled it and poof, it worked!

I think this may be the long running issue here.

I'm good for now.

Thanks for the quick response.

I cant tell you enough how much a timely response does wonders for a company.