Catch a failed to connect in a script and allowing a new attempt

Hello
When we release new code we provide a control to the DBA script that runs all the data/DDL change scripts for different schemas. The script invites you to connect as the users involved to run each script.

for example, the control script is as
WHENEVER SQLERROR EXIT ROLLBACK

ACCEPT TNS_STRING PROMPT 'Enter Database Tns Alias:'

PROMPT login as SCHEMA1
ACCEPT PASSWD PROMPT 'Enter password for SCHEMA1 Account:' HIDE
CONNECT SCHEMA1/&PASSWD@&&TNS_STRING

@schema1_ddl.sql
@new_schema1_package.pks
@new_schema1_package.pkb

PROMPT login as SCHEMA2
ACCEPT PASSWD PROMPT 'Enter password for SCHEMA1 Account:' HIDE
CONNECT SCHEMA1/&PASSWD@&&TNS_STRING

@schema2_ddl.sql
@schema2_data.sql

-- etc
Sometimes the DBA type a password - for example, schema2 - and we are left with only half of a release. 'Procédures' mean they can't or don't edit the control file to comment made sections so it's a pain in the ass for them to get back to us, we change the script, we review the revised script, we get approval on change, etc.

We were wondering if there is a way to catch a connection failure in a SQL script and give them a try-I ruined my brain, but I can't think of anything. Anyone?

It is a 9i database and they run the scripts in 9i SQL * more.

You can tweak the autour logic and the first fetch and check the two apsswords. Then start running scripts.

not tested

WHENEVER SQLERROR EXIT ROLLBACK

ACCEPT TNS_STRING PROMPT 'Enter Database Tns Alias:'

/* testing connect to Schema1 */
PROMPT login as SCHEMA1
ACCEPT PASSWD PROMPT 'Enter password for SCHEMA1 Account:' HIDE
CONNECT SCHEMA1/&PASSWD@&&TNS_STRING

disconnect

/* testing connect to Schema2 */
PROMPT login as SCHEMA2
ACCEPT PASSWD2 PROMPT 'Enter password for SCHEMA2 Account:' HIDE
CONNECT SCHEMA2/&PASSWD2@&&TNS_STRING

disconnect 

/* work on Schema1 */
CONNECT SCHEMA1/&PASSWD@&&TNS_STRING

@schema1_ddl.sql
@new_schema1_package.pks
@new_schema1_package.pkb

/* work on Schema2 */
CONNECT SCHEMA2/&PASSWD2@&&TNS_STRING

@schema2_ddl.sql
@schema2_data.sql

-- etc

Published by: Sven w. on January 11, 2011 13:41 - change the formatting

Tags: Database

Similar Questions

  • Failed to connect to the Windows and WLM service does not

    Hi, I hope someone can help me.  When I turn on my laptop the message "unable to connect to a Windows service.  Windows could not connect to the Group Policy Client Service... "That would be the reason I can access is no longer my Windows Live Mail 2011?  I hope you can help, I did no progress so far with someone or something...  Thank you I have upgraded from Windows 7 to Windows 10 a few weeks ago.

    Hello Richard,.

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    For the Customer Service of Group Policy error, please refer to the suggestions of P.L.X. responded on February 2, 2013 and check if that helps.
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/why-wont-Windows-connect-to-the-Group-Policy/b73107f8-8447-4599-87a5-65ecc6a63aa0

    For cause of Windows live mail , I suggest you use the steps in this article and check if it helps.
    Reference:
    Windows Live Mail stops responding or does not start after the installation of KB2454826
    https://support.Microsoft.com/en-us/KB/2505524

    Note: Serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:
    http://Windows.Microsoft.com/en-us/Windows/back-up-registry#1TC=Windows-7

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Connection between the script and view

    I was seen by default budget should be periodic, and real for a YEAR. How to interpret it?

    Usually you specify the view anyway, so by default has no effect.  For example, "data extract" periodic offer / CDA / default scenario as three options.

    Are you sure that the person saying "Default View... "talked about the dimension of the view? Budget reports are most often (by default) presented as periodical data more 'Total year' and perhaps quarterly or semi-annual subtotals.  Actual expenditures appear more often for a YEAR.  Actual expenditures and Budget are compared, it is common to have six columns: three for the month underway (i.e. recurring) Budget / actual / Variance and three others for CDA Budget / real / Variance.

    Your question has been here a while unanswered so far.  I think maybe it's because the question can be understood in different ways and people don't want to waste time answering the wrong interpretation.

  • Bluetooth does not connect on iOS 10 and sierra OS

    I just bought an iphone 7, Apple Watch 2 and I updated my computer to sierra yesterday.

    I wanted to do the auto unlock with my watch, but my phone does not connect to the Mac with bluetooth. He wants to connect and the phone is displayed in the bluetooth settings, it says on my phone to pair if the numbers are the same, and then he "fails to connect. so im lost and I can't use my watch.

    I have reset my watch (by unpairing), iphone (by resetting all settings) and rebooted my computer.

    It seems that the "it just works era" is over for apple.

    If misery loves company, I'm here!  Just posted my new iphone 7 + setting BLUETOOTH is not 'discover' one of my devices (in 2015 Lexus and Bose radio/speakers).  In addition my iPad and iPad air are also not 'discover' devices!  I think that this happened once I installed the latest ios 10.0.2 software on all my devices.  Please reply if you receive some 'advice' from someone in the "know"!  Thank you!

  • It says attempts to connect to the server and will not download installation

    It says trying to connect to the server and download any new installation

    Please read https://forums.adobe.com/thread/1499014

    -try some steps such as changing browsers and disable your firewall

    -also clear the cache of your browser if you start with a fresh browser

    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip.

    http://helpx.Adobe.com/creative-cloud/KB/failed-install-creative-cloud-desktop.html

    or

    A chat session where an agent can remotely look inside your computer can help

    Cloud creative support chat (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Cannot get mail that failed to connect to my server

    Cannot get mail

    Failed to connect to my server

    Hello parkspa,

    Thank you for using communities Support from Apple. I know have a problem with Mail on your iPhone, it's not what you expect. The good news is the next article will be useful for troubleshooting and solving your problem and get email working again on your iPhone:

    Get help with Mail on iPhone, iPad and iPod touch

    See you soon!

  • Failed to connect, what is my password to overcome this problem?

    Failed to connect to the server imap - mail.outlook.com ; Enter the new password. A new password has been entered, but nothing happened.

    Email passwords are between you and your email provider. Nobody here knows your password.
    The best solution is to find a reliable perspective of supplier and dump. There someone here on all the other days with the same problem with outlook.

  • Get the "Failed to connect to server" error after having my hosting of emails expire and reconnected. Using the latest version of Thunderbird.

    Hi, I am probably doing something really basic and easy to fix but facepalmingly pls have patience with this n00b...
    My emails with Crazy Domains Hosting has expired a couple of months, I've just managed to get it reconnected.
    When I open Thunderbird once again, I kept getting the error msg "Failed to connect to server".
    I checked all the settings for the account, they are all fine as far as I KNOW. Updated to the latest version of Thunderbird, tried to restart the program and doesn't have the obligatory IT Crowd "troid torning it and turn it on again", still get the same message.

    Plaaaaiiss... Halllp!

    Regardless of my fault for typing. What is important is that there is nothing in the DNS or whois on the domain.

    Look at their own whois server it shows pending deletion, expired in April. http://www.crazydomains.com.au/WHOIS/littleredfoxdesign.com/#result

    Until these public information are corrected your not likely to be able to connect because Thunderbird can not find the server. There is no DNS records to point to it.

  • Envy 15: HP Envy 15 - Intel 7265 - WiFi fails to connect

    Hello

    I have a HP Envy who came with 10 windows and has an Intel WiFi 7265 card. I started the Setup program and was able to see WiFi connections and connect to the office and two - House. Once all updates completed, I usually used it between the two locations of WiFi - both work very well. However on a trip, I tried to connect to other WiFi and since tried about 6 different options and all fail - "Connecting" message shows, then disappears and no connection was made.

    Different wireless devices include a 2Wire, Dlink, Cisco Enterprise Access Points, Access Points, a three hotspots different telephone based. All do the same thing.

    Steps for debugging:

    (1) update driver. HP site has a driver from March 2016.

    (2) installed the driver Intel AC-7265 from 09 20, 2016.

    (3) change the settings for the favorite band at 2.4 GHz and also at 5 GHz and neither make a difference - DLink business devices and Cisco work in both frequencies.

    (4) change the widths of 801.11 channels to 20 MHz only.

    (5) changed "wireless mode" in the pilot of 802.11 a, then g, then a / g and back to the default a/b/g value.

    Done everything above with the disabled on Bitdefender firewall.

    None of these worked, shaped so I'll post here, to see if maybe someone else has had something similar and did get a resolution.

    Any help is appreciated.

    Hello

    I finally get a resolution - not really a resolution, but at least my WiFi working properly I can say - I ended up factory restore.

    In essence, it is a workaround, because everything that triggered the issue could not be overturned and fixed. Had to spend the whole weekend to get my data/apps etc put in place again, which is exactly what I wanted to avoid.

    I think someone else can begin to rebuild their system instead of having to try all the options we've been through here and save themselves a lot of hours of frustration.

    Thank you.

  • Cannot connect to the system Windows - user profile service failed to connect

    I can't connect my laptop for the 1st time

    I get an e-mail from the user profile failed to connect

    User profile cannot be loaded

    Ideas please

    If you have a Toshiba SSD in your laptop there is a problem in windows 7, making it impossible to connect to the system when the storage TOSHIBA utilities are installed. In this case, you will need to find a way to get the system and uninstalling.

  • Utility of fingerprinting Toshiba - "Failed to connect to the sensor.

    Having a problem with the Toshiba fingerprint utility. The program works fine until I try to use any sort of firewall/antivirus program, even the built-in Windows Firewall: S the scanner still works fine for the boot time scanning, as well as for windows logonm but as soon as any kind of firewall/antivurus software loads up, it fails to connect on the sensor. I added the program to the lists allow but still nothing... So far I tried with AVG Internet Security, Outpost Security Suite and by default, the Windows Firewall. Windows Firewall turned on for awhile, I got when I bought the laptop and there was no problem.

    It's a Qosmio X 500 - 00 X, it uses the same installation of windows when I bought...

    See you soon!

    Hello

    Please update the software of fingerprint. You can find it here:
    http://EU.computers.Toshiba-Europe.com-online decision-making supported Downloads & => Download drivers

    Also try a different firewall and AntiVirus. I have good experiences with AntiVir and Kaspersky Security Suite.

  • Drive not work in IE and saying failed to connect with fingerprint sensor

    Hi all

    I purchased a Qosmio x 500 10 t a couple of months back. For the first two weeks, I had no probs using the fingerprint reader to log on windows and connect to Web sites in Internet exploer.

    All of a sudden it would not work on any website that is stored. The Green banner was shown in the upper part of the site and asked finger drag, but nothing happened when I slipped. I rebooted and it worked again but not for long before failing. This time a restart didn't work so I deleted my fingerprints and Web sites and started from scratch. It worked for a few attempts before probs started. And to try to enter the utility of fingerprint it says the connection of sensor failure. So, I did a system restore. He worked for some time yet and then same probs. So I found the update utility software, uninstalled the old and put on the new. Even once worked for a couple of times then failed.

    I couldn't find anything about it is stuck in the registry but to be on the safe side I did a full system own return to the original using disks of backup configuration. Hey presto, I thought that he had worked. Everything goes ok for the first 24 hours and then same problems start to occur. Only this time it's also prompting me to register fingerprints even if I already have. And when I try to enter the utilioty it says cannot read the sensor again.

    The fingerprints for windows log still works as long as I do not close the utility of fingerprinting before stopping. If I quit the utility I can't reopen it as it says failed to connect to the sensor only. And then I have to uninstall and reinstall the utility software. Aty at the time where he occasionally works on sites stored Web, but most of the time it does nothing.

    Help, please. I have to return Toshiba laptop?

    Have you seen this FAQ?
    + Log on to websites with Authentec Fingerprint Software (TrueSuite) and Internet Explorer 8 +.
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=62

    I recommend looking in the forum and read the HowTo and FAQ section in this forum
    Could still be interesting

  • My iPAD asks me to update to OS 9.3, but the update fails because it says that the iPAD is not connected to the internet and when I connect to my computer iTunes it say my OS is up to date.  Help, please.

    My iPAD asks me to update to OS 9.3, but the update fails because it says that the iPAD is not connected to the internet and when I connect to my computer iTunes it say my OS is up to date.  Help, please.

    I'm surprised to hear that for an iPad 2 that the issue had apparently been set for 2 s. Please see this for more details as I know them. Maybe the servers at your site have not been updated yet for the new version of the iPad 2.  ???

    Apple released the update iOS 9.3 for older devices (air of iPad and previous iPhone, 5 s and previous) due to problems with Activation. See the following for details and possible solutions.

    http://www.IMore.com/Apple-working-iOS-93-fix-older-iPhone-iPad

    https://support.Apple.com/en-us/HT206203

    A new version for the iPad 2 is now available which does not require the activation step. A new version for other devices is not yet available.

  • Satellite L855 - 11 p: Win 7 - user profile Service failed to connect

    Can not connect. The message reads user profile Service failed to connect. User profile cannot be loaded"

    Y at - it a bypass key?
    Ideas please.

    Fine machine when I logged out/shut down last night but can not pass this message today.

    Hello

    Please take a look here in this Microsoft Knowledge base article:

    [You receive a "the user profile Service has no logon error message:"] http://support.Microsoft.com/kb/947215]

    There are different ways to fix it.

    Your comments would be appreciated.

  • Tecra A10 with Intel WiFi 5100 running Vista 32 bit fails to connect WiFi

    Hello

    a whole new Tecra A10 with buildin Intel 5100 WiFi fails to connect to the Wlan router, using the pre-installled Vista Business 32-bit. Vista has always said: wrong password.

    Yes, Wifi hardware is enabled, of course. And Tecra WiFi OK MAC is stored in the config of the router. Also the WiFi settings were correct (wpa2-psk aes), corresponding to the Wlan router. Password WPA2 is 13 characters. Connect all the other machines with a Wlan successfully turns a working Wlan configuration and use of the correct password.

    I installed the latest driver on the Toshiba site - without success. I also installed the version of the driver from the Intel site will, too--without success. Doesn't matter what tool I used to connect, Vista itself, or the specific tool of Toshiba (Radar), choice to get an encrypted Wlan connection.

    WPA2 and WPA or WEP can be used. I can't get a Wlan connection when encryption is totally * disabled *! Currently, I use a * clear * Wlan to use this Tecra A10 in the network. Real gross and no solution for more than a few days.

    All other devices in the same network can connect the router Wlan with WPA2-PSK and WEP, no problem. Only the A10 / WiFi 5100 fails.

    Searching the Web I found really many reports all issue of WiFi with a WiFi 5100 devices, so it seems to be a generic material or / and driver issue.

    How can I correct this Wifi 5100 connect problem and use encryption WPA2-psk on Tecra A10 and WiFi 5100 with Vista? If this is not possible, I have to return this laptop and get another model with a working Wifi / Wlan Hardware.

    Thank you.
    -Thomas

    Hello Thomas

    Have you tried to connect your laptop to another router by friends or elsewhere?
    It is really strange that you can use any of the WIFI ciphers available.
    Have you tried to reboot your router?

    I have Satellite A300-1LI with the same card, WLAN, preinstalled with Toshiba recovery WXP image and I use it sometimes linked to the WLAN with WEP encryption.
    Have you tried to contact Toshiba or your local dealer for advice?

Maybe you are looking for

  • synchronize contacts

    I have synced successfully Thunderbird with e-mails that I get gmail. Can I also synchronize all incl. phone numbers. contacts and photos?thx for a tip!

  • Update the BIOS on Sat A60 - error box appears

    I need help please? I just downloaded the latest version of the bios for my A60 PSA67E, who is 1.90. I registered and then extract the files, then it is said to run. The extracted file shows an open with osaka 20v190 on this box. I used extract right

  • Satellite in the series C - need to continue to move mouse to refresh the screen

    When the laptop is on the internet and update/refresh of the screen, if I keep moving the mouse, the refresh is very slow or stops. This happens on another PC Toshiba laptop I know. I have windows 7. Clues? Thank you

  • Antennas and detection of WSN

    Hello I'm trying to observe the activity of the network of the Starter Kit WSN using a WiSpy 2.4 x (http://www.metageek.net/products/wi-spy-24x). What I do now is I have restart the gateway of MAX (I tried channel 11-24) and then begin to record the

  • Boolean text of multiple buttons

    Is there an easier way to read several Boolean texts? Possibly by a loop for, but would need to be able to change the reference to accomplish this task.