Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ODBC Call Failed Error 3146

Posted on 1998-10-12
6
Medium Priority
?
384 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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 

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 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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

722 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