Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pulling data from oracle

Status
Not open for further replies.

eja2000

Programmer
Nov 30, 2003
209
NG
i want to attach a db and only when that is successful, will i pull data from an oracle linked server into the newly attrached db..
my question is how can i query the state of the db before i pull data from oracle?
what i want to do is ONLY pull data if the attach was successful..
if the attach failed, i want to send an email to the apptporiate quarters..
thanks
 
Just try to query it, if you get a login failed/permission denied to the database it wasn't successfull.
 
I usually do a
select * from mydb..sysobjects

You can also look at master..sysdatabases but would need to check the status too.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top