multicloud365
  • Home
  • Cloud Architecture
    • OCI
    • GCP
    • Azure
    • AWS
    • IAC
    • Cloud Networking
    • Cloud Trends and Innovations
    • Cloud Security
    • Cloud Platforms
  • Data Management
  • DevOps and Automation
    • Tutorials and How-Tos
  • Case Studies and Industry Insights
    • AI and Machine Learning in the Cloud
No Result
View All Result
  • Home
  • Cloud Architecture
    • OCI
    • GCP
    • Azure
    • AWS
    • IAC
    • Cloud Networking
    • Cloud Trends and Innovations
    • Cloud Security
    • Cloud Platforms
  • Data Management
  • DevOps and Automation
    • Tutorials and How-Tos
  • Case Studies and Industry Insights
    • AI and Machine Learning in the Cloud
No Result
View All Result
multicloud365
No Result
View All Result

Deploy updates to a number of Oracle Databases, concurrently

admin by admin
May 9, 2025
in OCI
0
Deploy updates to a number of Oracle Databases, concurrently
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter


Oracle Database contains many free utilities and mechanisms to work together together with your database and knowledge. So whenever you get requested ‘tips on how to do one thing?’ it’s fairly frequent to listen to, “properly, it relies upon.”

At present I’m going to reveal tips on how to ‘kick off a script’ on 5 completely different databases, from a single occasion of our command line utility, SQLcl.

The script

That is the unit of ‘work’ you need to have executed in your group of databases. My instance is tremendous easy, substitute it together with your use case as wanted.

PLSQL

join -name "hr 🟢"
start
 dbms_session.sleep(60);
 dbms_output.put_line('finished');
finish;
/
disconnect

This script mainly connects to a database, takes a 1 minute nap, after which writes a message saying, it’s finished. And we shut our connection as a ultimate ‘goodbye.’

The SQLcl instructions we will probably be utilizing

  • background (bg) – kicks off a background job
  • jobs – reveals your duties, their standing, and lob location

You should utilize the ‘assist’ command to get the total syntax with examples.

Kicking off the roles

I’ll be doing this, interactively on the immediate, issuing the background command with the title of the script I need to run. For automation duties this is also finished as a script, which might require zero hands-on.

Bash

SQL> bg -tn Stuff10 @script.sql
Began job with id: 7
SQL> bg -tn Stuff11 @script.sql
Began job with id: 8
SQL> bg -tn Stuff13 @script.sql
Began job with id: 9
SQL> bg -tn Stuff12 @script.sql
Began job with id: 10
SQL> bg -tn Stuff14 @script.sql
Began job with id: 11
SQL> bg -tn Stuff15 @script.sql
Began job with id: 12

-tn is shorthand for -taskname – it makes it simpler to see what’s what whenever you use the Jobs command to work together with a particular background job.

So whereas that is operating – I’ll have lower than a minute to seize this – I can swap over to VS Code and use the SQL Developer Periods report to simply see, what’s what.

All however a type of classes belong to SQLcl, we are able to see all of them have the identical SQL_ID, which is smart, as they’re all operating the very same PL/SQL block. I can affirm this by observing the ‘Lively SQL’ panel within the report.

Which certainly mirrors the PL/SQL script we now have within the aforementioned code.

With refresh set on, I can observe the standing of the classes altering after which quietly going ‘goodbye’ as they disconnect from the database.

Checking to see what occurred

We are able to assume the whole lot labored properly, however I’d by no means assume that. Let’s verify one of many logs.

First, use the Jobs command to see what’s operating, and what’s out there for logs.

Bash

SQL> jobs
 ...
 7: [ Finished ] Stuff10 (/Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff10.log)
 8: [ Finished ] Stuff11 (/Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff11.log)
 9: [ Finished ] Stuff13 (/Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff13.log)
10: [ Finished ] Stuff12 (/Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff12.log)
11: [ Finished ] Stuff14 (/Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff14.log)
12: [ Finished ] Stuff15 (/Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff15.log)

Now let’s peek into job 12, or the one named ‘Stuff15.’

Bash

SQL> !cat /Customers/thatjeffsmith/.sqlcl/jobslogs/Stuff15.log
Related.
finished


PL/SQL process efficiently accomplished.

Disconnected from Oracle Database 23ai Free Launch 23.0.0.0.0 - Develop, Be taught, and Run for Free
Model 23.5.0.24.07

SQL> 

Word the ‘finished’ comes from the DBMS_OUTPUT little bit of our script, we’ll solely see this if SERVEROUTPUT is about to ‘on.’ Your script will need to log what it’s doing in a desk or file for ‘deeper’ logging, instrumentation, and debugging.

Concerning the database connection

My script calls this up high –

Bash

join -name "hr 🟢"

SQLcl helps named connections, and you’ve got these autoamtically should you’re already utilizing our VS Code extension.

You will get a listing of these utilizing the connmgr command.

Bash

SQL> connmgr listing
.
├── ADMIN
│   ├── Containers
│   ├── SYSTEM
│   │   ├── SYSTEM
│   │   └── SYSTEM @ MARIN
│   ├── SYS
│   ├── SYS Container 🫙
│   └── SYS PDB
├── Cloud
│   ├── ATP-ADMIN-🛠️ 🔴
│   └── AutonomousFunDemo🍻
├── JEFF
│   ├── JEFF @ PDB2
│   ├── JEFF HR
│   └── my title is jeff
├── 12 thousand tables ⚀⚁
├── 23cVirtualBoxHR
├── CMA
├── F1 Duality View Demo 🏎️
├── HRREST
├── OE 🏬
├── TNS instance (HR)
├── entry
├── expires
├── hr 🟢
└── noname

Sure, SQLcl additionally helps connection folders.

Abstract

You should utilize SQLcl to run duties on a background thread, and proceed on doing ‘different issues.’ You’ll be able to have these duties be SQL scripts that execute, together with on databases aside from the present connection. Lastly, you’ll be able to monitor these duties utilizing the roles command, in addition to learn the robotically collected logs displaying their output/outcomes.

P.S. Sure this all works as properly in our VS Code Extension

Similar demo, however with operating it on certainly one of my OCI cases, on this case, my At all times Free Autonomous Database.

Right here’s it’s operating:

And after the actual fact:

VS Code’s terminal makes it straightforward to open recordsdata, like our job/job log!

Tags: concurrentlyDatabasesDeployMultipleOracleUpdates
Previous Post

High 7 Extremely-Excessive Molecular Weight Polyethylene Producers

Next Post

5 cloud suppliers working below strict knowledge laws

Next Post
5 cloud suppliers working below strict knowledge laws

5 cloud suppliers working below strict knowledge laws

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending

Second Wave Of Migrations Brings Higher Efficiency, Effectivity, And Safety

Second Wave Of Migrations Brings Higher Efficiency, Effectivity, And Safety

May 15, 2025
Azure VMware Resolution now obtainable within the new AV48 node dimension in Japan East.

Azure VMware Resolution now obtainable within the new AV48 node dimension in Japan East.

April 15, 2025
In S3 simplicity is desk stakes

In S3 simplicity is desk stakes

March 20, 2025
How To Stage-Up Your Creator Advertising Program

How To Stage-Up Your Creator Advertising Program

January 23, 2025
Safety And Danger Execs Brace For Rules

Safety And Danger Execs Brace For Rules

April 3, 2025
Safe & Environment friendly File Dealing with in Spring Boot: Learn, Write, Compress, and Defend | by Rishi | Mar, 2025

Safe & Environment friendly File Dealing with in Spring Boot: Learn, Write, Compress, and Defend | by Rishi | Mar, 2025

May 15, 2025

MultiCloud365

Welcome to MultiCloud365 — your go-to resource for all things cloud! Our mission is to empower IT professionals, developers, and businesses with the knowledge and tools to navigate the ever-evolving landscape of cloud technology.

Category

  • AI and Machine Learning in the Cloud
  • AWS
  • Azure
  • Case Studies and Industry Insights
  • Cloud Architecture
  • Cloud Networking
  • Cloud Platforms
  • Cloud Security
  • Cloud Trends and Innovations
  • Data Management
  • DevOps and Automation
  • GCP
  • IAC
  • OCI

Recent News

Safe & Environment friendly File Dealing with in Spring Boot: Learn, Write, Compress, and Defend | by Rishi | Mar, 2025

Safe & Environment friendly File Dealing with in Spring Boot: Learn, Write, Compress, and Defend | by Rishi | Mar, 2025

May 15, 2025
Bitwarden vs Dashlane: Evaluating Password Managers

Bitwarden vs Dashlane: Evaluating Password Managers

May 15, 2025
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact

© 2025- https://multicloud365.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Cloud Architecture
    • OCI
    • GCP
    • Azure
    • AWS
    • IAC
    • Cloud Networking
    • Cloud Trends and Innovations
    • Cloud Security
    • Cloud Platforms
  • Data Management
  • DevOps and Automation
    • Tutorials and How-Tos
  • Case Studies and Industry Insights
    • AI and Machine Learning in the Cloud

© 2025- https://multicloud365.com/ - All Rights Reserved