LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by AKRRKA » Tue 23 Jul 2013 16:01

Hello,

I have a problem with check DatabaseExist() for MS SQL Server 2008 R2 (with MySQL all work)

When call function DatabaseExist(), get error:
System.Data.SqlClient.SqlException was caught
HResult=-2146232060
Message=Ошибка входа пользователя "sysdba".
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=14
LineNumber=65536
Number=18456
Procedure=""
Server=10.5.56.177
State=1
StackTrace:
в System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
в System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
в System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
в System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
в System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
в System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
в System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
в System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
в System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions)
в System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
в System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
в System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions)
в System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)
в System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
в System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
в System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
в System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
в System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
в System.Data.SqlClient.SqlConnection.Open()
в Devart.Data.SqlServer.Linq.Provider.SqlDataProvider.DatabaseExists()
в Devart.Data.Linq.DataProvider.y()
в Devart.Data.Linq.DataContext.DatabaseExists()
в ceDataSource.Model.DataSource.ComandCheckReferences() в d:\Repository\mvp\source\ceModules\ceDataSource.Model\DataSource.cs:строка 508
InnerException:
Other function like Create, Delete, Open and get data from database worked, but this don`t.

PS: For user "sysdba" set roles - "sysadmin", "serveradmin", "public", "dbcreator".

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by MariiaI » Thu 25 Jul 2013 09:56

We couldn't reproduce this issue on our environment. Could you please specify the following details:
- the connection string you are using;
- all settings for user "sysdba" in addition to Server Roles(create script, General, User Mapping, etc.)

AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by AKRRKA » Fri 26 Jul 2013 11:04

ConnectionString = data source=10.5.56.177;initial catalog=chel9;integrated security=False;persist security info=False;user id=sysdba;password=passwordsysdba
ProviderPrefix = SqlClient
Create Script for user sysdba:
/* For security reasons the login is created disabled and with a random password. */
/****** Object: Login [sysdba] Script Date: 07/26/2013 14:59:19 ******/
CREATE LOGIN [sysdba] WITH PASSWORD=N'ååbh*×C op¡I+îBi4p»B˜ú…GO

ALTER LOGIN [sysdba] DISABLE
GO

ߋÐ', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[русский], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
What exactly features you need?

Try on behalf of sa, the same problem!
data source=10.5.56.177;initial catalog=chel9;integrated security=False;persist security info=False;user id=sa;password=passwordsa

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by MariiaI » Fri 26 Jul 2013 13:13

Thank you for the additional information. We have reproduced this issue. It occurs when connection string parameter Persist Security Info is set to False. We will investigate this behavior and inform you about the results as soon as possible.
As a solution please set the Persist Security Info parameter to True in your connection string.

AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by AKRRKA » Mon 29 Jul 2013 13:48

Yes, it works.
This is not a good way out. In my application, the user chooses to save the password or not.
I can not force him to save.
It is waiting solve the problem.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by MariiaI » Tue 30 Jul 2013 09:32

We will definitely inform you when any results on this issue are available.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by MariiaI » Tue 20 Aug 2013 06:11

The bug with performing the DatabaseExists() method when Persist Security Info is set to False is fixed. The fix will be included in the next build of LinqConnect. We will inform you when it is available for download.

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Re: LinqConnect Professional Version 4.2.272 (20-Jun-2013) - SQl Server dont check DatabaseExists

Post by Helen » Fri 06 Sep 2013 07:34

New build of LinqConnect 4.2.327 is available for download now!

It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=27873 .

Post Reply