| Author |
Topic |
|
WalkerDA
Yak Posting Veteran
61 Posts |
Posted - 2004-07-28 : 16:08:12
|
| How can I bypass system-level errors? Here is an example, I don't want my proc. to stop, I want it recognize the error but to move on with the rest of the script. In this case the server is unavailable to query, so I want my calling script, which feeds the script that does the querying to get the next server to query and so on...Server: Msg 7399, Level 16, State 1, Line 1OLE DB provider 'MSDASQL' reported an error. [OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed][OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed][OLE/DB provider returned message: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12535: TNS:operation timed out]OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: ].Derrick |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-29 : 09:08:06
|
| Can we really have 2 Derricks?In Yukon the error handling is MUCH better.For now, you're hosed.What statement is failing?You can "pre-check" if an object exists, and if not handle it that way...But for a linked server...I don't know....How about xp_cmdshell and ping the box?Brett8-) |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-29 : 09:28:58
|
| It's sooooo confusing. I keep thinking I'm talking to myself. Then, he tells me I'm not, but I'm not sure who he is, so that doesn't really answer my question he's asking me anyway.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-29 : 14:30:13
|
| Just don't listen when he talks about dangerous instruments....Brett8-) |
 |
|
|
WalkerDA
Yak Posting Veteran
61 Posts |
Posted - 2004-07-29 : 14:48:39
|
| Pinging the box works out, good call..I'm working it into my procedure now... We have 13 boxes to check so it will add some time to our process but it's worth it... So in general however, system-level errors are just something that can not be programmed for or handled?So if I'm using bulk insert and something is wrong with the file, the process stops and I'm screwed... Any good news?Where are you guys located?Derrick |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-07-29 : 14:51:51
|
| Derrick ... Errrmmm ... WalkerDANot sure if it helps, but we use separate SProcs where this is an issue. If an SProc fails the caller generally carries on regardless (unless it does an @@ERROR check and chooses to abortKristen |
 |
|
|
WalkerDA
Yak Posting Veteran
61 Posts |
Posted - 2004-07-29 : 15:10:27
|
| I assumed that would work in my case, so I used the normalset @error = @@errorif @error <> 0begin print 'at least i made it this far'endit stopped at the error before it gets here which for system level errors is the case but the calling proc, which should indicate that an error occurred in the called proc fails as well... Generally the calling proc executes still but not in this case..I haven't spent much time investigating...Derrick |
 |
|
|
Pat Phelan
Posting Yak Master
187 Posts |
Posted - 2004-07-29 : 15:51:25
|
| Have you thought of using a DTS task that calls the various stored procedures? They are a bit more hardy when dealing with these kind of problems.-PatP |
 |
|
|
WalkerDA
Yak Posting Veteran
61 Posts |
Posted - 2004-07-29 : 16:04:30
|
| A good question..unfortunately, the project time out ways the project expectations..therefore, I haven't a clue of how to automate DTS and feed it paramters on the fly and the time that I have to kick this out was basically not enough. So in some cases I've used ActiveX scripts to get the job done where DTS may offer similar benefits. At some point I want to become a bit more familiar with it but outside the use of wizards I'm sunk..any good references or learning aids?Derrick |
 |
|
|
|