Intershop 7 - Problem adding a new index into database - intershop

I am trying to run a DatabaseIndexesPreparer through DBMigrate.bat and everytime it fails, therefore I have tried running needed SQL directly through Oracle SQLDeveloper and it also fails there with the same message.
This is the snippet I am trying to run:
EXEC staging_ddl.create_index('HWDB_ID_INDEX', 'PRODUCT', 'HWDBID', 'IS_INDX', 'NONUNIQUE', 0);
This is the result/message I receive:
ORA-00906: missing left parenthesis
ORA-06512: at "INTERSHOP.SQL_UTIL", line 149
ORA-06512: at "INTERSHOP.SQL_UTIL", line 49
ORA-06512: at "INTERSHOP.DDL", line 354
ORA-01403: no data found
ORA-06512: at "INTERSHOP.STAGING_DDL", line 235
ORA-06512: at line 1
00906. 00000 - "missing left parenthesis"
Additional info
All of this is done on Intershop 7.10.
HWDBID is a direct custom attribute (DCA) added successfully through DBMigrate following this cookbook:
https://support.intershop.com/kb/index.php/Display/L24707
The SQL snippet is also based on section 4 which deals with adding database index

Try this:
EXEC staging_ddl.create_index('HWDB_ID_INDEX', 'PRODUCT', '(HWDBID)', 'IS_INDX', 'NONUNIQUE', 0);
It seems like you always need to wrap the columns in parenthesis. From the example i found in 7.9 and 7.10 it is done like this.

Related

How to solve "file or LOB operation FILEOPEN failed" while inserting xml data into oracle table?

I followed these steps to insert XML data into an Oracle table:
Created one directory and created one table. What are the columns having that XML file I created the table also.
Now I'm inserting the data into that table I'm getting an error which I need help with.
ExtractValue(Value(x),'//Costs') as Costs
FROM TABLE(XMLSequence(Extract(XMLType(bfilename('MY_DIR', 'test.xml'),
nls_charset_id('UTF8') ),'/PODetails/POHeader'))) x;
Error:
ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the path specified.
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at "SYS.XMLTYPE", line 287
ORA-06512: at line 1

Getting ORA-06512: at "SYS.DBMS_ISCHED", line 124 and ORA-06512: at "SYS.DBMS_ISCHED", line 124 error

I am trying to schedule a job Oracle 11g as below but getting the error.
begin
sqlplus / AS SYSDBA
SYS.dbms_scheduler.create_job(
job_name=>'testjob',
job_type=>'plsql_block',
job_action=>'BEGIN greetings; END;',
start_date=>SYSTIMESTAMP,
repeat_interval => 'byminute=0; bysecond=5;');
END;
/
the error is
Error report: ORA-27465: invalid value byminute=0; bysecond=5; for attribute REPEAT_INTERVAL
ORA-06512: at "SYS.DBMS_ISCHED", line 124
ORA-06512: at "SYS.DBMS_SCHEDULER", line 271
ORA-06512: at line 2
27465. 00000 - "invalid value %s for attribute %s"
*Cause: An invalid value was provided for the specified attribute.
*Action: Reissue the command using a valid value for this attribute.
Initially i was thinking its a permission issue so i gave the below permission
GRANT CREATE job TO SYSTEM;
GRANT EXECUTE ON system.greetings TO public;
Could anyone identify the problem?
Everything is in the message. Repeat interval is wrong. Check Calendar Syntax.
From documentation.
repeat_interval = regular_schedule | combined_schedule
It's mean that repeat interval has to be regular_schedule or combined_schedule.
Where regular_schedule is
regular_schedule = frequency_clause
[";" interval_clause] [";" bymonth_clause] [";" byweekno_clause] ..etc
It's mean that frequency_clause is mandatory other are optional. In your code, there is no frequency_clause.
Working example.
repeat_interval => 'FREQ=HOURLY; byminute=0; bysecond=5;'
For me
error:
ORA-06512: at "SYS.DBMS_ISCHED", line 209 ORA-06512: at "SYS.DBMS_SCHEDULER", line 594 ORA-06512: at line 2 error
cause :
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired for empty
example while do the truncate that table will show this error
Solution:
So needs to clear all locked sessions in DB

ORACLE-06512 error while running utlpwdmg.sql

I am trying to increase the complexity of password rules for the databases I manage. As a result, I made few additions to the utlpwdmg.sql file.
This file does not result in compilation errors but while running it, I get the following error messages.
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "ISU_DBA_SCHED.VERIFY_FUNCTION_11G", line 49
ORA-06512: at line 11
At Line 49
-- Check if the password is same as the username reversed
FOR i in REVERSE 1..length(username) LOOP
reverse_user := reverse_user || substr(username, i, 1);
END LOOP;
IF NLS_LOWER(password) = NLS_LOWER(reverse_user) THEN
raise_application_error(-20004, 'Password same as username reversed');
END IF;
At Line 11
-- ispunct boolean;
Note:
I use SQL Developer to run utlpwdmg.sql
I checked the entire program for data type mismatches and data length issues but found nothing that could cause ORACLE-06502
It is unclear while my code results in ORA-06512

Sales Order Confirmation Error

I am trying to confirm the sales order but I am getting error shown below. The environment is updated from CU1 to CU9 recently. I did Full Compilation and Full CIL and Incremental CIL with out errors. Can you please suggest what could be the issue?
Thanks in advance.
Error : Map object not initialized.
Stack trace
(S)\Classes\FormletterService\postJournal - line 52
(S)\Classes\FormletterService\run - line 221
(S)\Classes\FormletterService\postSalesOrderConfirmation - line 14
(S)\Classes\DictClass\callObject
(S)\Classes\SysOperationServiceController\runOperation - line 93
(S)\Classes\SysOperationServiceController\runServiceOperation - line 22
(S)\Classes\DictClass\callStatic
(S)\Classes\SysDictClass\invokeStaticMethod - line 26
(S)\Classes\SysDictClass\invokeStaticMethodIL - line 39
(S)\Classes\SysOperationRPCFrameworkService\runServiceOperation - line 5
(C)\Classes\SysOperationServiceController\runOperationWithRunAs - line 7
(C)\Classes\SysOperationServiceController\run - line 22
(C)\Classes\FormLetterServiceController\run - line 3
(C)\Classes\SalesFormLetter\run - line 95
(C)\Classes\SalesFormLetter\main - line 138
(C)\Classes\FormFunctionButtonControl\Clicked
The error is caused because the docuRefRecIdsPerJournalMap variable of class FormLetterService is not initialized. Debug method initDocuRefRecIdsPerJournalMap where this variable gets initialized and also method run where the initialization method gets called. You may also have to check classes that extend from FormLetterService and overwrite any of these methods or change the docuRefRecIdsPerJournalMap variable. Also check if you have any customizations on these classes.
Try to 'Compile forward' the base class FormletterService and afterwards do a full CIL compilation again
Hope that helps

Internal Death while parsing [stdin] cPanel

When I try to modify an account via cPanel WHM ,I got below error.
~~~
[2015-07-30 10:49:36 -0400] die [Internal Death while parsing [stdin] 11431] DBD::SQLite::st execute failed: database disk image is malformed at /usr/local/cpanel/Whostmgr/Bandwidth.pm line 56.
Whostmgr::Bandwidth::catch {...} (Cpanel::Exception::Database::Error=HASH(0x72432a0)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 104
Try::Tiny::try(CODE(0x7238338), Try::Tiny::Catch=REF(0x4918f48)) called at /usr/local/cpanel/Whostmgr/Bandwidth.pm line 58
Whostmgr::Bandwidth::getmonthbwusage("username", "advicetr") called at whostmgr/bin/whostmgr.pl line 4366
main::edituser() called at whostmgr/bin/whostmgr.pl line 598
DBD::SQLite::st execute failed: database disk image is malformed
at /usr/local/cpanel/Cpanel/Exception.pm line 151.
Cpanel::Exception::new("Cpanel::Exception::Database::Error", Cpanel::ExceptionMessage::Raw=SCALAR(0x49ea7e0), HASH(0x7242d48)) called at /usr/local/cpanel/Cpanel/Exception.pm line 57
Cpanel::Exception::create("Database::Error", Cpanel::ExceptionMessage::Raw=SCALAR(0x49ea7e0), HASH(0x7242d48)) called at /usr/local/cpanel/Cpanel/Exception.pm line 72
Cpanel::Exception::create_raw("Database::Error", "DBD::SQLite::st execute failed: database disk image is malformed", HASH(0x7242d48)) called at /usr/local/cpanel/Cpanel/DBI.pm line 105
Cpanel::DBI::_create_exception(Cpanel::DBI::SQLite::st=HASH(0x72387a0), "DBD::SQLite::st execute failed: database disk image is malformed", undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 93
Cpanel::DBI::_error_handler("DBD::SQLite::st execute failed: database disk image is malformed", Cpanel::DBI::SQLite::st=HASH(0x72387a0), undef) called at /usr/local/cpanel/Cpanel/BandwidthDB/RootCache.pm line 390
Can any know this issue.
Can you please try to update your cPanel/WHM with the following command.
/scripts/upcp –force
Since the error message involved bandwidth, I moved the /root/.bwusage.sqlite file out of the way and ran /usr/local/cpanel/scripts/build_bandwidthdb_root_cache_in_background
This generated a new .bwusage.sqlite file which should solve this issue.
Fixed !!!

Resources