Selecting from multiple sqlserver databases with HS

I have setup HS from oracle 8.1.7 to sqlserver 7.0 for one database and it works fine. I have about six databases on the same NT server and will like to select from the various databases, the tables I need to update Oracle. I have edited the odbc.ini file to add the other sqlserver database entries. I have also updated the inithsmsql.ora file to add multiple entries for the other databases. When I select from distinct tables in the databases it works fine. But if I have the same tables in database A,B and C and want to select column from table A in database A, I get the result for table A in database B. Is there a way to select from identical tables from different databases and get the result for the table and database that is needed.
ie select column from data_souce_name.table_name@hsmsql. Is there a syntax or configuration for that.
Thanks

Vira I am actually making multiple entries of these parameters in the inithsmsql.ora file. The first data source is test then I will copy it and edit it for another data source test1 etc. Even making one init.ora file in the hs/admin directory for the databases how will the system know from which database to query if one table exist in more than one database. Also even adding multiple listeners for the different sids won't help as the program= will be same for all. ? multiple tnsnames entries?
HS_FDS_CONNECT_INFO = test
HS_FDS_TRACE_LEVEL = 2
HS_FDS_TRACE_FILE_NAME = test5.trc
HS_FDS_SHAREABLE_NAME = /dbdata/odbc/lib/libodbc.so

Similar Messages

  • How to trigger XI scenario from a SQLServer Database?

    We plan to realize the following scenario -> Database(Receiver System) - XI - RFC/BAPI (Sender system)
    What's the best practice/technique to invoke the 'pull' from the SQLserver database ?
    The requirement is to realize this as 'on-demand' initiate i.e. trigger the interface from Receiver system only when it needs the data from R/3
    Thanks in advance.
    Mustafa

    JDBC adapter works with pooling intervals.
    It will pool from time to time (configurable) for changes in some DB, and when that DB is changed, then it will send the new entries to XI and trigger the relevant scenario.
    For your case, I'm not sure which would be the best approach.
    Maybe you could populate some dummy table with a "request data" entry whenever you need it.
    Then, when XI sees this new request entry, it will trigger an interface. There, you could either call a BPM, lookup data in RFC and call another interface back to DB, or you could try async/sync bridge without BPM, using module adapters, as explained in this thread: File - RFC - File without a BPM - Possible from SP 19.
    Not too pretty, but might work.
    Regards,
    Henrique.

  • Select from multiple entries in table cell.

    Hi All,
    I'm having issues when trying to do a simple select from an access database:
    <CFQUERY NAME="GetAllByMonth" DATASOURCE="dsn">
    SELECT * FROM table WHERE  strMonth = '#url.strMonth#' AND strDisplay = Yes
    order by strOrder_id
    </CFQUERY>
    Table cells in rows contain coma separated values:
    January, February, March, April, May, June, October, November, December
    Unfortunately the query returns no values. I've tried changing the "=" with "like", "contains" but with no results.
    Difficult to know what to search for so any help gratefully recieved.
    Ta
    Trevor

    Here is an absolutely crazy "hack" that I once used when dealing with a database like that.  It had hundreds of thousands of rows with comma separated values that for various legacy could not be changed.
    So one day I did this ...  SELECT DISTINCT column_from_purgatory FROM table_from_hell.
    Much to my surprise, there were less than a hundred DISTINCT values in that column.  (They were, fortunately, reasonably-sized VARCHARs.)
    So I built a table of those values, then created a separate table into which I could put each of the comma-separated parts, and then wrote a small (Perl) script to populate the two.  For example, a row containing "January, March, April" would be linked to three rows containing one month-name each.
    Now, as long as I had a way to be sure that this pair of lookup-tables was always complete (which was slightly problematic), I had something that I could actually JOIN to.  It wasn't pretty ... in fact, it was butt-ugly ... but it saved a tremendous amount of processing time for this application.

  • How do I select from multiple schema's

    How do I select from multiple schema's
    Tried:
    SELECT * FROM schema1.table1, schema2.table2
    WHERE schema1.table1.column1 = schema2.table2.column2;
    Errored......

    Thanks
    We finally got in touch with our DBA and he said the same thing.
    SELECT t1.*,
    t2.*
    FROM schema1.table1 t1,
    schema2.table2 t2
    WHERE t1.column1 = t2.column2;
    I'll try it afther I finish a task my boss just gave me.
    BRB then.

  • How to select from multiple addresses of account in IC Web Client

    Hi all,
    We are implementing a B2C scenario for IC Web Client. We have customers with multiple addresses. However, when we search the acount, only standard address comes to screen.  We want to be able select the related address, and then confirm the acount with that address.
    Is there any way to customize the Web Client in order to be able to select from multiple addresses of the acount?
    Thanks in advance.
    Edited by: Danisman Danisman on Aug 31, 2010 2:52 PM

    Thanks for the answer. Yes, we are using 7.0 but in the account identification screen, there is no personalize button ( I assume you are suggesting adding an addres block by using that button, right?).
    We checked the necessary customizing : there is an entry for fucntional profile PERSONALIZATION : ALL_ENABLED.
    Should we do something else to show the button?
    Thanks again.

  • Is it possible to access a single Lightroom catalogue mounted on a shared drive from multiple computers, each with an individual Lightroom install?

    Is it possible to access a single Lightroom catalogue mounted on a shared drive from multiple computers, each with an individual Lightroom install?
    Thanks.
    Steve Greenberg

    No, Lightroom catalogs cannot be on a networked (shared) drive, and they do not support simultaneous multi-user access

  • Selecting from multiple tables, into one internal table

    Hi,
    What is the best & most efficient method of selecting from multiple table (in my case 6,) into one internal table?
    Thanks,
    John
    Points will be rewarded and all responses will be highly appreciated.

    I have simple example :
    First one - Join 5 tables
    data : f1 type i,
              f2 type i,
              f3 type i.
    start-of-selection.
    get run time field f1.
    write the query 4 or 5 tables join.
    get run time field f2.
    f3 = f2 - f1 ( Total time).
    Second one - joins 3 table and use for all entries
    data : f1 type i,
              f2 type i,
              f3 type i.
    start-of-selection.
    get run time field f1.
    write the query 3 tables join and use for all entries
    get run time field f2.
    f3 = f2 - f1. ( Total time )
    Finally you can have time diffrence between the both sql statement.

  • Select from Multiple tables

    Hi,
    I am doing select from multiple tabels (2) in one SQL query.
    How to get the result as it says.. Column name is incorrect ?
    thanks,
    -raj

    treat the resultset as noraml. You get it in sequence as you have specified the column names. You use rs.getXXX(index) instead of columnname

  • How to select from multiple tables which reside on different data stores ?

    Suppose I have two data stores in one TimesTen instance:
    1) Datastore A:
    table1
    2) Datastore B:
    table2
    I want to make a query like this:
    select ... from table1, table2 where table1.colA = table2.colB
    Can I ? If not, is there a workaround ?
    BTW, because of business, we have to use two or more different datastores, so we can not put table1/table2 in the same datastore.
    Thanks very much.

    You can query multiple TimesTen databases, but your original question was about joining tables from two databases, which is not supported.
    Using Cache Connect to Oracle to query an Oracle database is not distributed. It's still one single Oracle database you are querying. You cannot join a table in the TimesTen database with a table in the Oracle database, this is not allowed.
    If you are willing to share your business requiremens, we can take a look and see what solution might work for you. Would you like to discuss this offline?
    Susan

  • How to select from multiple output tables in the SAP Data Source

    Hi,
    We're using the SAP Data Source to display SAP data in our portal from the Bapi: BAPI_INFORECORD_GETLIST. When defining the Bapi Meta Data we can select data from one of the two output tables (INFORECORD_GENERAL and INFORECORD_PURCHORG). But we want to select data from both tables (some columns we want to show are in INFORECORD_GENERAL and some are in INFORECORD_PURCHORG) .
    How can we do this ?
    With regards,
    Ramon van der Weiden

    You can query multiple TimesTen databases, but your original question was about joining tables from two databases, which is not supported.
    Using Cache Connect to Oracle to query an Oracle database is not distributed. It's still one single Oracle database you are querying. You cannot join a table in the TimesTen database with a table in the Oracle database, this is not allowed.
    If you are willing to share your business requiremens, we can take a look and see what solution might work for you. Would you like to discuss this offline?
    Susan

  • Select from multiple tables through dblink

    I am seeking help. Can I select multiple tables through a dblink from a remote database? I tried, it seems it always return ORA-00933 error. code like this:
    select A.ID, B.CODE, C.TYPE_DESC
    from TABLE_ONE A@db_link , TABLE_TWO B@db_link, TABLE_THREE C@db_link;
    where A.ID = B.ID
    and B.CODE = C.CODE
    Thanks in advance.

    Just as an FYI, from a performance standpoint, it is frequently the case (though certainly not guaranteed) that you'll get better performance creating a view on the remote database that does the join of all three tables and to use that view in your query, particularly if you're also joining in local tables. Optimizing SQL statements across database links tends to be particularly hard, a view often helps force Oracle to join the remote tables on the remote database which is generally what you'd want. Of course, this is not a guarantee, and you can always get explicit with hints to force joins to happen on one or the other system, but this is frequently the easiest starting point.
    Justin

  • Unable To Select From SQL Server table with more than 42 columns

    I have set up a link between a Microsoft SQL Server 2003 database and an Oracle 9i database using Heterogeneous Services (HSODBC). It's working well with most of the schema I'm selecting from except for 3 tables. I don't know why. The common denominator between all the tables is that they all have at least 42 columns each, two have 42 columns, one has 56, and the other one, 66. Two of the tables are empty, one has almost 100k records, one has has 170k records. So I don't think the size of the table matters.
    Is there a limitation on the number of table columns you can select from through a dblink? Even the following statement errors out:
    select 1
    from "Table_With_42_Cols"@sqlserver_db
    The error message I get is:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message [Generic Connectivity Using ODBC]
    ORA-02063: preceding 2 lines from sqlserver_db
    Any assistance would be greatly appreciated. Thanks!

    Not a very efficient and space friendly design to do name-value pairs like that.
    Other methods to consider is splitting those 1500 parameters up into groupings of similar parameters, and then have a table per group.
    Another option would be to use "vertical table partitioning" (as oppose to the more standard horizontal partitionining provided by the Oracle partition option) - this can be achieved (kind of) in Oracle using clusters.
    Sooner or later this name-value design is going to bite you hard. It has 1500 rows where there should be only 1 row. It is not scalable.. and as you're discovering, it is unnatural to use. I would rather change that table and design sooner than later.

  • BPM getting data from multiple JDBC databases

    Hi - a 'high level' question...
    I have a scenario where the first step in my bpm is a receive step which will be a JDBC send adapter/comm channel to a particular database.  The rows returned will have a key field called "ID".  For each of these rows, I need to go to a completely different JDBC database to gather more data based on this key "ID".
    Not sure how to go about this, but this is my best guess
    1) receive step, asynchronous which will be used by the jdbc send adapter
    2) create a block, mode ForEach referring to the messages returned in the initial receive step.  In this block there will be:
    3)THIS IS THE PART I'M CONFUSED ON - do i need a synchronous send step, with the request message being the message from the initial receive and a response message being the message from the JDBC recieve adapter?  How does the "ID" get passed in to select the proper record? How is a SQL created to get the proper record from the second database?
    4 etc) After that, it would be a straight forward transform and send to the target system...which i'm ok with.
    Again, my confusion is how the key field is somehow passed to the second JDBC call.
    any assistance or clarification would be greatly appreciated!  thanks /dave

    HI,
    <i>For each of these rows, I need to go to a completely different JDBC database to gather more data based on this key "ID"</i>
    >>>To gather more data, means you are going to select the data for each key ID. Then this data you need to send to target system right ? If so, you need to have Synchronous Send from BPM.
    Your BPM steps will be like this
    1) Receive the message from Database(JDBC sender)
    2) Block with Foreach
    3) Send the data Synchrnously to the other database with the help of Reciever JDBC adapter
    4) Receive the Response, and Send this Asynchrnoulsy to the Target System.
    DO you need Foreach loop here , i am just thinking ? You can pass multplr Key Values to the JDBC Receiver structure and get the Response at a time.
    For more on JDBC Sync-
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Regards,
    Moorthy

  • Sample PHP Service selecting from multiple tables

    Hi all!
    I have the following challange:
    How do I properly set up my PHP-service to insert, select, update and delete values from multiple tables?
    So far, the standard templates generated by Flash Builder is based on a single table.
    Example: I have 2 tables: [person] and [school]
    [person] has [person_id, first_name, last_name, birthdate]
    [school] has [school_id, person_id, school_name, city]
    One [person] can have multiple [schools]
    How should I define the selectByID function in PHP to be able to have
    First name: [TextInput /]
    Last name: [TextInput /]
    Birthdate: [DateField /]
    Schools:
    [TabBar: School1, School2, School3 /]
    [ViewStack1]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack1]]
    [ViewStack2]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack2]]
    [ViewStack3]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack3]]
    And even more interesting: How do I update all these fields back to the database?

    First, the relationship between school and person is many-to-many NOT one-to-many -- you will need to add a junction table.
    From the form you have given I would handle insertions like this:
    loop through all the schools and see if the school already exist in the DB. If so, then store the school_id. If not, then create a new record and store the id. You should have an array collection of store_ids by the end of the loop
    Check whether the student exists w/in the DB. If so, then you might consider aborting the operation or you could opt to do an update. If the student doesn't exist, then create a new student record and store the new student_id (mysql::insert_id)
    Loop through the school_id array and add new student_id/school_id records into the junction table.
    Retrieving records is much simpler -- it's just a join on the tables i.e. "SELECT * FROM student INNER JOIN school_student ON student.student_id = school_student.student_id INNER JOIN schools ON school_student.school_id = school.school_id WHERE student.first_name = 'John' AND student.last_name = 'Doe' (assuming there aren't more than one John Does of course!).
    - e

  • Select from multiple tables without join statement

    Hey Gurus,
    I would like to make a select from a multiple tables to check if there is any reference to my data. I would like to do it with some elegancy, but I don't know how.
    Is in abap sql possible to do it only with the select statement?
    Or I was also think about a solution that I should fill some data structure with all of the tables which I want to select from and then just loop that data structure and do the select seperately from all of the tables. I just need to check if it founds some results, so no need to store it. If this solution would be fine what data structure should I use?
    Or can tell me what would be the best for this?
    My code for select from one table, which I want to make for multiple tables:
    SELECT SINGLE id_kniznice FROM zbr_t_autori INTO wa_id
           WHERE id_kniznice EQ ls_extract-zview-id_kniznice.
         IF sy-dbcnt > 0.
           MESSAGE i000(zbr_msgc_lib).
           ls_extract-flags-vim_mark = '*'.
           MODIFY extract FROM ls_extract.
    ENDIF.   
    Thank you for any posts.
    Regards,
    Robert

    And there we go again...
    Read this topic:
    For All Entries is NOT better than INNER JOIN in most cases
    And this one:
    inner join vs for all entries
    Also that one:
    Re: LOOP AT vs INNER JOIN
    JOINs are really better than for all entries in most cases. Problem is people tend to ignore basic things like using pks or indexes while making them.

Maybe you are looking for