Solved

ODBC Call Failed Error 3146

Posted on 1998-10-12
6
380 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
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Clear out MSDB file in sql server 2 30
point in time restore in SQL server 26 41
Need sql in string 2 28
SQL Server Express automatically execute SQL or SP 8 27
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
I have a large data set and a SSIS package. How can I load this file in multi threading?
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

679 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