Keeping an Imported Table up to date

Hi Everyone,
I'm reasonably new to SQL, and I'm hoping someone can help me.
I have an Oracle data view that I've imported in to a database on my SQL Server 2012 server. I'd like to setup a way to ensure that the data remains accurate on the SQL Server by checking regularly for changes on the oracle server or by re-importing the
data on say an hourly basis.
Is this possible and if so where do I need to start looking. I'm guessing it's either a maintenance job or a Data Collection job, but if someone could point me in the right direction, I'd be really grateful.
Many thanks in advance
Neil
Don't forget to mark the answer that resolves your request as 'The Answer' so others may benefit from the resolution.

Hi Guys,
Still having issues, I'm afraid. So that anyone reading this can get an idea of where I'm hitting issues here's what I've done so far:
1) I created a database which I then imported a table to, from an Oracle Server, this worked without fault all rows imported without issue.
2) I created (as advised above) a linked server using the following code:
USE [master]
GO
EXEC master.dbo.sp_addlinkedserver
@server = 'OracleDBs'
,@srvproduct = 'Oracle'
,@provider = 'MSDASQL'
,@datasrc = ''
GO
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname = 'OracleDBs'
,@useself = 'False'
,@locallogin = NULL
,@rmtuser = ''
,@rmtpassword = ''
GO
To clarify I did enter the data source server name and the rmt username and password. To check the server I expanded the Linked Server, expanded the Catalogs, the default database and the Tables folder and found all of expected data.
3) I opened a new query which I opened against my database from number 1 in this list. In that query I entered the following T-SQL:
TRUNCATE TABLE Table_1
INSERT INTO Table_1 SELECT * FROM OracleDBs.default.<SCHEMA>.Table_1
When I enter this the query recognises both the table to truncate and the table to insert in to (which are both the same table) but all I get is a red underline to the linked server details which upon hover states that it is an invalid object name.
Any help here would be great.
Neil
Don't forget to mark the answer that resolves your request as 'The Answer' so others may benefit from the resolution.
Hi Neil,
According to your description, I do a test about truncating a table to insert the target table in SQL Server 2012, even if it has a red underline to the linked server which states an invalid object name, you can still run well. We need to verify if you can
execute successfully or there will some errors. If failed, please post the error message for analysis.
When you creating Linked Server in MS SQL that points to Oracle. You have to install Oracle Client there on the MS SQL host. If you insert data from Oracle to SQL Server, you can use the following statement.
truncate target_table;  
insert into target_table select * from oracle_linked_server.schema.table;
There is more detail about setting up linked servers for SQL Server and Oracle 64 bit client.
http://www.mssqltips.com/sqlservertip/1433/how-to-setup-linked-servers-for-sql-server-and-oracle-64-bit-client/
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support

Similar Messages

  • Import table - problems with date

    Hi,
    I want to import an table from text file with date column. The format in file is 12.01.2000 13:59:12.
    When importing the preview of column value is 2000-12-01 13:59:12. I've then added the format YYYY-MM-DD HH24:MI:SS. After import all rows with date of year 1999 or below are failed.
    Does anybody know why and how can I solve this problem?
    Thanks
    chrissy

    Hi Dimitri,
    yes all rows with date of year 2000 or higher are correct. It shows me the YYYY-DD-MM HH24:MI format if it recognizes the column as date. Somehow I get it worked that it is recognized as varchar, changed to date and set format to DD.MM.YYYY HH24:MI. So it was imported fine.
    Thanks for your help,
    chrissy

  • JDBC Lookup - Import table data from a different schema in same DB

    Hi XI Experts,
    We are facing an issue while importing a Database table into the external definition in PI 7.1.
    The details are as below:
    I have configured user 'A' in PI communication channel to access the database. But the table that I want to access is present in schema "B". Due to this, I am unable to view the table that I have to import in the list available.
    In other words, I am trying to access a table present in a different schema in the same database. Please note that my user has been given all the required permissions to access different schema. Even then, I am unable to access the table in different schema.
    Kindly provide your valuable suggestions as to how I can import table which is present in another schema but in the same Database.
    Regards,
    Subbu

    If you are using PI 7.1, then you can do JDBC Lookup to import JDBC meta data (table structures from DB). Configure a jdbc receiver communication channel where you specify username and password which has permission to access schema A and Schema B of database. Specify database name in the connection string. Then you might have access to import both schema.
    Please refer these links
    SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
    How to use JDBC Lookup in PI 7.1 ?

  • 11gR2 Data Pump. Import table in one schema into a different schema

    I stady oracle. I export shema HR into file hrexport.dmp. When I import tables from this file I had trouble. I used Enterprise Manager:
    1. connected by user SYSTEM as NORMAL
    2. selected file, chosen import type - tables
    3. data from file was imported
    4. chosen tables which tables to import
    5. in the next step I try insert row in table Re-Map Shemas and edit cell Destination Shema, but in the list is only one name of shema - HR! Why?
    Edited by: alvahtin on 10.03.2013 6:11

    Paul M. wrote:
    Did you try using impdp command at OS prompt ?I don't know what this command use. I try:
    impdp system/oracle remap_schema=hr:inventory tables=employees, departments, locations directory=ORACLES_HOME dumpfile=hrexport.dmp logfile=hrimport.log
    But it finished with error:
    ORA-39166: Object SYSTEM.EMPLOYEES was not found.
    ORA-39166: Object SYSTEM.DEPARTMENTS was not found.
    ORA-39166: Object SYSTEM.LOCATIONS was not found.
    Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at 18:43:19
    Job "SYSTEM"."SYS_IMPORT_TABLE_01" successfully completed at 18:43:19
    Why SYSTEM? I want import to INVENTORY from HR - replaced in the file hrexport.dmp

  • Importing tables with linked cell data from excel to indesign

    Hey,
    I'm designing a catalog and have been linking the tables in InDesign from a spreadsheet in excel. In my spreadsheet, I am linking cells from a master sheet to another sheet so that I when I update the information on one sheet, it will update throughout the spreadsheet.
    Now that I have the linked cells set up in my spreadsheet, I've inputed the tables into InDesign but: the table cells in InDesign containing linked cells from within the spreadsheet do not appear.
    I've gone through all the import table options in InDesign and cannot find a way to make it work.
    Does anyone have an answer or input?
    Thanks,
    KT

    When we are updating the excel sheet it automatically updates the link in InDesign and it's continually changing. Does CSV break the links in excel or does it keep them and allows InDesign to read the linked cells as well?
    Thanks for your response!

  • BOM and Routing import is not populating data in base table.

    BOM AND ROUTING INTERFACE Import Prog is not populating base table with interface data.Even the Interface table data is not processed.I am passing process flag as 1 and transaction_type as INSERT,still the ROUTING INTERFACE TABLES  are not getting processed.
    passing the below details.
    INSERT INTO bom.bom_op_routings_interface
            (organization_code,          assembly_item_id,          completion_subinventory,         routing_sequence_id,          organization_id,
             routing_type,          common_routing_sequence_id,          last_update_date,          last_updated_by,          creation_date,
             created_by,         last_update_login,         alternate_routing_designator,          assembly_item_number,         process_flag,
             transaction_type) ;
    INSERT INTO bom.bom_op_sequences_interface
            (operation_seq_num,         department_id,         department_code,         option_dependent_flag,         operation_lead_time_percent,
             implementation_date,         effectivity_date,         disable_date,         count_point_type,         backflush_flag,         minimum_transfer_quantity,
             operation_sequence_id,         routing_sequence_id,         organization_code,         assembly_item_number,         last_update_date,
             last_updated_by,         creation_date,         created_by,         include_in_rollup,         alternate_routing_designator,         process_flag,
             transaction_type);
    INSERT INTO bom.bom_op_resources_interface
            (resource_seq_num,         resource_code,         resource_id,         basis_type,         usage_rate_or_amount,         usage_rate_or_amount_inverse,
             assigned_units,         schedule_flag,         resource_offset_percent,         activity,         standard_rate_flag,         autocharge_type,         organization_code,         assembly_item_number,
             operation_seq_num,         effectivity_date,         last_update_date,         last_updated_by,         creation_date,         created_by,         alternate_routing_designator,
             operation_sequence_id,         routing_sequence_id,         process_flag,         transaction_type);
    Where am I making a mistake.
    Thanks in Advance.
    Sambit Pradhan

    Hi,
    Try following
    step 1. Insert routing header (bom_op_routings_interface) : Run Interface
    step 2. Insert routing lines (bom_op_sequences_interface) with correct reference to routing_sequence_id: Run Interface
    step 3. Insert all resource lines (bom_op_resources_interface) with correct reference to operation_sequence_id, routing_sequence_id , Run Interface.
    Thanks,
    Hrishi

  • Character problem in toad import table data from excel

    Hi everybody,
    I want to import data from an excel file to an Oracle table, so I'm using Toad's "Import Table Data" tool for this purpose.
    The problem is Oracle doesn't import non-english characters properly.
    My database is XE and character set is 'AL32UTF8'.
    I searched web, but didn't find the solution.
    Please help...

    Hi again,
    Thank you for your reply Srini, but it is not about Toad.
    Character encoding of Excel causes the problem.
    I exported an unicode encoded csv file from excel and tried to load data from that file. It worked.
    Thanks.

  • Error in import table data using oracle datapump

    i am trying to import table data using oracle datapump
    CREATE TABLE emp_xt (
    ID NUMBER,
    NAME VARCHAR2(30)
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_DATAPUMP
    DEFAULT DIRECTORY backup
    LOCATION ('a.dmp')
    it return the following error
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04084: The ORACLE_DATAPUMP access driver does not support the ROWID column.
    ORA-06512: at "SYS.ORACLE_DATAPUMP", line 19
    please help me

    .dmp file generated from exp command file not from oracle_datapump

  • Export and import table data with Java

    I need a library for simple exporting and importing table data.
    The data should be exported to a SQL file with insert statements.
    I just want to tell the library the table name, the connection and where to store the file. The usage should be very simple.
    Are there any small libraries for this? Finished calsses and methods which I can just call?

    I need a library for simple exporting and importing
    table data.
    The data should be exported to a SQL file with insert
    statements.Every database has utilities to export/import data from tables. Take a look at your database manual.

  • Database adapter not importing table having data type as WF_EVENT_T

    Hi All,
    I have a requirement to import a table in the Database adapter. That table is having a column of data type “WF_EVENT_T”.
    When I tried to import the table in database adapter I got the error as "The following tables are not supported in the Database Adapter and were not imported".
    Then I modified the table by adding one more column with some other data type and tried to import that table.
    It got imported successfully but I was not able to see the column with data type WF_EVENT_T in the table.
    Any pointers to this would be of great help.
    Thanks.

    Hi Harish
    Thanks for your response.
    I can create the table with the data type 'String'. However, the problem is when I try to update the table from a program in SE38 or a Function Module in SE37.
    When I try to activate the PROGRAM or FUCNTION, I GET A MESSAGE THAT I MENTIONED EARLIER.
    Here is the simple program that I have created that I am not able to activate
    ==========================================
    REPORT  ZTEST_STRING1.
    tables: ztest.
    ztest-zid = 2.
    ztest-zstring1 = 'ABC'.
    insert ztest.
    ===========================================
    ztest has two fields
    zid which is NUMC type
    and zstring1 which is STRING type.
    When I try to activate I get an error message as follows:
    'ztest' must be a flat structure. You cannot use internal tables,
    strings, references, or structures as components.
    Edited by: Ram Prasad on Mar 20, 2008 6:08 PM

  • Table views  as data source to imported in OBIEE

    I have a data source that consist of tables view and packages and function and I needed to import them into OBIEE physical layer. I never imported tables view into the physical layer , so I will like some help. As far as the packages and functions, how do you deal with them when importing the tables view in OBIEE?

    Hi friend,
    To import a view follow nexts steps on administration tool:
    - File -> import -> from database
    - Select correct connection type (at the same way when you import a table).
    - Enter correct user and password.
    - Go to correct schema which contain data base elements.
    - Select check box "Views". Now it will appear views created in that schema.
    Good luck.

  • Import table data in right order to avoid violating foreign key constraints

    Gentlemen
    I am trying to import table data into an existing 10g schema using datapump import in table mode.
    However, in order to avoid violating foreign key constraints, the tables must be loaded in a specified order. I tried specifying the order in the TABLES parameter:
    TABLES=table1,table2,table3 etc.
    However, datapump seems to chose its own order leading to errors like the following:
    ORA-31693: Table data object "SCHEMAX"."TABLE3" failed to load/unload and is being skipped due to error:
    ORA-02291: integrity constraint (SCHEMAX.TABLE3_TABLE1#FK) violated - parent key not found
    I want to try to avoid having to disable all foreign keys because there are hundreds of them.
    Any advice?
    Yours
    Claus Jacobsen, Denmark

    Thanks Anantha.
    Since I am only loadding data (the constraints are already defined in the target database), I am not sure whether this approach would work. Meanwhile I have solved the problem of moving data from one system to another using another, tedious and far from elegant approach that I would prefer to not eloborate on:-)
    However, I have also discovered another probable reason why the foreign key constraints were violated, other than wrong order of table data loading. It turns out almost every single table in the schema contains a trigger supposed to generate a unique row ID from a sequence on insert such as:
    CREATE OR REPLACE TRIGGER "SCHEMAX"."TABLEX#B_I_R"
    BEFORE INSERT
    ON TABLEX
    FOR EACH ROW
    DECLARE
    BEGIN
    SELECT tablex_seq.nextval INTO :NEW.ID FROM dual;
    END;
    If the import mechanism fires this trigger, and the sequences in the source and the target systems are not synchronized, then I guess that referred records a more than likely to end up with wrong ID's compared to the row ID's in the referring rows?
    Spooky. Anybody can confirm this theory?
    Yours
    Claus
    Message was edited by:
    user586249

  • Export and import tables with and without data

    I have few table which i want to take export with data and some without data, and import that in new db? Send me the command plz for this.

    exp and imp all have a flag
    ROWS import data rows (Y/N)
    but that flag apply to the whole export/import process.
    You will need do export twice,
    ROWS=Y first with list of tables that need data
    and ROWS=N with list of tables without data.

  • Removing an empty value for a imported table shown in a slicer

    Hi,
    I've imported a table and I've put the related code field in a slicer for a my pivot table. In the slicer I can see an empty box that I want to eliminate. I've tried to apply a filter for original data and powerpivot data from the powerpivot window. Moreover
    I've tried to uncheck the showing elements without data, but unsuccessfully. I've tried to update the imported tables after each applied change but no results.
    Any suggests to me, please? Thanks

    Hi there,
    i'm facing a similar problem which i find it hard to understand.
    1x fact table with 2 columns (to keep it simple):
       + col.1 - id_Division
       + col.2 - Sales_Amout
    1x dimension table with the the Company Business Organization (Departments, Business Units, etc) with 3 columns:
       + col.1 - id_Division
       + col.2 - Business_Unit
       + col.3 - Business_Area
    If i just load these two tables in my PowerPivot, then go to a worksheet and create a pivot table, selecting just the dimension table col.1 to the Values and col.2 to a slicer, i get the correct situation = 10x slicers corresponding to the 10x Business Units
    existing in the table, as you can see in the imagem attached.
    If i create a relationship between the fact table col.1  (id_Divion) with the dimension table col.1 (id_division), and then refresh the same pivot i've just created before, i get an extra empty slicer with no values in it. IS there any reason for this
    to appear?
    Appreciate your kind help and inputs. IF required i can share my workbook in order to get some further help.
    Regards
    Felino ([email protected])

  • Gateway Service for FM with Importing tables

    Hello Experts,
    I have a function module which imports around 4 parameters & a table with 4 fields. Since its a table, so there can be more than one entry. So, FM has:
    Import Parameters - around 4 fields
    Table  Parameters - a table with 4 fields. FM can execute more than one entry
    Export Parameters - 3 fields - This is the information FM returns after processing records from import & table parameters
    I am confused on how to build GW service for this scenario. I have gone through the GW service generation from FM but how are we going to address importing table parameter? I just need some pointers on how i should approach to build service for such a scenario.
    Regards
    Gaurav K

    Hello Ron,
    Definitely it was inside-out modelling pitfall, but now, after going through your blogs & other such information on SCN, I am feeling better.
    I myself prefer code based implementation since it provides lots of flexibility. FM constraint definitely limits the scope improvement.
    we are developing a internal application where we are trying to replicate a existing old application which accepts data in adobe forms. Purpose of creation is to give application a UI5 look-feel & use the ODATA way of exposing & consuming services. So, this way we are learning & along the way, improving some internal applications as well. Of course, we are doing this by taking some time out of our PRIMARY work.
    Reason why i wanted to use this FM was mainly because it was already available as its already being used in existing application. I was trying to figure out the possibility of using this FM without any logic tweaking.
    I was exploring this possibility to create a service by keeping most of the code-related things intact from existing application. But you experts have been such a valuable advisors. I will do it the best way now.
    Thanks a lot.
    Gaurav K

Maybe you are looking for

  • How to merge multiple responses in EBS

    Hi Everyone, I have been currently working on POC where Mediator EBS Service needs invokes multiple Provider ABCS to search for Item in System A and System B. Result from both the Providers should be combined and should be sent out as one message to

  • Duties are not flowing in ARE3

    Hi All, I created the deemed Export Excise Invoice and also the licence. but while creating the ARE3 document duties are not flowing in ARE3. please guide me Please note that the duties are flowing  correctly in the Excise Invoice. Regards

  • Leere Seiten in ADE / Blank Pages on ADE

    Hallo, ich möchte gerne über iTunes gekaufte Bücher in ADE anzeigen lassen. Bei ein paar Bücher geht das auch. Bei den meisten werden allerdings nur leere Seiten angezeigt. Kennt jemand das Problem und kann mir weiterhelfen? I would like to display o

  • Errors while creating tracks in CMS

    Hi All, i have this error 'CBS (URL http://******:50100/tc.CBS.Appl/archiveapi2/) communication exception: Build Server request failed without CBS specific error code. HTTP status: 403 (Forbidden)' what can i do ?????? Message was edited by:        

  • X201 running Windows 7 Home Premium problem with wireless network adaptor

    my x201 shows that my wireless is on and my wireless network is available. it keeps trying to connect but is not able to hold a connection (continuously trying and failing). i'm on windows 7, 32 bit, home premium. i downloaded the latest update for t