SQL dependency OnChange event constantly when using a specific database on SQL server
Hello
I did some prototype dev using a new db I created on our dev SQL server instance and OnChange events only when the underlying data was changed. I tried the same thing with another database on the same server which is a replica of our live database. With
this it just kept firing the event regardless of what activity there was in the table. I even created a totally empty table and used that for the query and it still fired on an empty table.
Is there anything obvious that I need to do to this database to stop this? I'm pretty sure my c#is ok just confused by this
Thanks,
Dave.
On the db where it works the properties in the SqlNotificationEventArgs are different to the one that does not work:
So it looks as though for some reason it never gets to subscribe to this event.
I tried using ssbdiagnose but to be honest I don't know what the From Service and To Service parameters are in my case.
Here's what I got anyway:
C:\Program Files\Microsoft SQL Server\100\Tools\Binn>ssbdiagnose -E -d BMC_Ecomm
erce CONFIGURATION FROM SERVICE /test/initiator TO SERVICE /test/target
Microsoft SQL Server 10.50.1600.1
Service Broker Diagnostic Utility
D 29997 W28SDEV05 Transport Service Broker GUID is identical to tha
t of database DynamicRouting on server W28SDEV05
D 29997 W28SDEV05 Transport-TempRename Service Broker GUID is identical t
o that of database DynamicRouting on server W28SDEV05
D 29912 W28SDEV05 BMC_Ecommerce Service /test/initiator was not found
D 29912 W28SDEV05 BMC_Ecommerce Service /test/target was not found
D 29931 W28SDEV05 BMC_Ecommerce There is no route for service /test/tar
get
D 29931 W28SDEV05 BMC_Ecommerce There is no route for service /test/ini
tiator and broker instance BB64B7AA-5C39-404B-B7A9-81D3756A4C60
D 29964 W28SDEV05 BMC_Ecommerce The master key was not found
7 Errors, 0 Warnings
Worth noting that the one that worked gets the same results with ssbdiagnose
SELECT service_broker_guid
FROM sys.databases
WHERE database_id = DB_ID();
ran in DynamicRouting gives : 4AC2C25B-E612-44B2-BC43-687F918ABD16
SELECT service_broker_guid
FROM sys.databases
WHERE database_id = DB_ID();
ran in BMC_Ecommerce gives : BB64B7AA-5C39-404B-B7A9-81D3756A4C60
Similar Messages
-
How to enable Sql Dependency OnDataChange event to handle multiple request at a time
when we work with sql dependency then we work with OnDataChange event and this event notify us regarding data change in table. suppose my application monitor a
test table by using sql dependency. suppose huge number of data is getting insert and updated in
test table very frequently. so i do not know how sql dependency
OnDataChange event can handle this situation because OnDataChange event will fire as many as time data will be change in db table.
here is my snip for onchange event
void OnDataChange(object sender, SqlNotificationEventArgs e)
((SqlDependency)sender).OnChange -= OnDataChange;
BBALogger.Write("PartIndexer Service RegisterNotification called end", BBALogger.MsgType.Info);
if (e.Source == SqlNotificationSource.Timeout)
MailSend(); // notification mail send
BBALogger.Write("PartIndexer Service SqlNotificationSource.Timeout error", BBALogger.MsgType.Error);
Environment.Exit(1);
else if (e.Source != SqlNotificationSource.Data)
MailSend(); // notification mail send
BBALogger.Write("PartIndexer Service SqlNotificationSource.Data", BBALogger.MsgType.Error);
Environment.Exit(1);
else if (e.Type == SqlNotificationType.Change)
StartIndex();
BBALogger.Write("PartIndexer Service Data changed", BBALogger.MsgType.Info);
else
BBALogger.Write(string.Format("Ignored change notification {0}/{1} ({2})", e.Type, e.Info, e.Source), BBALogger.MsgType.Warnings);
RegisterNotification();
please help me to design my OnDataChange event such was if data is changed very frequently in test table then
OnDataChange can handle the situation. OnDataChange event should not be freeze and can log each data change in xml file.
i am just looking for guidance like how to design OnDataChange as a result it could handle and log data when huge number of user will change data in test table frequently. thanksHi,
You should be able to delete all nodes selected by an XPath expression... Have a look at this...
http://docs.oracle.com/cd/E28280_01/dev.1111/e15866/ui_ref.htm#i1290003
Cheers,
Vlad -
Java.sql.SQLException: Cannot call rollback when using distributed transac
Hi all,
I am getting the below exception trace when I tried to rollback the data in WLI.I am getting the db connection Object from DBControl.
java.sql.SQLException: Cannot call rollback when using distributed transactions
at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:313)
at controls.DailyFeedFileJavaImpl.excuteBatch(DailyFeedFileJavaImpl.jcs:
904)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:381)
at $Proxy59.excuteBatch(Unknown Source)
at QnbDailyFeedProcess.feedFileJavaObjExcuteBatch(QnbDailyFeedProcess.jp
d:274)
at QnbDailyFeedProcess_wf$ImplControlSend15.invoke(QnbDailyFeedProcess_w
f.java:146)
at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:726)
at QnbDailyFeedProcess_wf$_ProcessState.executeInternalCallback(QnbDaily
FeedProcess_wf.java:311)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:685)
at com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration(Process
State.java:681)
at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wli.bpm.runtime.JpdInternalDispMethod.invoke(JpdInternalDispM
ethod.java:87)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:24shanmuga gomathi nayagam wrote:
Hi all,
I am getting the below exception trace when I tried to rollback the data in WLI.I am getting the db connection Object from DBControl.
java.sql.SQLException: Cannot call rollback when using distributed transactions
at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:313)Hi, Ideally, you should obtain the Transaction object and roll it back/ set it
to rollback only.
Joe
at controls.DailyFeedFileJavaImpl.excuteBatch(DailyFeedFileJavaImpl.jcs:
904)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:381)
at $Proxy59.excuteBatch(Unknown Source)
at QnbDailyFeedProcess.feedFileJavaObjExcuteBatch(QnbDailyFeedProcess.jp
d:274)
at QnbDailyFeedProcess_wf$ImplControlSend15.invoke(QnbDailyFeedProcess_w
f.java:146)
at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:726)
at QnbDailyFeedProcess_wf$_ProcessState.executeInternalCallback(QnbDaily
FeedProcess_wf.java:311)
at com.bea.wli.bpm.runtime.ProcessState.executeInternalCallback(ProcessS
tate.java:685)
at com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration(Process
State.java:681)
at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java
:371)
at com.bea.wli.bpm.runtime.JpdInternalDispMethod.invoke(JpdInternalDispM
ethod.java:87)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:42
3)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:39
6)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:24 -
Error ORA-06502 When using function REPLACE in PL/SQL
Hi,
I have a PL/SQL procedure which gives error 'Error ORA-06502 When using function REPLACE in PL/SQL' when the string value is quite long (I noticed this with a string 9K in length)
variable var_a is of type CLOB
and the assignment statement where it gives the error is
var_a := REPLACE(var_a, '^', ''',''');
Can anyone please help!
ThanksEven then that shouldn't do so:
SQL> select overload, position, argument_name, data_type, in_out
2 from all_arguments
3 where package_name = 'STANDARD'
4 and object_name = 'LPAD'
5 order by 1,2
6 /
OVERLOAD POSITION ARGUMENT_NAME DATA_TYPE IN_OUT
1 0 VARCHAR2 OUT
1 1 STR1 VARCHAR2 IN
1 2 LEN BINARY_INTEGER IN
1 3 PAD VARCHAR2 IN
2 0 VARCHAR2 OUT
2 1 STR1 VARCHAR2 IN
2 2 LEN BINARY_INTEGER IN
3 0 CLOB OUT
3 1 STR1 CLOB IN
3 2 LEN NUMBER IN
3 3 PAD CLOB IN
4 0 CLOB OUT
4 1 STR1 CLOB IN
4 2 LEN NUMBER INI wonder what happened? -
How to connect to a specific database in SQL server
Hi,
How can I connect to a specific database in SQL server? I used the following statement. But my table is inserted to the 'master' database in the SQL server. How can I insert my tables to the specific database tahta I have created before?
Connection con;
String sURL = "jdbc:microsoft:sqlserver://SERVER_NAME:1433";
con = DriverManager.getConnection ( sURL, sUsername, sPassword);Hi,
When I use the syntax:
String sURL = "jdbc:microsoft:sqlserver://SERVER_NAME:1433/DATABASE_NAME;selectMethod=cursor";
it gives an error as follows:
problems connecting to jdbc:microsoft:sqlserver://SERVER_NAME:1433/DATABASE_NAME;selectMethod=cursor:
[Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
What is the way to connect to a specific database? -
Event handler when using partial page refresh ?
Hi
I have a calendar, which uses partial page refresh. The problem is how to make javascript wait until the calendar has loaded and then do some updates on the calendar (after the user has pressed the next button that runs apex.widget.calendar.ajax_calendar('S','next');, for example ). I thought I could add "onreadystatechange" (or onload) event handler to the calendar like this: onreadystatechange="checkState()", where the function would check the state and if ready then do the updates. This doesn't work. Could somebody please tell me why not ?
TiinaHi,
It seems that ajax calendar missing event apexafterrefresh.
I do not know is this "bug" or just feature.
That event would be useful to your case , if I understand correct what you looking for.
For workaround , you can over write original function by placing this to calendar region footer
<script>
apex.widget.calendar.ajax_calendar=function(p_calendar_type, p_calendar_action, p_calendar_date, p_calendar_end_date){
var l_cal_type_field = $v('p_cal_type_field_id');
var l_cal_date_field = $v('p_cal_date_field_id');
var l_cal_end_date_field = $v('p_cal_end_date_field_id');
var l_cal_id = $v('p_calendar_id');
var l_calendar_region = 'calendar' + l_cal_id;
if ( p_calendar_type != 'C' ){
$s(l_cal_date_field,$v('p_calendar_date'));
}else{
if ( $v(l_cal_date_field) == '' ) {
$s(l_cal_date_field,$v('p_calendar_date'));
if ( $v(l_cal_end_date_field) == '' ) {
$s(l_cal_end_date_field,$v('p_calendar_end_date'));
// create and apex.ajax.widget object
var a = new apex.ajax.widget('calendar',function(){
/* start the return function */
if(p.readyState == 1){
document.body.style.cursor = "wait";
}else if(p.readyState == 2){
}else if(p.readyState == 3){
}else if(p.readyState == 4){
$x(l_calendar_region).innerHTML = p.responseText ;
$s(l_cal_date_field,$v('p_calendar_date'));
if (p_calendar_type == 'C') $s(l_cal_end_date_field,$v('p_calendar_end_date'));
document.body.style.cursor = "";
/* DO HERE THINGS AFTER CALENDAR REFRESH */
}else{return false;}
// code for next,previous and today
if (p_calendar_type == 'S'){
p_calendar_type = $v('p_calendar_type');
}else{
$s(l_cal_type_field,p_calendar_type);
a.ajax.addParam('p_widget_mod',p_calendar_type);
a.ajax.addParam('p_widget_action',p_calendar_action);
a.ajax.addParam('x01',l_cal_id);
var lDate = (!!p_calendar_date && p_calendar_date !== '')?p_calendar_date:$v(l_cal_date_field);
if (p_calendar_type == 'C') {
var lendDate = (!!p_calendar_end_date && p_calendar_end_date !== '')?p_calendar_end_date:$v(l_cal_end_date_field);
a.ajax.add(l_cal_date_field,lDate);
if (p_calendar_type == 'C') a.ajax.add(l_cal_end_date_field,lendDate);
a.ajax.addParam('x02',lDate);
if (p_calendar_type == 'C') a.ajax.addParam('x05',lendDate);
a.ajax.add(l_cal_type_field,p_calendar_type);
a._get();
</script>Where I have comment *"do here things after calendar refresh"*, you can hook own scripts.
Of course this is not best way, but might help you till ajax calendar support dynamic actions fully
Regards,
Jari
Edited by: jarola on Oct 20, 2010 3:11 PM -
How to get the displayID when using X-window to access solaris server?
I want to get the displayID in my programme when use X-window to access solaris on the server,but i don't know which the API in java?Somebody can tell me?
Thanks.Try deleting the Server.app and download it again from the App Store, restart.
My Server is also using self signed certificates and is working with iOS device (Trust Profile needed first). -
Can you force a Oracle Update Statement to use a specific database thread?
We are attempting to write a Oracle Update Statement to update a value on all records in a single column. We are updating a column with a value found in a history table. Simple enough. We do it all the time. It works but we are having contention issue with users on the system using the main database threads and updating the same table at the same time. So what is happening is the update uses up all the available database threads and then the users just get timeouts and can't update. What we are trying to determine is can I write it to force the update statement to use a specific thread on the database when it is running?
Here is the current update statement
UPDATE
TASK_DATA TSK
SET
dttSTATUS_WORK_IN_PROGRESS_TIM =
SELECT
HIS.T5
FROM
H2839 HIS
WHERE
TSK.REQUEST_ID = HIS.ENTRYID
AND
HIS.T5 IS NOT NULL
AND
TSK.dttSTATUS_WORK_IN_PROGRESS_TIM IS NULL
Edited by: user11307503 on Oct 21, 2009 3:47 PMthe update uses up all the available database threads and then the users just get timeouts and can't updateI'm not convinced that you're got a clear picture of how Oracle works and what is going on here.
You're updating TASK_DATA, the whole table.
Writers don't block readers - that's a key principle of Oracle.
But if all the other users are trying to update a row or rows in TASK_DATA at the same time as your other process is updating all rows in the table, then there's going to be contention.
This is not about "using up all available database threads" - that's nonsense.
This is (probably) about sessions trying to update rows that your other process has locked.
1. Get a clear picture of what the sessions are waiting on - it's probably TX locks.
2. How many rows are you updating with this update on TASK_DATA?
3. How long does it take? How often do you do it? Is there no quieter time when you can do it? -
-6502 ORA-06502: PL/SQL: numeric or value error when using 'Create CAPI Definition'
I get an error when I try to create a CAPI definition with Headstart untilities (6i). I use HSU_CAPI revision 6.5.2.0
The detailed information says the following:
Message
BLAPI.OPEN_ACTIVITY
Start HSU_CAPI.run
Number of Tables to create CAPI for 1
Initial checks for table KCS_TENDERS with id 692754610572409851363604771392473242
HSU_CAPT.initial_checks for table KCS_TENDERS
HSU_CAPF.initial_checks for table KCS_TENDERS
HSU_CAPC.initial_checks Custom Services for table KCS_TENDERS
HSU_CAPB.initial_checks BRDD for table KCS_TENDERS
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDIPLS
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
KCS_TENDERS Business Rule Design Definition BR_TNR001_CEV does not have any Trigger Columns. Rule will fire when any column is updated.
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDIPLS
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
bltext.get_line_containing
Creating CAPI for table KCS_TENDERS with id 692754610572409851363604771392473242
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Insert-stmt, Open transaction.
Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Update-stmt, Open transaction.
Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-stmt, Open transaction.
Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Insert-stmt, Close transaction.
Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Update-stmt, Close transaction.
Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Delete-stmt, Close transaction.
Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCODE number of text lines = 6 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-row, Save old data.
Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCODE number of text lines = 404 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Insert, Call CAPI.
Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCODE number of text lines = 4 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Update, Call CAPI.
Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCODE number of text lines = 4 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Delete, Call CAPI.
Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCODE number of text lines = 17 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Insert, Call CAPI.
Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCODE number of text lines = 7 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Update, Call CAPI.
Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCODE number of text lines = 144 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Delete, Call CAPI.
Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCODE number of text lines = 282 - REPLACE
Deleted old text
Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCMNT number of text lines = 1 - REPLACE
Deleted old text
HSU_CAPF.create_or_find_capi_pack
hsu_capi.find_plm (kcs_tnr_capi, 692754610572409851363604771392473242, CAPI).
capi package found in the context folder
BLPLM.UPD
FREE_FORMAT_TEXT_FLAG......... = Y
IMPLEMENTATION_NAME........... = kcs_tnr_capi
PLSQL_MODULE_TYPE............. = PACKAGE
SCOPE......................... = PUBLIC
COMPLETION_STATUS............. = COMPLETED
NAME.......................... = kcs_tnr_capi
PURPOSE....................... = Custom API package for implementing Business Rules and supporting TAPI
Recreated Package KCS/ KCS_TNR_CAPI, preserving only the Revision History.
HSU_CAPF.add_tags_er_av
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
bltext.get_lines_from_repository, p_text_type=CDINOT
bltext.get_line_containing
bltext.get_line_containing
HSU_CAPF.create_specification
HSU_CAPF.create_c_tabalias
HSU_CAPF.create_c_tabalias_all
HSU_CAPF.create_aggregate_value
HSU_CAPF.create_aggregate_value
HSU_CAPF.create_aggregate_value
Activity aborted with ORACLE internal errors.
-6502 ORA-06502: PL/SQL: numeric or value error: character string buffer too small
What can I do about it???
Thanks in advance.
Menno HoogsteenWorking on the same project as Menno, I had the time to look into the problem.
The problem is caused by the creation of the capi-function agregate_char_value in the packages hsu_capf. While creating this function the following code is executed:
add(' -- allowable values:');
add(' -- '||l_col_name_list);
This last statement causes the problem because this table is very big. L_col_name_list contains 2391 characters wich is 393 characters to long. So i changed this code into:
add(' -- allowable values:');
add(' -- '||substr(l_col_name_list,1,1990));
add(' -- '||substr(l_col_name_list,1990));
and everything works fine. Perhaps something for a patch?
Kind regards,
Ruben Spekle -
Refresh event problem, when using anything other than on-load
I am attempting to create a series of sequential xml loads, without any user interaction.
I.E. xml1 contains the location of xml2, and xml2 contains the location of xml3, so the next must wait until the prior xml has been loaded.
It is impractical to use dropdown lists or refresh buttons to update these - (they should all happen behind the scenes as they are just loading selections that change depending on the user privileges).
While my desired refresh-event is the when-value-becomes, I have tested when-value-changes, and found the same problem.
When I set these to automatically chain through (xml1 is set to refresh-on-load, xml2 is set to load by a trigger cell that equals "load" if there are values loaded from xml1, and so on) - the conditional refresh events do not fire.
When I use a manual refresh button, they load without a problem, and when I use a dropdown list to test the on-change or value-equals logic, this loads correctly too. So the problem is specifically during the intial load-up point, and is reproducable in any new xcelsius project I create.
To state the problem precisely, during the initial loading phase of xcelsius, the logic behind when-value-changes and when-value-equals load events does not seem to execute - however after the initial load, they fire correctly based off user input.
Is there any workaround or solution? If any clarification is needed, let me know where.May not be your exact issue, but something similar -
Only a problem w/SP3 - I used dynamic visibility to hide two connection refresh buttons that were loading data after components finished. They stopped working until I turned the dynamic visibility off and just hid them behind other layers. Confirmed by revealing them after load and the triggers ran appropriately. May not be the issue (since you didn't mention visibility), but worth a try. -
Sql retrives record but fails when used in a view
Hi,
I have a unique problem. I am able to retrive a record based on a certain criteria using a SQL.
When the same sql is used in a create view statement the records do not show up.
I did a count on records using the sql and get 54,521 where
a count on the number of records from a view created using the same sql gives a lower number 40,967
Here is the script
/* Formatted on 2009/10/07 16:22 (Formatter Plus v4.8.8) */
CREATE OR REPLACE FORCE VIEW ssvsec2_js (term_code_key,
crn_key,
seq_number_key,
active_section_ind,
active_course_ind,
course_coreq_ind,
course_prereq_ind,
section_coreq_ind,
section_prereq_ind,
course_eff_term_code,
coll_code,
dept_code,
levl_code1,
levl_code2,
levl_code3,
levl_code4,
divs_code,
subj_code,
crse_number,
ceu_ind,
csta_code,
credit_hours,
credit_hours_low,
credit_hours_high,
credit_hours_ind,
billing_hours,
billing_hours_low,
billing_hours_high,
billing_hours_ind,
ssts_code,
camp_code,
gmod_code,
title,
sapr_code,
census_enrollment1,
census_enrollment_date1,
census_enrollment2,
census_enrollment_date2,
projected_enrollment,
maximum_enrollment,
actual_enrollment,
seats_available,
ptrm_code,
ptrm_start_date,
ptrm_end_date,
link_identifier,
begin_time1,
end_time1,
bldg_code1,
room_code1,
schd_code_meet1,
monday_ind1,
tuesday_ind1,
wednesday_ind1,
thursday_ind1,
friday_ind1,
saturday_ind1,
sunday_ind1,
begin_time2,
end_time2,
bldg_code2,
room_code2,
schd_code_meet2,
monday_ind2,
tuesday_ind2,
wednesday_ind2,
thursday_ind2,
friday_ind2,
saturday_ind2,
sunday_ind2,
begin_time3,
end_time3,
bldg_code3,
room_code3,
schd_code_meet3,
monday_ind3,
tuesday_ind3,
wednesday_ind3,
thursday_ind3,
friday_ind3,
saturday_ind3,
sunday_ind3,
begin_time4,
end_time4,
bldg_code4,
room_code4,
schd_code_meet4,
monday_ind4,
tuesday_ind4,
wednesday_ind4,
thursday_ind4,
friday_ind4,
saturday_ind4,
sunday_ind4,
begin_time5,
end_time5,
bldg_code5,
room_code5,
schd_code_meet5,
monday_ind5,
tuesday_ind5,
wednesday_ind5,
thursday_ind5,
friday_ind5,
saturday_ind5,
sunday_ind5,
begin_time6,
end_time6,
bldg_code6,
room_code6,
schd_code_meet6,
monday_ind6,
tuesday_ind6,
wednesday_ind6,
thursday_ind6,
friday_ind6,
saturday_ind6,
sunday_ind6,
begin_time7,
end_time7,
bldg_code7,
room_code7,
schd_code_meet7,
monday_ind7,
tuesday_ind7,
wednesday_ind7,
thursday_ind7,
friday_ind7,
saturday_ind7,
sunday_ind7,
begin_time8,
end_time8,
bldg_code8,
room_code8,
schd_code_meet8,
monday_ind8,
tuesday_ind8,
wednesday_ind8,
thursday_ind8,
friday_ind8,
saturday_ind8,
sunday_ind8,
begin_time9,
end_time9,
bldg_code9,
room_code9,
schd_code_meet9,
monday_ind9,
tuesday_ind9,
wednesday_ind9,
thursday_ind9,
friday_ind9,
saturday_ind9,
sunday_ind9,
begin_time10,
end_time10,
bldg_code10,
room_code10,
schd_code_meet10,
monday_ind10,
tuesday_ind10,
wednesday_ind10,
thursday_ind10,
friday_ind10,
saturday_ind10,
sunday_ind10,
attr_code1,
attr_code2,
additional_attributes_ind,
primary_instructor_id,
primary_instructor_last_name,
primary_instructor_first_name,
primary_instructor_middle_init,
instructor_id2,
instructor_last_name2,
instructor_first_name2,
instructor_middle_init2,
instructor_id3,
instructor_last_name3,
instructor_first_name3,
instructor_middle_init3,
additional_instructors_ind,
coll_code_override,
divs_code_override,
dept_code_override,
schd_code1,
schd_workload1,
schd_max_enrl1,
schd_adj_workload1,
schd_code2,
schd_workload2,
schd_max_enrl2,
schd_adj_workload2,
schd_code3,
schd_workload3,
schd_max_enrl3,
schd_adj_workload3,
schd_code4,
schd_workload4,
schd_max_enrl4,
schd_adj_workload4
AS
SELECT ssbsect_term_code, ssbsect_crn, ssbsect_seq_numb,
SUBSTR (f_active_section_ind (ssbsect_ssts_code), 1, 1),
SUBSTR (f_active_course_ind (a.scbcrse_csta_code), 1, 1),
SUBSTR (f_check_for_course_coreqs (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code
1,
1
SUBSTR (f_check_for_course_prereqs (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
1,
1
SUBSTR (f_check_for_section_coreqs (ssbsect_term_code, ssbsect_crn),
1,
1
SUBSTR (f_check_for_section_prereqs (ssbsect_term_code,
ssbsect_crn,
1,
1
a.scbcrse_eff_term, a.scbcrse_coll_code, a.scbcrse_dept_code,
SUBSTR (f_get_course_levels (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
1
1,
2
SUBSTR (f_get_course_levels (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
2
1,
2
SUBSTR (f_get_course_levels (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
3
1,
2
SUBSTR (f_get_course_levels (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
4
1,
2
a.scbcrse_divs_code, ssbsect_subj_code, ssbsect_crse_numb,
a.scbcrse_ceu_ind, a.scbcrse_csta_code,
NVL (ssbsect_credit_hrs, a.scbcrse_credit_hr_low),
a.scbcrse_credit_hr_low, a.scbcrse_credit_hr_high,
a.scbcrse_credit_hr_ind,
NVL (ssbsect_bill_hrs, a.scbcrse_bill_hr_low),
a.scbcrse_bill_hr_low, a.scbcrse_bill_hr_high,
a.scbcrse_bill_hr_ind, ssbsect_ssts_code, ssbsect_camp_code,
NVL (ssbsect_gmod_code,
SUBSTR (f_default_gmod (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code
1,
1
NVL (ssbsect_crse_title, a.scbcrse_title), ssbsect_sapr_code,
ssbsect_census_enrl, ssbsect_census_enrl_date,
ssbsect_census_2_enrl, ssbsect_census_2_date, ssbsect_proj_enrl,
ssbsect_max_enrl, ssbsect_enrl, ssbsect_seats_avail,
ssbsect_ptrm_code, ssbsect_ptrm_start_date, ssbsect_ptrm_end_date,
ssbsect_link_ident, k.ssrmeet_begin_time, k.ssrmeet_end_time,
k.ssrmeet_bldg_code, k.ssrmeet_room_code, k.ssrmeet_schd_code,
k.ssrmeet_mon_day, k.ssrmeet_tue_day, k.ssrmeet_wed_day,
k.ssrmeet_thu_day, k.ssrmeet_fri_day, k.ssrmeet_sat_day,
k.ssrmeet_sun_day, l.ssrmeet_begin_time, l.ssrmeet_end_time,
l.ssrmeet_bldg_code, l.ssrmeet_room_code, l.ssrmeet_schd_code,
l.ssrmeet_mon_day, l.ssrmeet_tue_day, l.ssrmeet_wed_day,
l.ssrmeet_thu_day, l.ssrmeet_fri_day, l.ssrmeet_sat_day,
l.ssrmeet_sun_day, m.ssrmeet_begin_time, m.ssrmeet_end_time,
m.ssrmeet_bldg_code, m.ssrmeet_room_code, m.ssrmeet_schd_code,
m.ssrmeet_mon_day, m.ssrmeet_tue_day, m.ssrmeet_wed_day,
m.ssrmeet_thu_day, m.ssrmeet_fri_day, m.ssrmeet_sat_day,
m.ssrmeet_sun_day, n.ssrmeet_begin_time, n.ssrmeet_end_time,
n.ssrmeet_bldg_code, n.ssrmeet_room_code, n.ssrmeet_schd_code,
n.ssrmeet_mon_day, n.ssrmeet_tue_day, n.ssrmeet_wed_day,
n.ssrmeet_thu_day, n.ssrmeet_fri_day, n.ssrmeet_sat_day,
n.ssrmeet_sun_day, o.ssrmeet_begin_time, o.ssrmeet_end_time,
o.ssrmeet_bldg_code, o.ssrmeet_room_code, o.ssrmeet_schd_code,
o.ssrmeet_mon_day, o.ssrmeet_tue_day, o.ssrmeet_wed_day,
o.ssrmeet_thu_day, o.ssrmeet_fri_day, o.ssrmeet_sat_day,
o.ssrmeet_sun_day, p.ssrmeet_begin_time, p.ssrmeet_end_time,
p.ssrmeet_bldg_code, p.ssrmeet_room_code, p.ssrmeet_schd_code,
p.ssrmeet_mon_day, p.ssrmeet_tue_day, p.ssrmeet_wed_day,
p.ssrmeet_thu_day, p.ssrmeet_fri_day, p.ssrmeet_sat_day,
p.ssrmeet_sun_day, q.ssrmeet_begin_time, q.ssrmeet_end_time,
q.ssrmeet_bldg_code, q.ssrmeet_room_code, q.ssrmeet_schd_code,
q.ssrmeet_mon_day, q.ssrmeet_tue_day, q.ssrmeet_wed_day,
q.ssrmeet_thu_day, q.ssrmeet_fri_day, q.ssrmeet_sat_day,
q.ssrmeet_sun_day, r.ssrmeet_begin_time, r.ssrmeet_end_time,
r.ssrmeet_bldg_code, r.ssrmeet_room_code, r.ssrmeet_schd_code,
r.ssrmeet_mon_day, r.ssrmeet_tue_day, r.ssrmeet_wed_day,
r.ssrmeet_thu_day, r.ssrmeet_fri_day, r.ssrmeet_sat_day,
r.ssrmeet_sun_day, s.ssrmeet_begin_time, s.ssrmeet_end_time,
s.ssrmeet_bldg_code, s.ssrmeet_room_code, s.ssrmeet_schd_code,
s.ssrmeet_mon_day, s.ssrmeet_tue_day, s.ssrmeet_wed_day,
s.ssrmeet_thu_day, s.ssrmeet_fri_day, s.ssrmeet_sat_day,
s.ssrmeet_sun_day, t.ssrmeet_begin_time, t.ssrmeet_end_time,
t.ssrmeet_bldg_code, t.ssrmeet_room_code, t.ssrmeet_schd_code,
t.ssrmeet_mon_day, t.ssrmeet_tue_day, t.ssrmeet_wed_day,
t.ssrmeet_thu_day, t.ssrmeet_fri_day, t.ssrmeet_sat_day,
t.ssrmeet_sun_day, e1.ssrattr_attr_code, e2.ssrattr_attr_code,
SUBSTR (f_more_attributes (scbcrse_subj_code,
scbcrse_crse_numb,
scbcrse_eff_term
1,
1
x.spriden_id, NVL (x.spriden_last_name, 'STAFF'),
x.spriden_first_name, SUBSTR (x.spriden_mi, 1, 1), y.spriden_id,
y.spriden_last_name, y.spriden_first_name,
SUBSTR (y.spriden_mi, 1, 1), z.spriden_id, z.spriden_last_name,
z.spriden_first_name, SUBSTR (z.spriden_mi, 1, 1),
DECODE (u.spriden_pidm, NULL, 'N', 'Y'), ssbovrr_coll_code,
ssbovrr_divs_code, ssbovrr_dept_code, f1.scrschd_schd_code,
f1.scrschd_workload, f1.scrschd_max_enrl, f1.scrschd_adj_workload,
f2.scrschd_schd_code, f2.scrschd_workload, f2.scrschd_max_enrl,
f2.scrschd_adj_workload, f3.scrschd_schd_code, f3.scrschd_workload,
f3.scrschd_max_enrl, f3.scrschd_adj_workload, f4.scrschd_schd_code,
f4.scrschd_workload, f4.scrschd_max_enrl, f4.scrschd_adj_workload
FROM scbcrse a,
ssbovrr,
spriden x,
spriden y,
ssrmeet k,
ssrmeet l,
ssrmeet m,
ssrmeet n,
ssrmeet o,
ssrmeet p,
ssrmeet q,
ssrmeet r,
ssrmeet s,
ssrmeet t,
scrschd f1,
scrschd f2,
scrschd f3,
scrschd f4,
ssrattr e1,
ssrattr e2,
spriden z,
spriden u,
ssbsect
WHERE x.ROWID(+) =
f_get_instr_spriden_rowid (ssbsect_crn,
ssbsect_term_code,
'Y',
AND y.ROWID(+) =
f_get_instr_spriden_rowid (ssbsect_crn, ssbsect_term_code, '', 1)
AND z.ROWID(+) =
f_get_instr_spriden_rowid (ssbsect_crn, ssbsect_term_code, '', 2)
AND u.ROWID(+) =
f_get_instr_spriden_rowid (ssbsect_crn, ssbsect_term_code, '', 3)
AND ssbovrr_term_code(+) = ssbsect_term_code
AND ssbovrr_crn(+) = ssbsect_crn
AND a.scbcrse_subj_code = ssbsect_subj_code
AND a.scbcrse_crse_numb = ssbsect_crse_numb
AND a.scbcrse_eff_term =
(SELECT MAX (b.scbcrse_eff_term)
FROM scbcrse b
WHERE b.scbcrse_subj_code = ssbsect_subj_code
AND b.scbcrse_crse_numb = ssbsect_crse_numb
AND b.scbcrse_eff_term <= ssbsect_term_code)
AND k.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
1
AND l.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
2
AND m.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
3
AND n.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
4
AND o.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
5
AND p.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
6
AND q.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
7
AND r.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
8
AND s.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
9
AND t.ROWID(+) =
gvsuowner.f_get_ssrmeet_rowid_js (ssbsect_term_code,
ssbsect_crn,
10
AND f1.ROWID(+) =
f_get_scrschd_rowid (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
1
AND f2.ROWID(+) =
f_get_scrschd_rowid (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
2
AND f3.ROWID(+) =
f_get_scrschd_rowid (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
3
AND f4.ROWID(+) =
f_get_scrschd_rowid (ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_term_code,
4
AND e1.ssrattr_term_code(+) = ssbsect_term_code
AND e1.ssrattr_crn(+) = ssbsect_crn
AND e1.ssrattr_attr_code(+) = 'SWS'
AND e2.ssrattr_term_code(+) = ssbsect_term_code
AND e2.ssrattr_crn(+) = ssbsect_crn
AND e2.ssrattr_attr_code(+) LIKE 'TM%';
Thanks ,
IreneWelcome to the forums !
If this issue is not related to a database upgrade, pl post the question in the "SQL and PL/SQL" or "Database - General" forums for a better/faster response.
http://forums.oracle.com/forums/category.jspa?categoryID=18
HTH
Srini -
Stange error when using dbms_metadata.get_ddl in PL/SQL procedure
Basic info:
Oracle 10.2.0.4.0 on linux.
I'm trying to extract ddl of indexes that I drop and recreate frequently during monthly loads and store it in a table.
This statement works on the command line:
insert into saved_indexes
select index_name,dbms_metadata.get_ddl('INDEX',index_name,owner_name)
from sys.all_indexes
where owner = owner_name
and table_name = table_name;
commit;
The table 'saved_indexes' is a two column table with a varchar2(40) and a CLOB.
When I use the following procedure, I get 'ORA-04044 procedure, function, package, or type is not allowed here -4044' every time.
PROCEDURE SAVE_INDEXES (v_table IN VARCHAR2, v_owner IN VARCHAR2) IS
v_errorcode number(8);
v_errortext varchar2(1000);
v_start_time date;
BEGIN
insert into saved_indexes
select index_name,dbms_metadata.get_ddl('INDEX',index_name,v_owner)
from sys.all_indexes
where owner = v_owner
and table_name = v_table;
commit;
EXCEPTION
WHEN others THEN
v_errorcode := sqlcode;
v_errortext := substr(sqlerrm, 1, 1000);
dbms_output.put_line(v_errortext || ' ' || v_errorcode);
END;
Alternatively I have tried it this way:
PROCEDURE SAVE_INDEXES (v_table IN VARCHAR2, v_owner IN VARCHAR2 ) IS
v_errorcode number(8);
v_errortext varchar2(1000);
v_index_ddl CLOB;
BEGIN
for x in (select index_name
from sys.all_indexes
where owner = v_owner
and table_name = v_table)
loop
select dbms_metadata.get_ddl('INDEX',x.index_name,v_owner) into v_index_ddl from dual;
insert into saved_indexes
values(v_table,v_index_ddl);
end loop;
commit;
EXCEPTION
WHEN others THEN
v_errorcode := sqlcode;
v_errortext := substr(sqlerrm, 1, 1000);
dbms_output.put_line(v_errortext || ' ' || v_errorcode);
END;
Always with the same result. I have poured over the documentation on this and have not found anything. All objects are in the same schema, so there is not an issues with invokers rights, or privileges.
Any suggestions would be helpful...qwe11126 wrote:
When I use the following procedure, I get 'ORA-04044 procedure, function, package, or type is not allowed here -4044' every time.There is nothing wrong with SP. Post a snippet of SQL*Plus code showing how you call SP along with errors.
SY. -
Problem when using v$librarycache in PL/SQL
Hi all,
I've a problem where do the select statement like:
SELECT *
FROM v$librarycache;
in procedure using "OEM" tool.
It's popup a error message like:
Error Text = PL/SQL: ORA-00942: TABLE OR VIEW DOES NOT EXITST
NOTE: There is no problem when i'm using sqlplus.
Thank you,
KevinPeter and Jens
I've loged in as "scott" user and created few procedure and i worked fine with "scott" user. I don't need to login as "sys". The problem i have here is somehow the fixed table "v$librarycache" doesn't work in procedure. Although, i've grant select any table, create any procedure to scott;
Thanks,
Kevin -
Error: PL/SQL ORA-00932 inconsistent datatype when using LONG value
Good morning:
I am using a work PL/SQL script where I am using a LONG value in a cursor. When I execute it, I am receiving:
PL/SQL ORA-00932 inconsistent datatype: expected NUMBER got LONG
set serveroutput ON SIZE 1000000
set heading off
set feedback off
set trimspool off
set echo off
set term off
set pagesize 0
SPOOL &so_outfile;
DECLARE
v_data_file varchar2(30);
-- v_sch_code varchar2(10);
-- v_instance_name varchar2(10);
ws_path payroll.pybutfl.pybutfl_utl_file_path%TYPE;
v_data_line VARCHAR2 (2000) := NULL;
fhandle_o UTL_FILE.file_type;
v_line_count NUMBER := 0;
v_selected_count NUMBER := 0;
v_error_count NUMBER := 0;
v_written_count NUMBER := 0;
v_error_text VARCHAR2 (50) := ' AMACONF_ERR: Unable to write the line. ';
v_errm VARCHAR2 (255);
v_sqlerrm VARCHAR2 (255);
v_payment_type VARCHAR2(10);
CURSOR C1 IS
select RTRIM
AMRCONF_PIDM_ERR ||'|'||
AMRCONF_IDEN_CODE_ERR ||'|'||
AMRCONF_ENTRY_DATE_ERR ||'|'||
AMRCONF_CONFID_IND_ERR ||'|'||
*AMRCONF_COMMENT_ERR ||'|'||*
AMRSUBJ_SUBJ_CODE_ERR ||'|'||
ERROR_CODE ||'|'||
ERROR_CODE_TEXT ) data_line
from WSUALUMNI.AMRCONF_ERR;
BEGIN
DBMS_OUTPUT.put_line ('Program Generating AMACOMT Mass Update Error File ');
IF UTL_FILE.is_open (fhandle_o)
THEN
UTL_FILE.fclose (fhandle_o);
END IF;
/* Name The File Here */
v_data_file := ('Amaconf_error.txt');
SELECT RTRIM (pybutfl_utl_file_path)
INTO ws_path
FROM payroll.pybutfl;
fhandle_o := UTL_FILE.fopen (ws_path, v_data_file, 'w');
DBMS_OUTPUT.put_line ('UTLFILE file for this run is: ' || ws_path||'/'||v_data_file);
v_written_count := 0;
FOR c1_rec IN C1 LOOP
BEGIN
v_selected_count := v_selected_count + 1;
v_data_line := rtrim(c1_rec.data_line);
UTL_FILE.put_line (fhandle_o, v_data_line);
v_written_count := v_written_count + 1;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (v_error_text);
v_error_count := v_error_count + 1;
END;
END LOOP;
DBMS_OUTPUT.put_line ('Number of Records Selected: ' || v_selected_count);
DBMS_OUTPUT.put_line ('Number of Records Written: ' || v_written_count);
IF UTL_FILE.is_open (fhandle_o)
THEN
UTL_FILE.fclose (fhandle_o);
END IF;
END;
SPOOL OFF;If I comment out the "AMRCONF_COMMENT_ERR ||'|'||" line, then the script works fine. The table was created as:
Create Table WSUALUMNI.AMRCONF_ERR
AMRCONF_PIDM_ERR NUMBER (8) NOT NULL,
AMRCONF_IDEN_CODE_ERR VARCHAR2(5) NOT NULL,
AMRCONF_ENTRY_DATE_ERR DATE NOT NULL,
AMRCONF_CONFID_IND_ERR VARCHAR2(1),
AMRCONF_COMMENT_ERR LONG,
AMRSUBJ_SUBJ_CODE_ERR VARCHAR2(5) NOT NULL,
ERROR_CODE VARCHAR2(12) NOT NULL,
ERROR_CODE_TEXT VARCHAR2(50) NOT NULL
); I don't get what is the problem here in the script.Hi,
Feew suggestions
1) LONG is a deprecated type hence if possible start working on changing that column
2) CLOB will your preferred datatype over LONG.
3) you cannot use RTRIM on long.
here is a very quick example
drop table h
create table h (x long,y varchar2(100))
select rtrim(x) from h
select rtrim(y) from hSolution:
[http://www.oracle.com/technology/oramag/code/tips2003/052503.html]
need a better solution change the datatype to clob and
drop table h
create table h (x clob,y varchar2(100))
select dbms_lob.substr( x, 4000, 1 ) from h
select rtrim(y) from hCheers!!!
Bhushan -
Problem when using object array as parameter of server-side event
Hi Friends,
I had defined an event in component interface of Component A, with object array as its parameter. but when I define event-handler for this event in Component B, the type of parameter in generated event-handler method is just the class itself instead of an array.
It's a bug or array parameter is not support by server-side event in WD4J?
Thanks in advanced.I think you are trying to do the editing of parameter from the java editor.
Do it via the controller editer. Go the methods tab. Select the actionhandler.
In the parameter section edit the paramter. Change the dimensions here.
Regards,
Ashwani Kr Sharma
Maybe you are looking for
-
This question sound funny. I just want to make sure this rule. In Oracle database before 10g, we can only use DML and transaction control code within PL/SQL block. We can not use DDL or other control languages within PL/SQL block. How about 10g? can
-
Solaris 8/07 x86, wireless intel 2200bg networking
Just finished a dvd-based install of solaris 8/07 x86 (not opensolaris) and everything good, except wireless networking. Before the install, I ran the suitability/compatibility tester and it vetted my wifi and everything else. ifconfig doesn't show m
-
Netmeeting Integration with Sun One Portal Server 6.2
Hi, we are trying to integrate MS Netmeeting with Sun one portal server 6.2,using netlet ,has anybody done similar things earlier .then plz help me, or any other solution to call netmeeting from portal.
-
How do I insert a time field?
Is there a time field I can insert similar to the date field?
-
Music speeds up then stops.
Starting a few weeks ago, when playing music on my iPhone 3G, the songs suddenly speed up or stop and the phone goes back to the home screen. I have restored, reset and reloaded all my music and content in the phone and have the latest software. It m