Disabling VT-X in VirtualBox (on Linux)

While trying to create a new Virtual Machine to install EBS on my home Ubuntu server, I received error messages saying “VT-X is unavailable (VERR_VMX_NO_VMX)” upon booting the new VM. This error message makes sense  because my home server uses an old Core2Duo processor that does not have VT-X extensions.

In the VirtualBox GUI, however, the extensions tab where this feature could be disabled was greyed out (presumably due to my processor’s lack of the feature).

At first, at the recommendation of the top pages on google for the error message, I tried modifying this line in VM’s my .vbox file:

<HardwareVirtEx enabled=”true” exclusive=”true“/>
to:
<HardwareVirtEx enabled=”false“/>

When I restarted the virtual machine, however, the file would change itself back.

While it’s not very well documented, rather than editing the configuration file, it is a better idea to issue the following commands (replace EBS with your VM’s name):

VBoxManage modifyvm EBS –hwvirtex off
VBoxManage modifyvm EBS –vtxvpid off

These commands will use the VBoxManage command to properly change the configuration file and allow the VM to boot without VT-X extensions.

JDeveloper – Updating a ViewObject’s Query Offline

While maintaining some JAX-WS Web Services I built using ADF Business Components (such as View Objects, Entity Objects, Application Modules, etc), I found a way to edit a View Object’s query without having a connection to the JDeveloper project’s database. This is useful for me because I work from home and do not always have easy access to the databases we work with, but still want to get a bit of work done, but it’s not quite obvious you can do this without directly editing the XML file.

To edit a ViewObject’s query offline:

  1. Open the View Object
  2. Go to the Query side tab
  3. Click the pencil icon above the query to open the query (you’ll be told you’re not connected– click OK)
  4. Make your changes and press Apply or OK.
  5. Here you’ll be told you’re not connected again, close the window by pressing X, but don’t click ok.
If you follow the instructions above, particularly closing the dialog rather than pressing OK, your ViewObject’s query should be edited! Just make sure to test it when you have access to the database again!

 

Screenshot of Offline View Object editing

Make sure not to press OK here! Just close the dialog.

 

Query to find open, unapplied Credit Memos in EBS Accounts Receivables (AR)

As part of a series of useful, simple queries for Oracle Receivables, here is a simple query to find open, unapplied credit memos. This is a simplified version of a query that I used for programmatically applying open Credit Memos to an invoice.

There are many other additions you can make to the query to more accurately specify what you are looking for. For example, if you want Debit Memos instead, simply change the Class column in the WHERE clause to ‘DM.’ This is meant to get you off the ground.

If you need help constructing a more specific, feel free to comment below!


select aps.*
from ar_payment_schedules_all aps,
hz_cust_accounts hca
where aps.customer_id = hca.cust_account_id
and aps.class = 'CM'
and aps.status = 'OP'
and hca.account_number = 'CUSTOMER NUMBER HERE'
order by aps.last_update_date asc;

The same information this query returns can be found using Transactions Summary in the Recievables Manager responsibility.

Query to find open invoices in EBS Accounts Receivables (AR)

As part of a series of useful, simple queries for Oracle Receivables, here is a simple query to find open receivables invoices. There are many other additions you can make to the query to more accurately specify what you are looking for. This is meant to get you off the ground.

If you need help constructing a more specific, feel free to comment below!


select aps.*
from ar_payment_schedules_all aps,
hz_cust_accounts hca
where aps.customer_id = hca.cust_account_id
and aps.class = 'INV'
and aps.status = 'OP'
and hca.account_number = 'Customer Number Here'
order by aps.last_update_date desc

The same information this query returns can be found using Transactions Summary in the Recievables Manager responsibility.

Series: Simple EBS Accounts Receivables Queries

Many times when developing PL/SQL customizations or automations for Oracle Applications it’s useful to have a repertoire of simple queries that might be needed to either quickly test whether or not something worked, or for use in cursors when creating automations.

I wanted to share these queries because at least with the search terms I used at the time of needing them, they were not easily found. Hopefully they will help someone. I will post them to this blog as time permits and add them to this list.

Please keep in mind that these queries will probably be very simplified. They’re mainly intended to help get someone off of the ground when creating a cursor or testing, rather than be a copy-and-paste solution. Feel free to comment on the query’s blog post if you need any help.

List of Queries

Searching for Text in Stored Procedures and Functions in MySQL

While debugging packages and procedures in an Oracle database I have become accustomed to searching through the source of all packages and procedures in the database. To do this in Oracle, one would query the Data Dictionary ALL_SOURCE (or DBA_SOURCE, depending on permissions) like so:

SELECT * 
FROM all_source 
WHERE lower(text) 
        LIKE '%search-string-in-lower-case-here%';

This is generally a quick and dirty way to search all procedures, packages, and functions for something like a custom error string or calls to other procedures (which can also be done with ALL_DEPENDENCIES)

MySQL stores routines a bit differently than Oracle, but this is still possible. Since MySQL does not have dependency tracking functionality, if one makes a change to a stored function and wants to find all other stored procedures that call that function, one would query the PROC table in the MYSQL database like so:

SELECT * 
FROM mysql.proc 
WHERE lower(CONVERT(body using utf8)) 
        LIKE '%stored-function-name-in-lowercase-here%';

Gotchas about this query:

The reason I’m posting this to my blog mainly is because there are two somewhat not-straightforward things about this query that should be noted. First of all, please note that the query converts the body of the routine to lower case. This is done because calls made in the DDL of routines can be made in any case, since SQL syntax is case-insensitive.

With that being said, due to MySQL storing routine’s bodies as a BLOB type, and since the BLOB type is stored in binary format, it is necessary to convert the body to a character set (like UTF8) using something like CONVERT(body using utf8) before using the LOWER() function on it.

For more information about converting BLOB text please see the MySQL bug note about it here.