Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Vishal.

Asked: May 02, 2019 - 11:06 am UTC

Last updated: June 23, 2019 - 6:37 pm UTC

Version: 11

Viewed 10K+ times! This question is

You Asked

How the life of PL/SQL developer changes after the things start moving from on-premises to cloud? What are all tools we need and environment etc?

and Connor said...

Nothing changes.

We still need good code and good coders.

We still need people that understand good design and good SQL skills.

All cloud databases are typically accessible by SQLNet, so its just another remote database.

If anything, PLSQL is in more demand, because the latencies between a cloud app server and a cloud database could be more variable (across regions etc), so locating code near the data avoids that.

Rating

  (9 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Views to use in Cloud

David, May 07, 2019 - 8:06 am UTC


Hello TOM, hello Connor,

For me, as a DBA, and perhaps for developpers, there are differences when you work with the Cloud.

The big problem is that you cannot acces the Linux server and the files like alert.log, listener.ora, listener.log, tnsnames.ora etc etc and programs like lsnrctl to check the listener.

I found some nice objects to resolve a part of this problem but I think there are more :
- to see the content of alert.log (and maybe listener.log) : synonyms ALERT_LOG and V$DIAG_ALERT_EXT ==> you can use the power of SQL to investigate this file :-)
- to see some informations on the listener : synonym V$LISTENER_NETWORK

To see the content of tnsnames.ora I found nothing but maybe I can use an external table.

But how can I check the status and services for the listener? I used lsnrctl status or lsnrctl services but impossible to use them in the Cloud control...

How can I use in the Cloud a trace 10046 and tkprof without linux?

From my experience, my job was easier when we worked on-premises.

Have a nice day.

David D. from Paris

Connor McDonald
May 13, 2019 - 3:33 am UTC

It very much depends on the cloud service you are using, and what level of control you are giving up.

eg You could use cloud just for infrastructure, ie, really you are just getting hardware and your job is identical as on-premise. OS access is there...but also...OS patching, DB patching, monitoring, etc etc etc.... Lots of power = lots of work as well

Or at the other extreme, an autonomous service. No OS access, no SYSDBA access - just DBA level. Sounds restrictive, but also now it is *somebody elses problem* to patch the OS, patch the DB, ensure availability, take and test backups, make sure the listener is working etc. That's very attractive for many customers.

Or there are alternatives that lie somewhere between these levels.

Bottom line - if you do not *access* to a facility on the cloud, then it generally is not your job to manage it (it is the cloud providers job).


to David

Rajeshwaran, Jeyabal, May 08, 2019 - 10:58 am UTC

How can I use in the Cloud a trace 10046 and tkprof without linux?

you can still access the cloud database from Putty with Public and private keys attached to the Putty console.
However for 10046 trace since 12.2 it is available via two V$ tables (v$diag_trace_file and v$diag_trace_file_contents)
Just query those two v$ tables to get the 10046 trace contents. you dont need the server access.

David, May 09, 2019 - 10:49 am UTC


Hello Jeyabal,

Thank you very much for the informations about the V$ but I don't understand why you talk about Putty.

When I use Putty, it is because I can connect to a Linux server. But, if I cannot connect drectly, via Putty, on this server, I have to use the Oracle Cloud Control or Toad.

And, with the Cloud Control, it is impossible to create a 10046 trace, the SQL Worksheet isn't powerfull enought for that task.

Last thing, in the v$diag_trace_file_contents, I think it is the raw 10046 trace file but it is not very easy to read it, that is why I use tkprof. But I cannot use it in the Cloud Control because it is a Linux command.

David D. from PARIS

Connor McDonald
May 13, 2019 - 3:37 am UTC

tkprof can be used from any Oracle client, so you can:

- query v$diag_trace_file_contents,
- spool to local PC
- run tkprof on the file there

Some points...

J. Laurindo Chiappa, May 09, 2019 - 3:38 pm UTC

Some points....

David, let me put some points for you :

a. some Oracle Cloud offers work as a PAAS (Platform As A Service, where you have a SERVER available for your use and you can install anything that you need AND possesses a License) and others as DBAAS (DB As A Service, where you have access ONLY TO A DATABASE) : of course, Jeyabal was referring to a situation of PAAS, in that case you CAN access the server via puTTY and to use locally the database running on it... IF your Cloud service is DBAAS, sure, puTTY will be useless for you... I myself already saw both cases, and in the case of PAAS I use puTTY normally to login in the Oracle server ...

b. tkprof ** DO NOT DEMAND ** an execution IN THE SAME SERVER where the database runs : it is totally POSSIBLE to run tkprof in YOUR machine where YOU installed some small Oracle database, maybe XE... I did it many many many times for trace files coming from some remote customer...

c. the trace file is a pure, simple TEXT FILE, delimited with EOLs - NO binary portion exists on it ...

=> So, adding b. with c. you CAN for sure make a SELECT on the V$ containing the trace file contents, write in your local personal machine a TEXT FILE with the content (maybe via SPOOL command in sqlplus, maybe with UTL_FILE, or even using the DATA EXPORT tools inside SQL DEVELOPER) , and later run a TKPROF against this text file.... Trivial work...

Regards,

Chiappa

Generating TRACE FILE without SQL Worksheet

J. Laurindo Chiappa, May 09, 2019 - 4:37 pm UTC

"And, with the Cloud Control, it is impossible to create a 10046 trace, the SQL Worksheet isn't powerfull enought for that task."

Yeah, David : Cloud Control is a very weak and feature-missing tool, in my opinion, agree - I discarded it promptly for ORACLE SQL DEVELOPER and sqlplus together with my own custom scripts and routines, yes....

To generate a trace file (on-demand OR cloud environment, it doesn't matter) I always prefer : some internal package, such as DBMS_MONITOR (the preferred one), DBMS_SYSTEM, DBMS_SUPPORT, OR to use the event 10046 (via ALTER SESSION, ALTER SYSTEM, etc) , OR even via ORADEBUG (oradebug is an 'internal' tool isnide sqlplus, and you CAN connect with sqlplus to a remote database, CLOUD or not)..... Point is, cloud or not check WHAT are your permissions on these alternatives...
And just to remember, the ALTER alternatives and the internal packages) CAN be executed interactively from some kind of client tool (sqlplus, SQL DEVELOPER, etc) OR can be used inside some TRIGGER, such as a LOGON TRIGGER....

Regards,

Chiappa

David D., May 13, 2019 - 8:27 am UTC

Thank you very much for all your responses :-)

David D. from Paris

trace in autonomous db

Vladimir, June 09, 2019 - 7:32 am UTC

> How can I use in the Cloud a 10046

I recently check and didn't find the way to turn on tracing in Autonomous Transaction Processing db (either through alter session or dbms_monitor).
Only several option of ALTER SESSION are allowed in ATP now:
https://docs.oracle.com/en/cloud/paas/atp-cloud/atpug/experienced-database-users.html#GUID-791E7112-07F7-46F0-BD81-777C8FAD83A0
Connor McDonald
June 11, 2019 - 6:27 am UTC

Some services offer trace.

Autonomous does not. However it does offer real time sql monitoring, autotrace and gather_plan_statistics.

DBaaS Classis allows server level access

John Keymer, June 12, 2019 - 11:07 am UTC

Chiappa,

IF your Cloud service is DBAAS, sure, puTTY will be useless for you...


DBaaS Classic allows server level access; it's only autonomous that doesn't.

Real world experience

A reader, June 18, 2019 - 8:56 pm UTC

One of the issues with AskTom is that he has very little experience with being a real world DBA managing hundreds of databases. Answers to questions like this are made to sound simple and easy but in reality when you are managing hundreds of databases the answers are not always feasible in real world scenarios.
Connor McDonald
June 23, 2019 - 6:37 pm UTC

One of the issues with AskTom is that he has very little experience with being a real world DBA managing hundreds of databases


Yeah, that 23 years of being a development and production DBA before joining Oracle in 2015 obviously counts for nothing :-)

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library