Toad 10.1.1.8 code formatter

The code formatter does not work anymore if I want to format code in a package.

I can format single SQL statements, anonymous blocks…

Is this a bug? Any solution? Thx

Hello Erik,

Package: simple or complex code, small or large packages, just one package or
all packages … please can you be more specific?

Thanks,

Andre

All packages, simple and larger ones (5k lines of code), all packages.

I can’t remember if this began when I patched from version 10.0 to 10.1 or later.
I also uninstalled Toad 9.7. some time ago.

Erik, where are you formatting these packages? In the Editor or in the Schema
Browser?

Thanks,

Brad

Always in the editor. I don’t know how to format in the Schema Browser - is this possible?

Morning Erik,

Always in the editor. I don't know how to format in the
Schema Browser - is this possible?

Ssh! Don't tell anyone, but neither do I!

However, I note from a change I made to a package body today that the SB
always seems to reformat it - it certainly displays differently to how I
made my changes!

I've looked for an option - found none - and also right clicked
everywhere I could in the SB - and found nothing.

I have a funny feeling I'm going to be "shamed" by a developer soon when
they point out exactly where and how simple (and obvious) it all is to
turn formatting on and off in the SB.

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

RIght click on a package. Check or uncheck ‘format code’. I think it’s at the
bottom of the popup menu.

Hi John,

I wrote:

I have a funny feeling I'm going to be "shamed" by a
developer soon when
they point out exactly where and how simple (and obvious) it
all is to
turn formatting on and off in the SB.

And in return John wrote:

Right click on a package. Check or uncheck 'format code'.
I think it's at the bottom of the popup menu.

Sigh! I knew it would be simple. I've been right clicking everywhere and
I didn't spot that option, even though it has a tick against it as well!

Cheers,
Norm. [TeamHangsHeadInShame]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

In the Procs/Functions/Packages tabs, R-click on an object name and select
“Format code”. This will display the code formatted in the RHS
source tab.

So what happens exactly when you try to format? No error? Is the LHS navigator
panel populating?

Why isn’t TOAD showing who is holding this lock on the Locks Tab of the SB?

Are you saying the User/User Name column is blank?

What I am saying is when the wait event is “library cache lock” or “enqueue” or
something like this, I expect to see the blocking lock in the locks Tab.

In case of “library cache lock” both User and System tabs are empty.
image001.jpeg

That screen is for PL/SQL, Transaction, and DML locks…I’m not sure
this lock falls into that category?

It would be really nice if TOAD could capture these types of locks as well,
don’t you think?
image001.jpeg

When I try to format nothing unusual happens. The editor window “blinks” like the formatting just happened, at the beginning of the package is inserted the comment /* Formatted on dd.mm.yyyy hh:mm:ss (QP5 v5.139.911.3011) */ but the code is not formatted.
I also tried to check the “Format code” right clicking the package, but the code is not formatted.

Could be, that there is something wrong with the installation.

Have you tried the Waits Tab, and then the ‘By Session’ sub tab?
That should show you what you are looking for I think.

Hey George,

It would be really nice if TOAD could capture these types of locks as well,
don't you think?

MOS article 122793.1 suggests that this could only be done while connected
as SYSDBA, as it requires access to X$KGLLK. 287059.1 infers the same.

Interesting stuff -- I don't recall not being able to trace down a lock
holder using just v$lock and company...

Rich -- [TeamT]

Disclaimer: Oh yeah? I bet my Tacoma could do 95MPH!

Rich,

Interesting stuff -- I don't recall not being able to trace
down a lock holder using just v$lock and company...
Yeah, but they are enqueues and such like locks, Library cache is
somewhat different as it's a lock on a memory area and not on a physical
row.

As you pointed out, needs access to X$blah as SYS and most people won't
be connecting as SYS to the database - lest they befall the "Wrath Of
Bert". (Wasn't that a Star Trek Movie?)

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Well, I do not mind checking those locks being connected as SYSDBA.
v$lock definitely does not show those tyes of locks.

I do not see the “By Session” sub tab. Where is it?
image001.jpeg