Toad World® Forums

Please help !!! How to create custom rule? Looking for QP5 documentation.

How to create custom rule? Looking for QP5 documentation. I was trying to access the below link

http://qp5/twiki/bin/view/QP5/QpXPath

However this link does not work. Please help

The link works for me – could it be that you don’t have access due to a firewall (even though you
can access Toad World)?

From: sachanta [mailto:bounce-sachanta@toadworld.com]

Sent: May 07, 2014 3:57 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Please help !!! How to create custom rule? Looking for QP5 documentation.

Please help !!! How to create custom rule? Looking for QP5 documentation.

Thread created by sachanta

How to create custom rule? Looking for QP5 documentation. I was trying to access the below link

http://qp5/twiki/bin/view/QP5/QpXPath

However this link does not work. Please help

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

That is an internal link.

On May 7, 2014, at 4:00 PM, “Donna Buskirk” bounce-Donna_Buskirk@toadworld.com wrote:

RE: Please help !!! How to create custom rule? Looking for QP5 documentation.

Reply by Donna Buskirk
The link works for me – could it be that you don’t have access due to a firewall (even though you
can access Toad World)?

From: sachanta [mailto:bounce-sachanta@toadworld.com]

Sent: May 07, 2014 3:57 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Please help !!! How to create custom rule? Looking for QP5 documentation.

Please help !!! How to create custom rule? Looking for QP5 documentation.

Thread created by sachanta

How to create custom rule? Looking for QP5 documentation. I was trying to access the below link

http://qp5/twiki/bin/view/QP5/QpXPath

However this link does not work. Please help

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

Aha. It’s published on a Support Case and a blog, so we’ll need to edit those.

From: Gregory Liss [mailto:bounce-GTDG@toadworld.com]

Sent: May 07, 2014 4:03 PM

To: toadoracle@toadworld.com

Subject: Re: [Toad for Oracle - Discussion Forum] Please help !!! How to create custom rule? Looking for QP5 documentation.

Re: Please help !!! How to create custom rule? Looking for QP5 documentation.

Reply by Gregory Liss

That is an internal link.

On May 7, 2014, at 4:00 PM, “Donna Buskirk” bounce-Donna_Buskirk@toadworld.com wrote:

RE: Please help !!! How to create custom rule? Looking for QP5 documentation.

Reply by Donna Buskirk

The link works for me – could it be that you don’t have access due to a firewall (even though you
can access Toad World)?

From: sachanta [mailto:bounce-sachanta@toadworld.com]

Sent: May 07, 2014 3:57 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Please help !!! How to create custom rule? Looking for QP5 documentation.

Please help !!! How to create custom rule? Looking for QP5 documentation.

Thread created by sachanta

How to create custom rule? Looking for QP5 documentation. I was trying to access the below link

http://qp5/twiki/bin/view/QP5/QpXPath

However this link does not work. Please help

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

Greg,

Is there an external link for QP5 documentation?

Thank you for looking into this.

-Sekhar Achanta

Sekhar,

There is no external docs for that system.

The mechanism for creating your own rules is based on XPath syntax. First, you must be familiar with XPath. Once you are comfortable with that, you can create a new rule (or clone an existing rule that performs a similar function). From there, there
is a mechanism for testing the rule and viewing the XML syntax for your test code.

Is there a specific test that you think we’re missing? If so, you may want to add it to the idea pond on ToadWorld.

Greg

On May 7, 2014, at 4:08 PM, sachanta bounce-sachanta@toadworld.com wrote:

RE: Please help !!! How to create custom rule? Looking for QP5 documentation.

Reply by sachanta
Greg,

Is there an external link for QP5 documentation?

Thank you for looking into this.

-Sekhar Achanta

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - General notifications altogether.

Toad for Oracle - Discussion Forum

Flag this
post as spam/abuse.

I happen to be working currently on code analysis rules for toad after 12.5 release, so now is a good time to post idea pond ideas for any new rules you might want :slight_smile:

I am trying to create a custom rule to flag bitmap indexes (severe error) . We have multiple OLTP systems and bitmap indexes can cause potential performance issues.

You should be doing that kind of check using toad’s db health check - that’s the better place to spot things like too many indexes or wrong type of indexes. Code Analysis is more for spotting bad PL/SQL code. Toad used to have some SQL checking some time ago but we found most people just wanted to check PL/SQL code and not SQL scripts.

Hi,

I would like to create Code Analysis Rules to test naming conventions.

Most customers have their own naming conventions, so it doesn’t make much sense to ask for specific rules.

It would help me to have DTD or Schema documentation to determine which XPath expressions are available.

Hendrik

Here are some examples on how to create some naming convention rules

Ensure global variables start with g_

//VAR_DECL/QNAME […/…/…/PACKAGE_SPEC][@value[not(starts-with(.,‘g_’))]]

Ensure Tables start with TBL_

//(TABLE, ALTER_TABLE)/QNAME/IDENTIFIER[last()] [@value[not(starts-with(., ‘TBL_’))]]

Ensure NUMBER variable types start with n_

//VAR_DECL/QNAME […/TYPE/QNAME/@value=“NUMBER”][@value[not(starts-with(.,‘n_’))]]

Ensure VARCHAR2 variables start with vc_

//VAR_DECL/QNAME […/TYPE/QNAME/@value=“VARCHAR2”][@value[not(starts-with(.,‘vc_’))]]

Ensure constants start with c_

//CONST_DECL/QNAME [@value[not(starts-with(.,‘c_’))]]

Hopefully that will help get you started.

Greg

Hi Greg,

Thanks for the examples. I already coded some rules as variations on existing rules. I was hoping for an overview/reference, so that I can look up all possibilities. Someting like the QP5 link that started this thread seemed to promise.

Kind Regards

Hendrik