Solved

ODBC Call Failed Error 3146

Posted on 1998-10-12
6
382 Views
Last Modified: 2012-06-21
I'm using SQL 6.5 under WinNT. When I try and add/delete information from my database I keep getting an ODBC call failed error. I have truncated the log and though it looks empty when I run a dbcc checktable(syslogs) and dbcc sqlperf (logspace) when I say edit DB it still looks as full as it was. I've truncated, restored from a previous backup, but no luck. I am NOT a sql expert so any help would be appreciated.
0
Comment
Question by:popnetworks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:spiridonov
ID: 1090501
What application are you using to add,delete records? Do you have enough permissions? Are you logged in as sa? ODBC call failed is only a generic first part of the error message, there should be second part containing error returned by SQL Server.
0
 

Expert Comment

by:tunct
ID: 1090502
3146 is something like a timeout error code... I usually got it when the db was full or the server was performing a heavy task.

The transaction log fills up quickly if you have large transactions (logical, ain't it :). So you may choose to "truncate log on checkpoints", which means, after each successful transaction, the log is discarded.

T.
ps: Is the log on a separate device?
0
 
LVL 2

Expert Comment

by:mkmccreary
ID: 1090503
If I remember correctly, 'Truncate Log on Checkpoint' it only truncates the log after a dump to the last successful transaction before the checkpoint.  What may have happened is you have a hung transaction in the log.  If this transaction is at the end of the log, it will not truncate properly.  I've had this problem before, and I'm trying to remember how I fixed it.  I want to say I dumped the database, dropped the database and its devices, and then recreated it from scratch.  Not a good solution, though.  I will continue to think about it.  You may want to see what the way is to determine the hung transactions in the log, and how to clear them.  I think that will get you on the right track.

Later,
Martin
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:popnetworks
ID: 1090504
Yes, I was logged in as sa, did have enough permissions and was using a VB created client application to access the server. I checked both the server and operating system logs but could not find other information on the error. The log was on a separate device. Yesterday I had it and deleted everything, reinstalled SQL, installed Service Pack 4, recreated my database and log devices and recreated my database from a recent backup. I deleted old tables and rows from my db as it had grown to over 1gb (probably not the best idea but it was info I didn't need), I truncated the log (again) and performed some dbcc commands to check the status of the tables and logs. I did get the message that the number of data pages and rows in my Sysindexes were corrected from some awfully large numbers to 1 and 12 respectively. Now I seem to be ok. I did make sure the truncate log on checkpoint was active and I'm HOPING I won't get this error again! Any additional thoughts? (besides to upgrade to 7.0 when it comes out?)
0
 
LVL 7

Accepted Solution

by:
spiridonov earned 50 total points
ID: 1090505
>>3146 is something like a timeout error code.

ODBC call failed error 3146 is a generic error it might be timeout, but it might be as well almost ANY OTHER ODBC related error. You ust cycle through Errors collection to determine REAL error. The code, that shows how to do it in VB is shown in MS Knowledge base article Q161288.
0
 

Expert Comment

by:xzeina
ID: 1090506
i have encountered this problem before, but i do not know why it happenned.,in fact, i couldn't add any new row in the table,,,
what i have done is the following :
for example if the damaged table name is "table1"
-first , go to sql enterprise and rename this table to "otable1"
 -then go to Ms Query and write down the following

select *
into table1
from otable1
 THIS CODE WILL create a new table from the old one
-After creating table1, goto sql server enterprise, select table1 and reestablish its primary key...
hoping it works..
regards
zeina
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question