Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2003
    Posts
    5

    Unhappy Unanswered: Access denied sometimes

    I use C#, .Net to connect to SQL Server2000 and Sybase to do work in the program:
    1. Connect to SQL Server;
    2. Connect to Sybase;
    3. Connect to SQL Server again;
    the program runs every 5 miniutes. But sometimes it displays error message in the 3rd stepystem.Data.OleDb.OleException:[DBNetLib][ConnectionOpen[Connect()].]SQL Server does not exist or access denied.

    just how it goes?
    Note: It does not display the error message always, DO just sometimes. Such as It can run properly the first time with all the three steps, but failed when the 2rd round goes. Why?

    any help would be really appreciated!
    thanks u.

    Jeff

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    What is the default netlib used?
    Any firewall involved?
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    also, what have you observed when running SQL profiler?
    Paul Young
    (Knowledge is power! Get some!)

  4. #4
    Join Date
    Apr 2003
    Posts
    5
    1. sorry, i know little about dbnetlib, i just notice the connectionstring was assgined to IDBConnection. Is it ole or sql or something about?
    2. no firewall.

    3.it was failed in the production server, after several failure, the program was replaced with the old version. at that time i didn't use sql profile to observe it.
    maybe i can try this.

    thanks you all.
    Jeff
    Note: erver time it runs, the error message display with the 3rd step only. And i have remembered that the first time it runs properly.

    thanks.

  5. #5
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    May be my post should be elaborated, netlib is the default client network library used on Server. You can get details from Programs --> MSSQL 7 ---> Server network utility.

    As Paul referred by running PROFILER you will get details during this process and where its failing with error.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  6. #6
    Join Date
    Apr 2003
    Posts
    5

    Exclamation

    thank u satya.

    i don't know what's the default netlib i used. It was installed in a machine i have no account to login in.

    I used oledb to connect to it, maybe the netdblib is tcp/ip, i think.

    when i run the 3rd step independently, the error message display again.
    yes, i used sql profile and got the following:
    the program got too many row data that would be imported into sql server. but due to the business logic, every row data should be checked from the sql server whether or not it can be added into. the db connection has beed designed to new and close a new transaction and connection each time for every check.
    in the profile, or it goes right, or when the error message displays, it stopped at random row data -- i ran the program serveral times.
    i also notice the memory goes up quickly, the test data i used took at about 350M memory. and i also noticed that the error goes up, the system (i don't know what it is, but maybe the .net framework) is so busy, the usage memory is decreasing, every thing gots so slowly, after a while, the error message displays. ps: the error display at random position row in the data or the program goes right with no error displays.

    thanks again, sayta.
    I'm still figuring out the reason... Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •