Streams Instantiation Table don't execute

Hi.
I am trying execute the following command in my streams environment and it give me no response, no conclusion. I
declare
source_scn number;
begin
source_scn := dbms_flashback.get_system_change_number();
dbms_apply_adm.set_table_instantiation_scn@linkdb (source_object_name => 'OWNER.TABLE_X',
source_database_name => 'DB1',
instantiation_scn => source_scn);
end;
This command I executed into STRMADMIN Oracle user.
But, if I execute:
select * from OWNER.TABLE_X@linkdb;
It execute OK.
My database link was created as:
CREATE DATABASE LINK linkdb
connect strmadmin identified by strmadmin
using 'TNSDBNAME';
And my TNSNAMES.ORA description is:
TNSDBNAME =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.18.52.2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = linkdb)
The GLOBAL_NAME in my destination server is LINKDB.
Please, where is my wrong ?
Thanks very much.

Well.. please try below steps.
1. e-admin > Save application
2. e-admin > process security
3. copy those packages from apshell to your appset
4. delete current package and re-register it.
I suspect
    1. security issue because there was no log file.
    2. File/ folder path is incorrect with UNC path. (Shared name might be the problem)
I hope it will help you.
James Lim

Similar Messages

  • How to stream one table twice (with different names) in another schema ?

    hello guys,
    i have to replicate one table (TAB_1) from one schema (SCH_1) on source database (DB_1) twice to schema (SCH_2) on target database (DB_2) with two different names (TAB_1 and TAB_1_SHORT). TAB_1_SHORT on target db should be a subset (eg. WHERE STATUS = 1) of TAB_1 !
    how to do ? can anyone help me ?
    i tried to realize that this way:
    1) creating 1 capture process with 1 table rule on source db (without any subset rules to capture all changes) for table TAB_1
    2) creating a propagation process without any rules
    3) creating 1 apply process with a table rule for table TAB_1 without any subset_rule but with schema transformation from SCH_1 to SCH_2 (DBMS_STREAMS_ADM.RENAME_SCHEMA) => this works correct !
    4) creating a subset_rule (WHERE STATUS = 1), a schema transformation from SCH_1 to SCH_2 (DBMS_STREAMS_ADM.RENAME_SCHEMA) and a tablename transformation from TAB_1 to TAB_1_SHORT (DBMS_STREAMS_ADM.RENAME_SCHEMA) for table TAB_1_SHORT => doesn`t work, no errors posted in dba_apply_error !
    in another try, i tried to transform the table- and the schemaname in the capture process, with the effect, that my first table TAB_1 wouldn`t be streamed again.
    i`m not sure, what is wrong. i think it must be possible to stream a table to two different targettables in the same schema on another db, isn`t it ?
    hopefully greetings
    Flo

    Hello
    Adding a normal table rule and also a subset rule would not work since the rule would be evaluated only once in the positive rule set. If the normal rule is evaluated first then the subset rule and rest of the rules would not be evaluated at all hence this would not work.
    This can be done using either of the following methods:
    Method 1:
         1. Use the declarative transformation on the capture/apply and rename the schema from SCH_1 to SCH_2.
         2. Now, on the apply site, set a DML Handler for SCH_2.TAB_1
         3. In DML Handler perform the following:
              a. get the column value for STATUS
              b. check if the value for STATUS=1, if yes then modify the object name to TAB_1_SHORT and execute the LCR.
              c. else do not modify the object name (leave it as it is, TAB_1) and execute the LCR.
    Method 2:
         1. Add a DML Handler for SCH_1.TAB_1
         2. In the DML Handler perform:
              a. use set_object_owner method of LCR$_ROW_RECORD to rename the owner to SCH_2
              b. get the column value for STATUS
              c. check if the value for STATUS=1, if yes then modify the object name to TAB_1_SHORT and execute the LCR.
              d. else do not modify the object name (leave it as it is, TAB_1) and execute the LCR.
    Please let me know if you need sample code.          
    Thanks,
    Rijesh

  • SQLError: 'Error #3115: SQL Error.', details:'no such table: 'contact'', operation:'execute', detail

    hi
    just create database with SQLite Database Browser 2.0 b1 after creating the data base when i tried connect it in flash cs4-with air 1.1 its showing me error
    SQLError: 'Error #3115: SQL Error.', details:'no such table: 'contact'', operation:'execute', detailID:'2013' i tried to found every where but did not get the solution of this
    my code is here
    import flash.filesystem.File;
    import flash.data.*;
    import flash.data.SQLConnection;
    import flash.data.SQLStatement;
    import flash.data.SQLConnection;
    var dbFile:File=File.applicationStorageDirectory.resol  vePath("mydb.db");
    var sqlConn:SQLConnection = new SQLConnection();
    var sqlState:SQLStatement = new SQLStatement();
    sqlConn.open(dbFile);
    sqlState.sqlConnection = sqlConn;
    trace(sqlConn.connected+"current status "); // its show "true" here
    sqlState.text = "SELECT name FROM contact";
    sqlState.execute();
    var resultArray:Array = sqlState.getResult().data;
    thanks in advance

    Hi,
    I'm creating my Adobe Air App using Flash CS5 Professional and facing exactly the same error.
    SQLError: 'Error #3115: SQL Error.', details:'no such table: 'categories'', operation:'execute', detailID:'2013'
    My SQLite Db has been created using Firefox extension - SQLite Manager. The db file is placed into the same folder as the .fla and .swf files. The db has three tables namely: categories, period and activity. I don't understand why I'm getting this error. I have even tried copy pasting other source code from AS 3.0 reference guide but same error every time.
    The code below is a modified version of example code in AS 3.0 reference documentation. Can you suggest how the above error can be fixed?
    /you can also reply to me directly at [email protected]
    /regards
    import flash.data.SQLConnection;
    import flash.data.SQLResult;
    import flash.data.SQLStatement;
    import flash.display.Sprite;
    import flash.events.SQLErrorEvent;
    import flash.events.SQLEvent;
    import flash.filesystem.File;
    var conn:SQLConnection;
    var insertCategory:SQLStatement;
    var dbFile:File;
    databaseConnect();
    function databaseConnect():void
    // define where to find the database file
    var appStorage:File = File.applicationStorageDirectory;
    dbFile = appStorage.resolvePath("MyBudgetCalc.db");
    // open the database connection
    conn = new SQLConnection();
    conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);
    conn.addEventListener(SQLEvent.OPEN, openHandler);
    trace("dbFile.exists:"+ dbFile.exists);
    conn.openAsync(dbFile);
    // Called when the database is connected
    function openHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.OPEN, openHandler);
    // start a transaction
    //Object(this).inputfield.text = "openHandler called.. ";
    conn.addEventListener(SQLEvent.BEGIN, beginHandler);
    conn.begin();
    trace("exiting openHandler..");
    // Called when the transaction begins
    function beginHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.BEGIN, beginHandler);
    //trace("beginHandler - SQLEvent message: "+SQLEvent.message);
    Object(this).inputfield.text = "beginHandler called.. ";
    insertCategory = new SQLStatement();
    insertCategory.sqlConnection = conn;
    insertCategory.text = "INSERT INTO categories(id, name) VALUES (', Auto')";
    insertCategory.execute();
    insertCategory.addEventListener(SQLEvent.RESULT, insertCategoryHandler);
        insertCategory.addEventListener(SQLErrorEvent.ERROR, errorHandler);
    trace("exiting beginHandler..");
    // Called after the phone number record is inserted
    function insertCategoryHandler(event:SQLEvent):void
    insertCategory.removeEventListener(SQLEvent.RESULT, insertCategoryHandler);
    insertCategory.removeEventListener(SQLErrorEvent.ERROR, errorHandler);
    // No errors so far, so commit the transaction
    conn.addEventListener(SQLEvent.COMMIT, commitHandler);
    conn.commit();
    trace("exiting insertCategoryHandler after conn.commit()..");
    // Called after the transaction is committed
    function commitHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.COMMIT, commitHandler);
    trace("exiting commitHandler(): Transaction complete..");
    // Called whenever an error occurs
    function errorHandler(event:SQLErrorEvent):void
    trace("entering errorHandler()..");
    // If a transaction is happening, roll it back
    if (conn.inTransaction)
    conn.addEventListener(SQLEvent.ROLLBACK, rollbackHandler);
    conn.rollback();
    trace(event.error.message);
    trace(event.error.details);
    trace("exiting errorHandler()..");
    // Called when the transaction is rolled back
    function rollbackHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.ROLLBACK, rollbackHandler);

  • Nested tables don't look right in design mode

    When I view www.akashhealingcenter.com with IE or Safari,
    everything looks fine. However, when I open the page in DW 2004,
    the tables don't look correct while in design or code/design mode.
    I've driven myself nuts trying to find out what I can do so
    that it looks correct.
    If I can get it to look right, I can turn daily maintenance
    (text updates mostly) to someone else - however, with the design
    looking so unlike the actual web page, I can't.
    I'm assuming the nested tables, graphic image backgrounds in
    the table data, etc. are driving DW 2004 nuts. I really don't want
    to spring for a new version of DW, so I hope that's not the answer.
    Thanks for the help.

    > The backgrounds won't matter a jot because as they are
    link with a full
    > path url nothing will appear in DW design view locally.
    Will do in DW8/CS3....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Osgood" <[email protected]> wrote in
    message
    news:fc86fc$ra2$[email protected]..
    > Dougmo2003 wrote:
    >
    >> When I view www.akashhealingcenter.com with IE or
    Safari, everything
    >> looks fine. However, when I open the page in DW
    2004, the tables don't
    >> look correct while in design or code/design mode.
    >
    >
    > What exactly do you mean by 'Dont look correct'? The
    link yu provided
    > looks ok in my DWMX04 design view.
    >
    > Not much styling, as that is mostly provided by the
    background images, but
    > everything seems to be accessible to work on.
    >
    > I have'nt checked any other pages of the site except
    your home page.
    >
    >
    >
    >> I'm assuming the nested tables, graphic image
    backgrounds in the table
    >> data, etc. are driving DW 2004 nuts.
    >
    >
    > The backgrounds won't matter a jot because as they are
    link with a full
    > path url nothing will appear in DW design view locally.
    >

  • RMAN  for stream Instantiating

    Hi Experts,
    We set up a schema level stream with 450G size. The exp/ or data pump take long time over thousdans miles between two database.
    Could friend show some example how to make a RMAN to take a stream instantiating?
    we user oracle10GR2 in both window 32 bit SP@ and red hat 64 bit OS platform.
    Thanks very much!
    Jim

    Take your RMAN backup ... FTP it to the remote site ... restore it. Nothing could be simpler.
    Just pretend it is a disaster recovery exercise ... because that is precisely what it is. If you fail this test you can not recover from a disaster and should focus on that first.

  • Determinations don't execute if I call action from determination

    Hello,
    I need to trigger an action from a determination. If I do it action executes, however all determinations are skipped. And as a result calculated fields remain with wrong values. I debugged a lot, and found that determination don't execute if action was triggered during internal update (like other determination). As for me - it it huge undocumented drawback that can lead to big problems.
    Why it was done in such way and what should I do?

    Hi Johnny,
    I had a similar requirement. In my case I had to trigger a validation from an action.
    So I had an object created type ref to the validation class & then called the execute method of that validation class.
    So in your case, trigger the action class in the required determination. So that after the execution of the action class is completed it will go back to determination & the rest of the determinations will be followed.
    Hope this helps you.
    Regards,
    Sanket.

  • Re: Toshiba system driver don't execute after instalation

    toshiba system driver don't execute after instalation in windows 8 64 bit

    Hi
    I dont have this notebook model but if you try to install own Win8 version please install all stuff following this install order:
    Windows 8
    Intel RAID Driver
    Intel Chipset SW Installation Utility
    Intel Management Engine Interface
    Intel Rapid Storage Technology Driver
    Intel Display Driver
    NVIDIA Display Driver
    Realtek Audio Driver
    Intel Rapid Start Technology Software
    SRS Premium Sound
    Realtek Card Reader
    Realtek LAN Driver
    Wireless LAN Driver
    Intel Wireless Display
    Realtek Bluetooth Filter Driver Package
    Synaptics Touch Pad Driver
    TOSHIBA Flash Cards Support Utility
    TOSHIBA System Driver
    and so on.
    Toshiba system driver can be downloaded from here .

  • Oracle Streams ORA-23616: Failure in executing block 167 for script

    oracle : Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    os : linux i686 i686 i386 GNU/Linux
    application : testing streams for schema ROOT
    1. Both the databases INDCTRAK, INDDTRAK are in archive.
    2. DB link created
    CREATE DATABASE LINK dbl_INDDTRAK CONNECT TO strmadmin IDENTIFIED BY strmadmin USING 'INDDTRAK';
    3. tbs created
    CREATE TABLESPACE streams_tbs datafile '/u02/oradata/INDDTRAK/streams01.dbf' size 100m;
    4 user created
    CREATE USER strmadmin IDENTIFIED BY strmadmin DEFAULT TABLESPACE streams_tbs TEMPORARY TABLESPACE temp
    QUOTA UNLIMITED ON streams_tbs;
    5. All req. grants
    GRANT CONNECT, RESOURCE, DBA ,Select_CATALOG_ROLE,
    SELECT ANY DICTIONARY TO strmadmin;
    6. grants
    BEGIN
    DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE (Grantee => 'strmadmin',Grant_privileges => true);
    END;
    PL/SQL procedure successfully completed.
    7. Created directory
    CREATE OR REPLACE DIRECTORY ADMIN AS '/u02/oradata/INDDTRAK/streams';
    step 2-7 executed without errors
    8.run with perform_actions as false
    SQL> BEGIN
    2 DBMS_STREAMS_ADM.MAINTAIN_SCHEMAS(
    3 schema_names =>'ROOT',
    4 source_directory_object =>'ADMIN',
    5 destination_directory_object =>'ADMIN',
    6 source_database => 'INDCTRAK',
    7 destination_database => 'INDDTRAK',
    8 perform_actions => false,
    9 script_name => 'schema_replication.sql',
    10 script_directory_object => 'admin',
    11 dump_file_name => 'ROOT.DMP',
    12 capture_name => 'capture_ROOT',
    13 capture_queue_table => 'rep_capture_queue_table',
    14 capture_queue_name => 'rep_capture_queue',
    15 capture_queue_user => null,
    16 propagation_name => 'prop_ROOT',
    17 apply_name => 'apply_ROOT',
    18 apply_queue_table => 'rep_dest_queue_table',
    19 apply_queue_name => 'rep_dest_queue',
    20 apply_queue_user => null,
    21 log_file => 'exp.log',
    22 bi_directional => false,
    23 include_ddl => true,
    24 instantiation => dbms_streams_adm.instantiation_schema_network);
    25 END;
    26 /
    9. when running perform_actions true getting error
    SQL> BEGIN
    2 DBMS_STREAMS_ADM.MAINTAIN_SCHEMAS(
    3 schema_names =>'ROOT',
    4 source_directory_object =>'ADMIN',
    5 destination_directory_object =>'ADMIN',
    6 source_database => 'INDCTRAK',
    7 destination_database => 'INDDTRAK',
    8 perform_actions => TRUE,
    9 script_name => 'schema_replication.sql',
    10 script_directory_object => 'admin',
    11 dump_file_name => 'ROOT.DMP',
    12 capture_name => 'capture_ROOT',
    13 capture_queue_table => 'rep_capture_queue_table',
    14 capture_queue_name => 'rep_capture_queue',
    15 capture_queue_user => null,
    16 propagation_name => 'prop_ROOT',
    17 apply_name => 'apply_ROOT',
    18 apply_queue_table => 'rep_dest_queue_table',
    19 apply_queue_name => 'rep_dest_queue',
    20 apply_queue_user => null,
    21 log_file => 'exp.log',
    22 bi_directional => false,
    23 include_ddl => true,
    24 instantiation => dbms_streams_adm.instantiation_schema_network);
    25 END;
    26 /
    BEGIN
    ERROR at line 1:
    ORA-23616: Failure in executing block 167 for script
    4D2E52386C84C1CAE040A8C0FC015222
    ORA-06512: at "SYS.DBMS_RECOVERABLE_SCRIPT", line 560
    ORA-06512: at "SYS.DBMS_RECOVERABLE_SCRIPT", line 583
    ORA-06512: at "SYS.DBMS_STREAMS_MT", line 7673
    ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 2606
    ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 2667
    ORA-06512: at line 2
    10 errors
    SQL> select * from dba_recoverable_script_errors;
    SCRIPT_ID BLOCK_NUM ERROR_NUMBER
    ERROR_MESSAGE
    ERROR_CRE
    4D2E52386C84C1CAE040A8C0FC015222 167 -39001
    ORA-39001: invalid argument value
    ORA-06512: at "SYS.DBMS_RECO_SCRIPT_INVOK", line 130
    ORA-06512: at "SYS.DBMS_STREAMS_RPC", line 447
    14-MAY-08
    I could not find much explanation on net.
    pl. help in case it is already solved.

    Hi,
    we are implementing datavault on an existing 11g DB.The database is up and running fine , but DBCA shows this error when I am trying to configure datavault using DBCA.
    I have created a spfile from the same pfile, and Db does not show any error while coming up or shutting down. The issue comes only while using DBCA. I shall try minimizing the parameters and try again.
    Thanks
    Pankaj

  • Getting values From Table in method execute??

    Hi,
    I'm using JDEV 10.1.2 and UIX, i have a table with a singleSelection component.
    I'm trying to send the values of the selected row to an action, in the primaryClientAction property of the submitButton i'm adding an action parameter with the key value = CveConcept and the Value &{bindings.SrvCConceptosView1.CveConcepto}, in the execute method i'm getting the parameters using request.getParameter("CveConcepto"). The problem is that it seems that the value is saved in cache or something like that because when i select a diferent row, the value of the last row is sended, only by clicking two times the submitButton the correct selected parameter is sended.
    Am i doing this the correct way?
    Is there a different way to send table values to the execute method from a submitButton?
    I hope some one can help.
    Thank you.

    Wouldn't a more direct approach like so help out ? :-
    Once you have the table with the single selection component enabled. Within the execute method of your managed bean ( or any other method you refer to in the action tag ) , get hold of the view Object and simply doing a getCurrentRow , would get hold of the row with all the required attribute details.....
    Or am i understanding your requirement differently ?
    Cheers
    K

  • Report and Alert don't executed in the error handler with a JMS proxy service

    Hi,
    I'm working with OSB 11.1.1.4.0 and I'm facing a problem with the error handler of my JMS proxy service.
    My error handler contains two main elements :
    - a Report action
    - an Alert with a JMS destination defined
    When the business service failed the message remain in the queue. It's the expected behavior.
    The problem is :
    - the report is missing
    - the alert is raised but missing in the JMS destination defined in the Alert setting.
    I've noticed if I add a Reply with Failure or Success, Report and Alert are successfully executed.
    Unfortunately the message don't remain in the JMS queue.
    What can I do in order to have my report/alert done and the JMS transaction rollback in order to keep the message in the queue ?
    I've already met this problem in the past with alsb v3 and my solution was to add Service Callout in the error handler in order to externalize these actions.
    This solution is not convenient and I hope another solution is possible.

    Inventorying workgroups can be difficult, especially when it comes to remote access and network security. Because workgroups are not centrally managed, some of the items discussed in this
    wiki article on preparing your workgroup environment may require you to visit each machine individually.
    For non-domain credentials, you do not use the <systemname>\<user> format, you simply enter the user name. Regarding how to enter the credentials, if you have an account that uses the same username and password on all machines and is an administrator
    on all of those machines, then you can enter that in the All computers credentials page of the wizard. You can also do this if they are different user names. However, if some machines have an account with the same user name, such as Administrator,
    but different passwords on each machine, you will need to use the Manually enter computer names discovery method, and then enter the information for each group or each machine.
    As you can tell, workgroup environments can quickly negate any benefit that the agentless inventory nature of MAP provides.
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • Can any one tell me why I have photos on my iPhone, iPad, but not my PC? The photos are in my photo stream, but they don't automatically go into the folder. I've had to put them in there, so they obviously aren't linked up to the other devices.

    Can anyone tell me why my PC doesn't automatically update with my photos. I' m pretty sure I have all the right setting on. When I go to iPhoto's there's nothing there. I have my photo stream folder with pictures I have had to transfer in. The photos don't show on my PC and my recently acquired iPad. Only on the original iPhone device.

    This behavior is normal. Since photos in anything other than the camera roll had to come from your computer, you can not sync them from the phone to the computer. In addition, the photos on the phone are not stored at their original resolution, but are optimized for the display of the phone.
    You eill either need to restore from the backup you made of your computer before you re-formatted it, or you will need to invest in 3rd party software to extract the low res photos from the phone.

  • Editable columns in table don't select the whole row

    I am new to the forums and posted this to the wrong one the first time and I am not sure how to move it so I am just reposting it here. Sorry.
    I have a table with 7 columns. 2 of them are non-editable and the rest are either radio buttons or check boxes. When I click on the 2 non-editable columns, the whole row gets highlighted. When I click on any of the editable columns, the button is selected, but the whole row is not highlighted. If I made the editable columns non-editable then the whole row gets highlighted when the column is clicked on. I want the button selected and the row highlighted when the editable columns are clicked on. Here is some relevant code:
    class PackageTable extends JPanel
        public PackageTable(String pathfile)
           fieldsok = true;
           errorfield = new JTextField(250);
           startfield = new JTextField(250);
           stopfield = new JTextField(250);
           tableModel = new MyTableModel();
           table = new JTable(tableModel)
             public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex)
               Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
               if (vColIndex == 0)
                 c.setBackground(new Color(238,238,238));
               else
                 c.setBackground(new Color(255,255,255));
               boolean selected = isRowSelected(rowIndex);
               if (selected)
                 c.setBackground(Color.yellow);
               return c;
           table.setPreferredScrollableViewportSize(new Dimension(300, 1000));
           table.setRowSelectionAllowed(true);
           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
           TableColumn column = null;
           for (int col = 0; col < 7; col++)
              column = table.getColumnModel().getColumn(col);
              if (col == 0)
                column.setPreferredWidth(30);
              else if (col == 1)
                column.setPreferredWidth(300);
              else if (col == 2)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 3)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 4)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if ((col == 5) || (col == 6))
                column.setPreferredWidth(10);
      class RadioButtonRenderer implements TableCellRenderer
        public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column)
          if (isSelected)
            setForeground(table.getSelectionForeground());
            setBackground(table.getSelectionBackground());
          else
            setForeground(table.getForeground());
            setBackground(table.getBackground());
          if (value == null)
            return null;
          return (Component) value;
      class RadioButtonEditor extends DefaultCellEditor implements ItemListener
        private JRadioButton button;
        public RadioButtonEditor(JCheckBox checkBox)
          super(checkBox);
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          if (value == null)
            return null;
          button = (JRadioButton) value;
          button.addItemListener(this);
          return (Component) value;
        public void addCellEditorListener(CellEditorListener listener)
          listenerList.add(CellEditorListener.class, listener);
        public void removeCellEditorListener(CellEditorListener listener)
          listenerList.remove(CellEditorListener.class, listener);
        protected void fireEditingStopped()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingStopped(changeEvent);
        protected void fireEditingCanceled()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingCanceled(changeEvent);
        public void cancelCellEditing()
          fireEditingCanceled();
        public boolean stopCellEditing()
          fireEditingStopped();
          return true;
        public Object getCellEditorValue()
          return button;
        public boolean isCellEditable(EventObject event)
          return true;
        public boolean shouldSelectCell(EventObject event)
          return true;
        public void itemStateChanged(ItemEvent e)
          super.fireEditingStopped();
      class MyTableModel extends AbstractTableModel
        String[] columnNames = {"","Configuration Files","Sorts","Plots","Both","Print","Alerts"};
        public MyTableModel() { }
        public int getColumnCount()
          return columnNames.length;
        public int getRowCount()
          return totaldata.size();
        public String getColumnName(int col)
          return columnNames[col];
        public Object getValueAt(int row,int col)
          return(((Vector)totaldata.get(row)).get(col));
        public Class getColumnClass(int c)
          return getValueAt(0, c).getClass();
        public boolean isCellEditable(int row, int col)
          if ((col == 0) || (col == 1))
            return false;
          else
            return true;
        public void setValueAt(Object value, int row, int col)
          Vector v1 = new Vector();
          v1 = (Vector)totaldata.get(row);
          v1.set(col,value);
          if (col == 1)
             if (((String)value).indexOf("/") == -1)
               JOptionPane.showMessageDialog(pdsframe, "The CONFIG file that was entered on line " + (row+1) + " is not valid.");
               v1.set(col,(Object)"");
               return;
          fireTableCellUpdated(row, col);
          fireTableChanged(new TableModelEvent(this));
        public void addNewRow(Vector newRow)
          totaldata.add(newRow);
          fireTableRowsInserted(totaldata.size()-1, totaldata.size()-1);
        public void deleteRow(int Row)
          totaldata.remove(Row);
          fireTableRowsDeleted(totaldata.size()-1, totaldata.size()-1);
      }I have searched forever to try to find how to do this and I can't seem to get it right. If all the radiobuttons in one column are selected and I click on one of those rows in one of those columns, then the whole row is highlighted.
    Can anyone help me out?
    Thanks.
    esk3 {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Sorry. I didn't know that I had to provide something that could be executed. I am going to try to put enough in so that it can. This is part of a larger program and this frame is called from another frame. Here it is. I hope it works.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Dimension.*;
    import java.util.*;
    import java.text.*;
    // Java extension packages
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import javax.swing.JTable.*;
    import javax.swing.JScrollPane.*;
      private JFrame     pdsframe;
      private String printchecked;
      private String alertschecked;
      private JTextField cb;
      private JTextField pf;
      private JScrollPane scrollpane;
      private JTable table;
      private MyTableModel tableModel;
      private Vector totaldata;
      private JLabel startlabel;
      private JLabel stoplabel;
      private JTextField startfield;
      private JTextField stopfield;
      private JTextField errorfield;
      private boolean fieldsok;
      class MyTableModel extends DefaultTableModel
        String[] columnNames = {"","Configuration Files","Sorts","Plots","Both","Print","Alerts"};
        public MyTableModel() { }
        public int getColumnCount()
          return columnNames.length;
        public int getRowCount()
          return totaldata.size();
        public String getColumnName(int col)
          return columnNames[col];
        public Object getValueAt(int row,int col)
          return(((Vector)totaldata.get(row)).get(col));
        public Class getColumnClass(int c)
          return getValueAt(0, c).getClass();
        public boolean isCellEditable(int row, int col)
          if ((col == 0) || (col == 1))
            return false;
          else
            return true;
        public void setValueAt(Object value, int row, int col)
          Vector v1 = new Vector();
          v1 = (Vector)totaldata.get(row);
          v1.set(col,value);
          if (col == 1)
             if (((String)value).indexOf("/") == -1)
               JOptionPane.showMessageDialog(pdsframe, "The CONFIG file that was entered on line " + (row+1) + " is not valid.");
               v1.set(col,(Object)"");
               return;
          fireTableCellUpdated(row, col);
          fireTableChanged(new TableModelEvent(this));
        public void addNewRow(Vector newRow)
          totaldata.add(newRow);
          fireTableRowsInserted(totaldata.size()-1, totaldata.size()-1);
        public void deleteRow(int Row)
          totaldata.remove(Row);
          fireTableRowsDeleted(totaldata.size()-1, totaldata.size()-1);
      class RadioButtonRenderer implements TableCellRenderer
        public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column)
          if (isSelected)
            setForeground(table.getSelectionForeground());
            setBackground(table.getSelectionBackground());
          else
            setForeground(table.getForeground());
            setBackground(table.getBackground());
          if (value == null)
            return null;
          return (Component) value;
      class RadioButtonEditor extends DefaultCellEditor implements ItemListener
        private JRadioButton button;
        public RadioButtonEditor(JCheckBox checkBox)
          super(checkBox);
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          if (value == null)
            return null;
          button = (JRadioButton) value;
          button.addItemListener(this);
          return (Component) value;
        public void addCellEditorListener(CellEditorListener listener)
          listenerList.add(CellEditorListener.class, listener);
        public void removeCellEditorListener(CellEditorListener listener)
          listenerList.remove(CellEditorListener.class, listener);
        protected void fireEditingStopped()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingStopped(changeEvent);
        protected void fireEditingCanceled()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingCanceled(changeEvent);
          }      fireEditingStopped();
          return true;
        public Object getCellEditorValue()
          return button;
        public boolean isCellEditable(EventObject event)
          return true;
        public boolean shouldSelectCell(EventObject event)
          return true;
        public void itemStateChanged(ItemEvent e)
          super.fireEditingStopped();
      class PackageTable extends JPanel
        public PackageTable(String pathfile)
           fieldsok = true;
           errorfield = new JTextField(250);
           startfield = new JTextField(250);
           stopfield = new JTextField(250);
           tableModel = new MyTableModel();
           table = new JTable(tableModel)
             public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex)
               Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
               if (vColIndex == 0)
                 c.setBackground(new Color(238,238,238));
               else
                 c.setBackground(new Color(255,255,255));
               boolean selected = isRowSelected(rowIndex);
               if (selected)
                 c.setBackground(Color.yellow);
               return c;
           table.setPreferredScrollableViewportSize(new Dimension(300, 1000));
           table.setRowSelectionAllowed(true);
           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
           TableColumn column = null;
           for (int col = 0; col < 7; col++)
              column = table.getColumnModel().getColumn(col);
              if (col == 0)
                column.setPreferredWidth(30);
              else if (col == 1)
                column.setPreferredWidth(300);
              else if (col == 2)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 3)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 4)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if ((col == 5) || (col == 6))
                column.setPreferredWidth(10);
          JScrollPane scrollPane = new JScrollPane(table);
          scrollPane.setBounds(20,180,1000,300);
          JLabel pflabel = new JLabel("Package File: ");
          pf = new JTextField(pathfile);
          cb = new JTextField(250);
          startlabel = new JLabel("START_TIME = ");
          stoplabel = new JLabel("STOP_TIME = ");
          JLabel typelabel = new JLabel("TYPE OF FORMAT TO OUTPUT");
          JButton savebutton = new JButton("Save and Run");
          JButton jbtAddRow = new JButton("Add New Row");
          JButton jbtUpdateRow = new JButton("Update Row");
          JButton jbtDeleteRow = new JButton("Delete Row");
          JButton cancelbutton = new JButton("Cancel");
          cb.setEditable(false);
          cb.setBounds(130,230,100,30);
          cb.setEnabled(false);
          cb.setVisible(false);
          pflabel.setBounds(20,20,100,30);
          pf.setEditable(false);
          pf.setBounds(130,20,300,30);
          startlabel.setBounds(20,90,100,30);
          startfield.setEditable(false);
          startfield.setBackground(new Color(255,255,255));
          startfield.setBounds(130,90,300,30);
          stoplabel.setBounds(20,120,100,30);
          stopfield.setEditable(false);
          stopfield.setBackground(new Color(255,255,255));
          stopfield.setBounds(130,120,300,30);
          typelabel.setBounds(525,150,400,30);
          savebutton.setBounds(130,500,130,30);
          jbtAddRow.setBounds(280,500,130,30);
          jbtUpdateRow.setBounds(430,500,130,30);
          jbtDeleteRow.setBounds(580,500,130,30);
          cancelbutton.setBounds(730,500,130,30);
          add(scrollPane);
          add(pflabel);
          add(pf);
          add(startlabel);
          add(stoplabel);
          add(startfield);
          add(stopfield);
          add(typelabel);
          add(jbtAddRow);
          add(jbtUpdateRow);
          add(jbtDeleteRow);
          add(savebutton);
          add(cancelbutton);
      public void createAndShowGUI() {
        //Create and set up the window.
        pdsframe = new JFrame("PDS Batch Parameters");
        pdsframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        totaldata = new Vector();
        //Create and set up the content pane.
        PackageTable newContentPane = new PackageTable(pathfile);
        newContentPane.setOpaque(true); //content panes must be opaque
        pdsframe.setContentPane(newContentPane);
        //Display the window.
        pdsframe.setLayout(null);
        pdsframe.setSize(1100,700);
        pdsframe.setLocationRelativeTo(null);
        pdsframe.setFocusableWindowState(true);
        pdsframe.setVisible(true);
        pdsframe.show();
        pdsframe.setAlwaysOnTop(true);
        pdsframe.requestFocus();
    public void main()
        Toolkit.getDefaultToolkit().beep();
        createAndShowGUI();
    }Does this help? I hope it works. These are the relevant parts. Thanks.
    esk3

  • Who locked my table (don't have dba rights)

    Hi Gurus,
    I am facing locking issue.
    A job is running since last 06 hours and i am not getting any output. This job normally takes 01 hr or Maximum 01:30 (hrs: min).
    I do not have sharp DBA skills.
    Can someone let me know how to know either my table is locked by some other job/user?
    Please remember, i don't have DBA/sysdba rights. I can see only in my schema.
    Appreciate prompt replies.
    Thankyou.

    How do you know that you are waiting on a lock and that the CBO has just not chosen a really bad plan for this specific execution of the query?
    Ask the DBA to set up a role that has select privilege on v$session, v$process, v$lock, v$sql_text, and v$sql_plan and to grant that role to you (and probably all the developers).
    Column v$session.lockwait will show if you session is waiting.
    And you can view the actual plan for your session via v$sql_plan. This plan may vary from what explain plan shows if bind variable peeking or another Oracle run time tuning feature like SQL Profiles is in use.
    HTH -- Mark D Powell --

  • Delete From More than 1 table without using execute immediate

    Hi,
    Am new to PL/SQL, I had been asked to delete few of the table for my ETL jobs in Oracle 10G R2. I have to delete(truncate) few tables and the table names are in another table with a flag to delete it or not. So, when ever I run the job it should check for the flag and for those flag which is 'Y' then for all those tables should be deleted without using the Execute Immediate, because I dont have privilages to use "Execute Immediate" statement.
    Can anyone help me in how to do this.
    Regards
    Senthil

    Then tell you DBA's, or better yet their boss, that they need some additional training in how Oracle actually works.
    Yes, dynamic sql can be a bad thing when it is used to generate hundreds of identical queries that differ ony in the literals used in predicates, but for something like a set of delte table statements or truncate table statements, dynamic sql is no different in terms of the effect on the shared pool that hard coding the sql statements.
    This is a bad use of dynamic sql, because it generates a lot of nearly identical statements due to the lack of bind variables. It is the type of thing your DBA's should, correctly, bring out the lead pipe for.
    DECLARE
       l_sql VARCHAR2(4000);
    BEGIN
       FOR r in (SELECT account_no FROM accounts_to_delete) LOOP
          l_sql := 'DELETE FROM accounts WHERE account_no = '||r.account_no;
          EXECUTE IMMEDIATE l_sql;
       END LOOP;
    END;This will result in one sql statement in the shared pool for every row in accounts_to_delete. Although there is much else wrong with this example, from the bind variable perspective it should be re-written to use bind variables like:
    DECLARE
       l_sql  VARCHAR2(4000);
       l_acct NUMBER;
    BEGIN
       FOR r in (SELECT account_no FROM accounts_to_delete) LOOP
          l_sql := 'DELETE FROM accounts WHERE account_no = :b1';
          EXECUTE IMMEDIATE l_sql USING l_acct;
       END LOOP;
    END;However, since you cannot bind object names into sql statements, the difference in terms of the number of statements that end up in the shared pool between this:
    DECLARE
       l_sql VARCHAR2(4000);
    BEGIN
       FOR r in (SELECT table_name, delete_tab, trunc_tab
                 FROM tables_to_delete) LOOP
          IF r.delete_tab = 'Y' THEN
             l_sql := 'DELETE FROM '||r.table_name;
          ELSIF r.trunc_tab = 'Y' THEN
             l_sql := 'TRUNCATE TABLE '||r.table_name;
          ELSE
             l_sql := NULL;
          END IF;
          EXECUTE IMMEDIATE l_sql;
       END LOOP;
    END;and something like this:
    BEGIN
       DELETE FROM tab1;
       DELETE FROM tab2;
       EXECUTE IMMEDIATE 'TRUNCTE TABLE tab3';
    END;or this as a sql script
    DELETE FROM tab1;
    DELETE FROM tab2;
    TRUNCTE TABLE tab3;is absolutley nothing.
    Note that if you are truncating some of the tables, and wnat/need to use a stored procedure, you are going to have to use dynamic sql for the truncates anyway since trncate is ddl, and you cannot do ddl in pl/sql wiothout using dynamic sql.
    John

  • TABLE DON�T UPDATE

    Hi guys, I am in a limite of nervous attach!!!!! Please help me....
    The problem is: I create a interface that change the table columns, based on a Combobox selecting another table. Just for visualize the table from my DB.
    This code don�t update my table
    fields = swttSection.getFields();                       //get the swtt section fields                                       
    tagTableModel = new TagTableModel();        //create a new table model
    /* For each field */
    for(int j = 0; j < fields.size(); j++)
        swttField = (SwttField)fields.elementAt(j);                        //get the field                      
        tagTableModel.addColumn(swttField.getName());        //insert the new column
    }//End for
    createTagTable();                                       //update the table....And this update. But this don't is wich I want. Because it mantain the old columns!!! (The JTable become a BIG column).
    fields = swttSection.getFields();                       //get the swtt section fields                                       
    /* For each field */
    for(int j = 0; j < fields.size(); j++)
        swttField = (SwttField)fields.elementAt(j);                        //get the field                      
        tagTableModel.addColumn(swttField.getName());        //insert the new column
    }//End for
    createTagTable();                                       //update the table

    Hi, I am here again. I think that I don't explaint the problem clearly....
    I have a DataBase with 5 tables, each table has your own fields, and I waana create a JTable (GUI) for the user edit the result and then, write, read, udpate, delete, etc.....
    I create a DefaulttableModel...
    When my program start.. In the constructor I instianciate de DefaultTableModel
    DefaultTableModel model = new DefaultTableModel();Then I create a JcomboBox where the user can choose another tables. When the user do this action, I would like to change the table columns (because each table has their own columns, and this fields are different).
    The I code...
    JComboBox table = new JcomboBox();
    table.addActionListener(this);
    public void actionPerformed(ActionEvent e){
       if(e.getSource() == table)
          model = new DefaultTableModel();                //I do this to "zero" the table, for create another one
         for(int col = 0; col < sizeTable; col++)
             model.addColumn(header[col]);
          getContentPane().add(new JScrollPane(new JTable(model)));
       }//end if
    }//End actionPerformed()The problem is: The JTable don't "zero" and show the new structure, it always mantain the first structure.
    Just for debug I get out the new DefaulTableModel and it works adding the tables to the end.. But it is not correct because I just attach new columns form table CLIENTE on the table PRODUCT for example. please help.
    Thanks. Giscard

Maybe you are looking for

  • Please advise - new iMac i7, old iMac G5 PPC, and migration assistant

    I just received my new iMac i7 and am getting ready to use Migration Assistant. However, I have some questions: The logic board on my old machine died, so I pulled out the Hard Drive and put it in an enclosure. This is what I will be using to make th

  • Business area is not reflecting in A/c doc

    Hi After creating the sales invoice when accounting doc is generated i can only see the business are for customer line account and sales receivable a/c, but for other accounts like service tax, edu cess, higher edu cess business area is not picking.(

  • I inadvertantly deleted my tool bar and cannot replace it

    I deleted the toolbar on my homepage and am unable to replace it. I have uninstalled and reinstalled firefox to no avail. Help!

  • 62HM84 HDMI port failure?

    On my 62HM84, the HDMI port has stopped working after about six years.  It's not the cable, as I've tested that.  When connected to my Comcast receiver, if I change the input to HDMI I get a picture for about three seconds and then the screen goes bl

  • Pls anybody tel me what is self life / ageing report in mm

    hi all,               i have to develop self life ageing report.              pls anybody tel me what is self life / ageing report in mm.              pls send me template and code. regards vikas