The specific case I had to deal with recently, when importing large quantities of data from an external website :
The DBA created a user account with SELECT only privileges for me. The weird (for me anyway, being used to MySQL way of things) was that the user had no tables - he had to switch to one of the alternate schemas available for him before actually having access to any tables.
In Oracle, that happens by running the
ALTER SESSION SET CURRENT_SCHEMA='mychema'
before anything else ( similar to the SET NAMES process in MySQL ). This was not possible with this module, resulting to a number of errors ( "no such table", etc ). The attached patch checks for an additional key to the configuration array, called 'alt_schema'. If it is found, it runs the above query when connecting.
If there is another (possibly more elegant) way of doing the above, please advise!
Comment | File | Size | Author |
---|---|---|---|
migrate-AddOracleAltSchemaSupport.patch | 1.18 KB | hexblot | |
Comments
Comment #1
mikeryanNote Drupal coding conventions require a space after if.
Could someone other than the patch author test this and give it an RTBC?
Thanks.
Comment #2
mikeryanAll the if statements need a space after the if.
There is no $this->schema - I assume you meant $this->configuration['alt_schema']?
Also note there should be spaces either side of the concatenation operator.