cancel
Showing results for 
Search instead for 
Did you mean: 

After installing SQL Anywhere 12, unable to start database server

Former Member
0 Kudos

Hello ,

I was running my Asp.net MVC project with Sql Anywhere 16. i was created ODBC object and it was running perfect. Now due to some need i have installed Sql Anywhere 12. now my application is unable to connect database.

check below error i got when my application trying to connect to database.

System.Data.EntityException: The underlying provider failed on Open. ---> iAnywhere.Data.SQLAnywhere.SAException: Unable to start database server

   at iAnywhere.Data.SQLAnywhere.SAConnection.Open()

   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)

   --- End of inner exception stack trace ---

   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)

   at System.Data.EntityClient.EntityConnection.Open()

   at System.Data.Objects.ObjectContext.EnsureConnection()

   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)

   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

   at PDMSReporter.Controllers.AccountController.Login(LoginModel Login) in E:\Projects\Triforce_PDM Reporter\Latest_PDMSReporter\PDMSReporter\PDMSReporter\Controllers\AccountController.cs:line 48</ErrorType>

Please help to solve this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member194571
Active Participant
0 Kudos

Hi Umang,

Can you post the details of the ODBC data source you're using (dbdsn -g...) and / or ODBC connection string?

Do you connect to a local .db file or to a network server? My best guess is that you try to start a v.16 DB file with v.12.

HTH

Volker

Former Member
0 Kudos

connectionString="metadata=res://*/MainDB.csdl|res://*/MainDB.ssdl|res://*/MainDB.msl;provider=iAnywhere.Data.SQLAnywhere;provider connection string=&quot;UserID=MainDBA;DataSourceName=MainDB&quot;" providerName="System.Data.EntityClient"

I am sorry but i am not a SQL anywhere developer and this is my first SQL anywhere application.

If you need more detail please provide me detail syntax or guideline.

Thanks for reply.

chris_keating
Advisor
Advisor
0 Kudos

Can we get the info from the DSN MainDB. There is no meaningful information directly in the connection string posted. You should be able to exact that info via

     dbdsn -g MainDB

I would not expect that installing v12 would cause the "Unable to start database server" error that is being reported.

.

Former Member
0 Kudos

Hello Umang,

I suspect Volker is correct. From my research when we switched versions....

Engine

v12

v12

v16

v16

DB Version

v12

v16

v12

v16

16 Client

Y

n

Y

Y

12 Client

Y

n

Y

Y

All of which meanes that the v12 engine will not run a v16 database.

If the database was created in version 16, you might have to unload the structure and data, then load it into a database created with version 12. Any v16 features that appear in the script file would have to be edited out.

HTH, Paul

Former Member
0 Kudos
  • Steps to create ODBC object of database files.

Step 1) Open ODBC Data Source Administrator (32 bit) from All application.

Step 2) Click on to tab System DNS.

Step 3) Click Add button and select SQL Anywhere 12 and click finish.

Step 4) Now on ODBC Configuration for SQL Anywhere window, click to Login Window.

Step 5) Enter User ID of your database on User Id field.

Step 6) Enter Password of your database.

Step 7) On Action Tab select - "Start and connect to a database on this computer" option.

Step 😎 Browse database .db file from location.

Step 9) Click Ok. button.

Step 10) click on ODBC tab -> and enter Data Source Name for your reference and click on "Test Connection" button.

Step 11) if connection establish then click ok.

Step 12) Repeat step 2 -11, to add another database.


Above is the steps what i do to create my ODBC object for .db file. Actually my client was given me .db file of dabase which was created in SQL Anywhere 12. But i was developing my application in Visual studio 2012 and MVC 4.0 so it required Sql Anywhere 16. So i created ODBC object of .db file in Sql Anywhere 16 - ODBC Data source (64 bit).

Now due to some requirement i have to installed SQL Anywhere 12 and after installation i face above error.

Please help me.

former_member194571
Active Participant
0 Kudos

Umang,

If you have both v.12 and v.16 installed on your development machine, you can continue to use the .db file you've created with or upgraded to v.16, but you'll have to use a v.16 ODBC data source (which causes the file to be started with a v.16 engine).

If you have only v.12 installed, you'll have to unload (dbunload utility) the v.16 DB and reload it to a v.12 database. You'll have to do the unload on a machine where v.16 is installed, of course.

A workaround could be to start the database engine before connecting to the database (set it up as a Windows service, start it as an application from autostart, start it manually, ...) and set the ODBC data source up to "Connect to a running database on this computer", Following this approach, you may use the client version your application requires together with the server version the .db file requires. Since you mentioned s.th. about v.12 32 bit and v.16 64 bit, this approach also enables you to use a 64bit database engine with a 32bit client.

HTH

Volker

Former Member
0 Kudos

If i am going to set up ODBC with "Connect to a running database on this computer" option then from where it will look for my database file. I am sorry but i am beginner in Sql Anywhere so please guide me or provide me steps for that. As i have backup file of database with extention .db .

former_member194571
Active Participant
0 Kudos

In this case, your client won't look for the file but for the server. You'll have to start that server using the dbeng16 or dbsrv16 utility which accept the database file as a parameter:

dbeng16 C:\DB\Main.db

  (or wherever your .db file resides)

This will start a server processed with logical name "Main" operating a database with logical name "Main".

These names you should provide in the ODBC configuration "Login" screen, together with your userid and password, and by picking the "Action" "Connect to a running database on this computer". Specifying server and database name is optional if there's only one server with one database running on your computer, but if you don't, you may get into unexpected trouble again at a later point.

I understand that you're new to SQL Anywhere, but if you're that new, you really should RTFM occasionally, otherwise this might lead to an endless sequence of hints which require more hints.

There are few things that are worse than a system that doesn't run, and you don't know why. Having a system that runs and you don't know why is one of them.

HTH anyway

Volker