SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On



SQL User Authentication Expand / Collapse
Author
Message
Posted Tuesday, November 17, 2009 12:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 19, 2009 8:55 AM
Points: 3, Visits: 22
Hi,
Im new to SQL and am really struggling with this problem.

From a VB application(a SCADA package) I am opening a connection to an SQL database to run a report - the connection code opens fine (ODBC). I am using Windows Authentication. The User that is launching the report is a domain user. This Domain user is part of a Domain Users groups on SQL.

On running report after approx 30-45 seconds I get the following error
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Write (send ()).
However If I create the Domain account in SQL rather than depending on it being recognized as part of the Domain group than this error dose not occur and report launches within seconds. This is an intermittent error. So at times its seems that that it cannot authenticate the user with the domain controller.

Hope someone can shed some light on this for me

Thanks
Ant
Post #820298
Posted Tuesday, November 17, 2009 12:25 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 18, 2010 2:19 AM
Points: 2,022, Visits: 3,594
Hi

First, why do you use ODBC? If you work with VB.NET use SqlClient. If you work with VB6 you should use ADODB.

Second, did you try to install the latest drivers?

Greets
Flo



The more I learn, the more I know what I do not know

How to Post Data/Code to get the best Help"Numbers" or "Tally" Table
How to Post Performance Problems
Post #820307
Posted Tuesday, November 17, 2009 1:27 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 19, 2009 8:55 AM
Points: 3, Visits: 22
Hi Florian
Thanks for reply -Im not using VB NET or VB6 - just VBA. I am opening connection
using ADODB. All the latest drivers are installed. The connection always opens
without error. The problem seems to be when SQL has to authenticate with the domain
I am unsure how to even test if this is problem...
Ant
Post #820363
Posted Tuesday, November 17, 2009 1:39 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 18, 2010 2:19 AM
Points: 2,022, Visits: 3,594
Hi Ant

Disclaimer: My last VBA is about ten years ago

If you use ADO you should use OLEDB instead of ODBC. Give this connection string a try:
Provider=SQLOLEDB.1;Data Source=YourServer;Initial Catalog=YourDatabase;Integrated Security=SSPI;

To your error:
If I'm correct ADODB has (just like ADO.NET) a default command timeout of 30 seconds. There must be a property on your command or connection object which allows you to set "0" (zero) what usually means run forever.

Hope this helps!
Flo



The more I learn, the more I know what I do not know

How to Post Data/Code to get the best Help"Numbers" or "Tally" Table
How to Post Performance Problems
Post #820375
Posted Wednesday, November 18, 2009 8:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 19, 2009 8:55 AM
Points: 3, Visits: 22
Hi Flo
Tried using OLEDB but this time the error is
[DBNETLIB]ConnectionWrite (send()) General Network Error Check your network documentation
Again it is intermittient at times it cant authenticate...
Post #820865
« Prev Topic | Next Topic »


Permissions Expand / Collapse