E$ Table in SQL Server - creating issues

Hi All,
After a successful run of an ETL SCD Type2, the E$ table is craeted in the SQL Server but it is not deleted after the run even when it is successful, the second time I run it it causes a failure because of that, how do I automatically delete it after a succesful run, I understand the error table being there after a failure, so we investigate teh cause and then manually delete it. IS tehre a way to automatically delete it after a successful run.
Thanks for your time and help.

Hi,
When you say deleted", do you mean :
- DROPPED (= destructed, a droped table doesn't existe anymore)
- DATA DELETED (= the table is still here but the records are deleted)
By default, the CKM doesn't *drop* the error table. You can activate the "drop error table" option in the "control" tab of your interface. If so, the E$ table will be dropped (=destructed) at the BEGINNING of the interface. The E$ table is NEVER droped at the end of an interface (otherwise, we couldn't be able to read the errors).
But it shouldn't generate crash during the step "create error table" because the flag "ignore errors" is supposed to be true in the CKM step.
And, the CKM ALWAYS delete the errors of your E$ table at the beginning of the interface. It means the errors that were rejected and stored in E$ during the last execution are deleted (... in fact, only the errors due to this interface).

Similar Messages

  • Create oracle table from sql server

    Dear Gurus,
    I need to create some tables from sql server 2008 to a oracle 11g database. Some tables contain vbinary datatype. Now my queries are
    1. How can I do that?
    2. If DB link is a solution then would you please provide me a step by step process to do so?
    3. Is there any issue with datatype?
    SQL Server db is on windows 2008 R2
    Oracle is in RHEL 5.5
    Will appreciate ur help.

    well suppose i generate flat files from sql server and load in oracle by sqlloader then will there be any issue with vbinary datatype? what should be the equivalent data type in oracle table?

  • Need Guide to create a table in SQL Server and Process data for JDBC

    Dear All,
    Scenario:JDBC to JDBC
    I need to practice JDBC to JDBC scenario and for that i need to create a table in SQL server for sender ,receiver and update  i have installed SQL Server and no idea about creation of table and Connection string for PI.
    I want you to explain each and every step for the Table Creation ,Driver and connection string.
    Thanks in Advance.

    Try searchin in the forum and then google. This forum is not for teaching the basics.
    VJ

  • Need To Create a table in Sql Server and do some culculation into the table from Oracle and Sql

    Hello All,
    I'm moving a data from Oracle to Sql Server with ETL (80 tables with data) and i want to track the number of records that i moving on the daily basis , so i need to create a table in SQL Server, wilth 4 columns , Table name, OracleRowsCount, SqlRowCount,
    and Diff(OracleRowsCount - SqlRowCount) that will tell me the each table how many rows i have in Oracle, how many rows i have in SQL after ETL load, and different between them, something like that:
    Table Name  OracleRowsCount   SqlRowCount  Diff
    Customer                150                 150            
    0
    Sales                      2000                1998          
    2
    Devisions                 5                       5             
    0
    (I can add alot of SQL Tasks and variables per each table but it not seems logicly to do that, i tryid to find a way to deal with that in vb but i didn't find)
    What the simplest way to do it ?
    Thank you
    Best Regards
    Daniel

    Hi Daniel,
    According to your description, what you want is an indicator to show whether all the rows are inserted to the destination table. To achieve your goal, you can add a Row Count Transformation following the OLE DB Destination, and redirect bad rows to the Row
    Count Transformation. This way, we can get the count of the bad rows without redirecting these rows. Since the row count value is stored in a variable, we can create another string type variable to retrieve the row count value from the variable used by the
    Row Count Transformation, and then use a Send Mail Task to send the row count value in an email message body. You can also insert the row count value to the SQL Server table through Execute SQL Task. Then, you can check whether bad rows were generated in the
    package by querying this table.  
    Regards,
    Mike Yin
    TechNet Community Support

  • Create a table in SQL Server, Export tables from Microsoft Excel to Microsoft SQL Server, Populate the created table

    Hello team,
    I have a project that I need to do, what is the best approach for each step?
    1- I have to create a table in Microsoft SQL Server.
    2- I have to import data/ tables from Microsoft Excel or Access to Microsoft SQL Server. Should I use Microsoft Visual Studio to move data from Excel or Access?
    3-I should populate the created table with the data from the exported data.
    4-How should I add the second and third imported table to the first table? Should I use union query?
    After I learn these, I will bring up the code to make sure what I do is right.
    Thanks for all,
    Guity
    GGGGGNNNNN

    Hello Naomi,
    I have imported all the tables into SQL Server,
    I created a table:
    CREATE
    TABLE dbo.Orders
    Now I want to populate this table with the values from imported tables, will this code take care of this task?
    INSERT INTO dbo.Orders(OrderId, OrderDate)
    SELECT OrderId, OrderDate
    FROM Sales.Orders
    UNION
    SELECT OrderId, OrderDate
    FROM Sales.Orders1
    Union
    SELECT OrderId, OrderDate
    FROM Sales.Orders2
    If not, what is the code?
    Please advise me.
    GGGGGNNNNN
    GGGGGNNNNN

  • How to Create a Temporary Table with SQL Server

    I know you can create a temporary table in SQL Server 2000, but not quite sure how to do it in CFMX 7, i.e., does the SQL go inside a <CFQUERY dbtype="query"> tag?
    I'm pulling the main set of records from an Oracle server (1st data source), but it does not contain employee names, only employee IDs.  Since I need to show the employee name along with the Emp ID, I'm then pulling a list of "current" employee names from a SQL Server (2nd data source), which is the main database on our CF server.
    I've got a QofQ that works fine, except it only matches EmpIDs that exist in both result sets.  Employees who are no longer employed, don't match, and don't display.  Since I can't do a LEFT OUTER JOIN with a QofQ, what I need to do is get the records from the Oracle server into the SQL Server.  Preferably in a temporary table.
    I was hoping if I could get those Oracle records written to a temp table on the main SQL Server, in same database as the Employee Name table, I could then write a normal <CFQUERY> that uses a LEFT OUTER JOIN.
    I think I could probably write a Stored Procedure that would execute the SQL to create the temporary table, but am trying to avoid having to write the SP, and do it the simplest way.
    This query will be a program that can be run hundreds of times per day, with a form that allows users to select date ranges, locations, and other options.  That starts the queries, which creates the report.  So I just need the temp table to exist only until all the SQL has run, and the <CFOUTPUT> has generated a report.
    If the premise is right, I just need some help with the syntax for creating a SQL Server temp table, when you want to write records to it from an external data source.  I'm trying the following, but getting an error:
    <CFQUERY name="ITE_Temp" datasource="SkynetSQL">
    CREATE TABLE #MyTemp
    (   INSERT INTO #MyTemp
    ITE2.TrueFile char (7) NOT NULL,
    ITE2.CountOfEmployee int NULL,
    ITE2.DTL_SUBTOT decimal NULL,
    ITE2.EMPTYPE char (3) NULL,
    ITE2.ARPT_CD char (3) NULL
    </CFQUERY>
    So I actually created a permanent table on the SQL Server, and wrote the below SQL, which does work, and does write the records to table.  I can then write another CFQUERY with a LEFT OUTER JOIN, and get all the records, including those that don't have matching employee name:
    <CFQUERY datasource="SkynetSQL">
    <CFLOOP index="i" from="1" to = "#ITE2.RecordCount#">
    INSERT INTO ITE_Temp
       (FullFile,
       EmployeeCount,
       DTL_Amount,
       EmployeeType,
       station)
    VALUES  ('#ITE2.TrueFile[i]#',
       #ITE2.CountOfEmployee[i]#,
       #ITE2.DTL_SUBTOT[i]#,
       '#ITE2.EMPTYPE[i]#',
       '#ITE2.ARPT_CD[i]#')
    </CFLOOP>
    </CFQUERY>
    But, I hate to have to create a table and physically write to it.  For one, it seems slower, and doing it in temp would be in memory, and probably much faster, correct?  Is there some way to code the above, so that it does something similar, but in a TEMPORARY TABLE?   If I can figure out how to do this, I can pull data from multiple data sources and servers, and using SQL Server temp tables, work with the data as if it was all on the same SQL Server, and do some cool reports.
    Everything I've done for the past few years, has all been from data from a single source, whether SQL Server, or another server.  Now I need to start writing reports where data can come from 3 or 4 different servers, and be able to do joins (inner and outer).  Thanks for any advice/help.  Much appreciated.
    Gary

    While waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work.  That was with this syntax:
    <CFQUERY name="AddTableRecords" datasource="MyTable">
    TRUNCATE TABLE ITE_Temp
    <CFOUTPUT query="ITE2">
    INSERT INTO ITE_Temp
    (FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
    VALUES
    ('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
    </CFOUTPUT>
    </CFQUERY>
    However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table.  But when I tried to read and output the results from the temp table, I got an error.  Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax.  Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
    <CFQUERY name="ITE_Temp2" datasource="MyTable">
    DROP TABLE ##MyTemp2
    CREATE TABLE ##MyTemp2
    FullFile char (7) NOT NULL,
    EmployeeCount int NULL,
    DTL_Amount decimal NULL,
    EmployeeType char (3) NULL,
    station char (3) NULL
    <CFOUTPUT query="ITE2">
    INSERT INTO ##MyTemp2 VALUES
    '#ITE2.TrueFile#',
    #ITE2.CountOfEmployee#,
    #ITE2.DTL_SUBTOT#,
    '#ITE2.EMPTYPE#',
    '#ITE2.ARPT_CD#'
    </CFOUTPUT>
    </CFQUERY>
    So even though the above works, I could use some help in reading/writing the output.  I've tried several things similar to below, but they don't work.  It't telling me ITE_Temp2 does not exist.  It's not easy to find good examples of creating temporary tables in SQL Server.
    <CFQUERY name="QueryTest2" datasource="SkynetSQL">
    SELECT *
    FROM ITE_Temp2
    </CFQUERY>
    <CFOUTPUT query="ITE_Temp2">
    Output from Temp Table<br>
    <p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
    </CFOUTPUT>
    Thanks for any help/advice.
    Gary.

  • How to use create-default-dbms-tables in SQL Server 2000

    Hi everyone,
    I'm new in EJB development. I'm trying to deploy a CMP to Weblogic 8.1 SP1 using
    JBuilderX. I configured a ConnectionPool and DataSource to allow the CMP to access
    the SQL Server 2000. However, I cannot deploy the CMP if I didn't create the table
    in SQL Server manually. Does anyone know how to use the create-default-dbms-tables?

    Refer to
    http://e-docs.bea.com/wls/docs81/ejb/DDreference-cmp-jar.html#1162249
    "Keith" <[email protected]> wrote:
    >
    Hi everyone,
    I'm new in EJB development. I'm trying to deploy a CMP to Weblogic 8.1
    SP1 using
    JBuilderX. I configured a ConnectionPool and DataSource to allow the
    CMP to access
    the SQL Server 2000. However, I cannot deploy the CMP if I didn't create
    the table
    in SQL Server manually. Does anyone know how to use the create-default-dbms-tables?

  • Table or Object type - like #temp table in SQL Server

    Hi
    I need to create a temp table to hold certain data and then validate. What is the best way to do this oracle. Something similar to #temp tables in SQL Server.
    Thanks

    IN Oracle, you create the temporary table once, before you start your program. Then anyone can use that definition, but the system keeps the data isolated to eachr/session.
    The difference in using Oracle: all DDL, including creating temp tables, performs commits and aquires locks that you want to avoid. It creates unnecessary serialization, causes transactional consistency issues and puts Oracle's Read Consistent model at risk (of ORA-01555 errors).
    So, you (or the DBA) would "CREATE GLOBAL TEMPORARY TABLE ..." with the appropriate definition you want, and indicate whether you want the data deleted on commit, or on logoff.
    Then you write your procedure, similar to the way you would do it in SQL Server, but you would not bracket it with creating/dropping the temp table - no need.

  • Import MS Access 2013 tables into SQL Server 2012

    Hi there,
    Is there a step by step example somewhere showing how to import an MS Access 2013 table into SQL Server 2012?
    I have read the existing posts and don't see a definitive answer.
    I have installed MS Access 2010 engine, first 32 bit then 64 bit.
    I have installed the MS Access 2013 runtime on my server.
    I use the Office 2015 Access Database Engine OLE DB Provider.
    I get the error:
    Error 0xc0202009: Source - APEntries [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    Error 0xc02020e8: Source - APEntries [1]: Opening a rowset for "`TableName`" failed. Check that the object exists in the database.
    The post regarding the above errors doesn't resolve the issue.
    I have full administrative permissions on the server.
    What is the trick to making this work?
    Thanks,
    Ric
    Ric Miller

    Hi there,
    I tried the exact same operation on a third machine.
    This machine has Windows 8.1 64 bit, SQL Server 2012 64 bit, MS Office 2013 Plus 32 bit.
    I am the administrator on this machine.
    I installed this:
    Microsoft Access Database Engine 2010 Redistributable 32 bit (because I have MS Office 2013 plus 32 bit installed.)
    From here:
    http://www.microsoft.com/en-us/download/details.aspx?id=13255
    It won't let me install the 64 bit version without uninstalling MS Office 32 bit.
    I created an MS Access database on this machine using MS Access 2013 and created a table with 3 records.
    I used the "Import and Export Data (32 bit)" from the start menu.
    After I installed the "Database Engine 2010 32 bit" driver above, I now have the option of "Office 2015 Access Database Engine OLE DB Provider" as Data Source which I did not have prior to doing this installation.
    I selected the driver and added the Properties of the Data Source Name file location of the MS Access file. I am using a blank password.
    I go thru the same sequence of selecting a table to import and after running the result is the same:
    Error 0xc0202009: Source - APEntries [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    "Error 0xc02020e8: Source - APEntries [1]: Opening a rowset for "`TableName`" failed. Check that the object exists in the database."
    This seems to be consistent across three machines with three operating systems with the same files and the same result.
    I understand that some people have gotten this to work.
    I would appreciate it if anyone can report an error in the above procedure to me.
    Thanks,
    Ric
    Ric Miller

  • How to transfer database tables from sql server 2000 to oracle 10g

    Hi,
    I have a database and tables in sql server 2000. I have to transfer those data to Oracle 10g. I have installed Oracle warehouse Builder ETL Tool. Using this how can i transfer data. Any help is vary helpful for me.
    Thanks in advance.

    you have to do it using ODBC HS.
    1. Configure ODBC connection through gateway.
    2. Create a initxxx.ora file with HS config.
    restart gateway listener services
    3. on target o/s add entries to your tnsnames.ora
    4. On your target o/s create a db link
    restart listener on target
    cheeck this out.Non-Oracle connection through HS issue
    Edited by: Darthvader-647181 on Jan 29, 2009 2:02 AM

  • Group by languages in multilingual table in sql server

    Hi ,
    I am having a multilingual table in SQL server 2008 , the table has two columns ID and Text
    The text column has English, Chinese and other language texts.
    I need a resultset grouped by the languages and count of id like
    Language   count_of_id
    English          25
    Chinese         10
    other languages 3
    Is this possible? Can you please help me?

    Good day SqlServer_learn
    I have a saying that I always uses: anything is possible in developing, if you have the appropriate resources (change the existing solution could be part of the way to solve...)
    regarding your question, there is simple solution, but for most cases, I highly recommend to change the table structure and add a column for the culture of the text (like: en-us for english,
    he-il for Hebrew and so on..).
    Since you are using unicode column like nvarchar to store multi language text,
    we can get the language from the text itself, as long as it include characters from that language (text which include only numbers for example we we consider as default language since it is the same in all languages). 
    step 1: First you need an accessory table (Named like UnicodeMapping) which include all unicode characters and the number of the char in unicode (a mapping unicode table). You can use ranges as well, but
    it will be faster for the queries if you actually have all the characters, and not just range.
    For example this table (I added English and Hebrew... Do the same with all the languages that you need):
    create table UnicodeMapping (Charecter nchar(1), UnicodeNum int, CultureN NVARCHAR(100), CollateN NVARCHAR(100))
    GO
    -- fill the table with main Hebrew characters, using a number table
    insert UnicodeMapping (Charecter, UnicodeNum, CultureN, CollateN)
    select NCHAR(n), n, 'He-IL', 'Hebrew_CI_AS'
    from _ArielyAccessoriesDatabase.dbo.ArielyNumbers
    where
    n between 1488 and 1514 -- Hebrew
    or n between 64304 and 64330 -- Hebrew
    GO
    -- fill the table with main English characters, using a number table
    insert UnicodeMapping (Charecter, UnicodeNum, CultureN, CollateN)
    select NCHAR(n), n, 'En-US', 'SQL_Latin1_General_CP1_CI_AS'
    from _ArielyAccessoriesDatabase.dbo.ArielyNumbers
    where
    n between 97 and 122 -- En
    or n between 65 and 90 -- En
    GO
    -- Do the same with all the languages that you need, and all the UNICODE ranges for those languages
    select * from UnicodeMapping
    GO
    Step 2: You can create a function which get NVARCHAR as input and return the culture as output, or work directly on the data using JOIN your table and this table.
    Assuming that each row is in specific language, In order to recognize the language, you just need to check 1 character from the original string (a text character and not a number for example which might be in any language) and examine which language this
    single character is, using the our UnicodeMapping.
    You can check this thread to see an implementation of this idea: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ccc1d16f-926f-46c8-8579-b2eecf661e7c/sort-miultiple-language-data-in-sql-serevr-by-collation?forum=transactsql
    * dont forget to add to the table all the characters like numbers and chose them as your default language
    * in the link above I just select the first character using LEFT, but if the text start with number for example then you will get default language. If you sure that the text must start with real language character then it is best solution, but if not, than
    It is better to use a "user defined function" which will find the first character that is not in the default language. if the function do not find any char in non-default language than it return default language, else it check the language using
    the UnicodeMapping and return it.
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • People Tools Table in SQL SERVER

    Hi,
    As we have PSDBOWNER table in Oracle or DB2 which helps us to change DB name after production refresh.
    Like wise, i want to know list of People Tools Table in SQL SERVER which needs to change DB name from PRD TO TEST after refresh.
    Rgds
    PS Admin

    PeopleTools table will have the same name independent of Database you use.
    PSDBOWNER table is the only table created on PS oracle database user. (This table will not present in the SYSADM schema.)
    Thanks
    Soundappan
    Edited by: Soundappan on Jan 5, 2012 5:12 PM

  • Problem loading table in SQL server

    Hi,
    I'm trying to load a table in SQL server from another instance of SQL server.
    I have defined the physical and and logical data stores and reverse engineered the models to retrieve the tables.
    The target table was created manually..
    If I try to run the interface i get the fololowing error
    ODI-1227: Task SrcSet0 (Loading) fails on the source MICROSOFT_SQL_SERVER connection DATAWAREHOUSE.
    Caused By: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '<'.
    at weblogic.jdbc.sqlserverbase.ddb_.b(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb_.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.b(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.a(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.v(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.a(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddq.a(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.a(Unknown Source)
    at weblogic.jdbc.sqlserver.ddj.m(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.e(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.v(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddel.r(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.execute(Unknown Source)
    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)
    It is trying to run the following SQl and I'm not sure why it is trying to drop and create a view in the source system ? The interface that I'm running above has just a source to target mapping..
    drop view <Undefined>.SQLDATAWH_DATAWAREHOUSEAccountDim
    Any pointers will be helpful..
    Thanks in advance...

    whirlpool wrote:
    I think I selected MSSQL one.. but I donot have access to the server now..Is this the correct KM ?
    If you have selected IKM MSSQL Incremental Update then it is the correct IKM to choose.
    To use this IKM, the staging area must be on the same data server as the target.
    What is the LKM selected ?
    I right clicked on the Reverse-Engineering (RKM) models and imported all knowledge modules.. Is that how its done ?
    It is fine.
    is that the correct one...I donot understand why the interface is trying to drop and create a view in source system..
    It depends on the KM selected . So first get the name of LKM and IKM used in interface.

  • How to extract data from multiple flat files to load into corresponding tables in SQL Server 2008 R2 ?

    Hi,
              I have to implement the following scenario in SSIS but don't know how to do since I never worked with SSIS before. Please help me.
              I have 20 different text files in a single folder and 20 different tables corresponding to each text file in SQL Server 2008 R2 Database. I need to extract the data from each text file and
    load the data into corresponding table in Sql Server Database. Please guide me in how many ways I can do this and which is the best way to implement this job.  Actually I have to automate this job. Few files are in same format(with same column names
    and datatypes) where others are not.
    1. Do I need to create 20 different projects ?
                   or
        Can I implement this in only one project by having 20 packages?
                 or
        Can I do this in one project with only one package?
    Thanks in advance.

    As I said I don't know how to use object data type, I just given a shot as below. I know the following code has errors can you please correct it for me.
    Public
    Sub Main()
    ' Add your code here 
    Dim f1
    As FileStream
    Dim s1
    As StreamReader
    Dim date1
    As
    Object
    Dim rline
    As
    String
    Dim Filelist(1)
    As
    String
    Dim FileName
    As
    String
    Dim i
    As
    Integer
    i = 1
    date1 =
    Filelist(0) =
    "XYZ"
    Filelist(1) =
    "123"
    For
    Each FileName
    In Filelist
    f1 = File.OpenRead(FileName)
    s1 = File.OpenText(FileName)
    rline = s1.ReadLine
    While
    Not rline
    Is
    Nothing
    If Left(rline, 4) =
    "DATE"
    Then
    date1 (i)= Mid(rline, 7, 8)
     i = i + 1
    Exit
    While
    End
    If
    rline = s1.ReadLine
    End
    While
    Next
    Dts.Variables(
    "date").Value = date1(1)
    Dts.Variables(
    "date1").Value = date1(2)
    Dts.TaskResult = ScriptResults.Success
    End
    Sub

  • Taking snapshot of oracle tables to sql server using transactional replication is taking a long time

    Hi All,
    I am trying to replicate around 200 oracle tables onto sql server using transaction replication and it taking a long time i.e the initial snapshot is taking more than 24 hrs and it still going on.
    Is there any way to replicate those these tables faster?
    Kindly help me out..
    Thanks

    Hi,
    According to the description, I know the replication is working fine. But it is very slow. 
    1. Check the CPU usage on Oracle publisher and SQL Server. This issue may due to slow client processing (Oracle performance) or Network performance issues.
    2. Based on SQL Server 2008 Books Online ‘Performance Tuning for Oracle Publishers’ (http://msdn.microsoft.com/en-us/library/ms151179(SQL.100).aspx). You can enable the transaction
    job set and follow the instructions based on
    http://msdn.microsoft.com/en-us/library/ms147884(v=sql.100).aspx.
    2. You can enable replication agent logging to check the replication behavior. You may follow these steps to collect them:
    To enable Distribution Agent verbose logging. Please follow these steps:
    a. Open SQL Server Agent on the distribution server.
    b. Under Jobs folder, find out the Distribution Agent.
    c. Right click the job and choose Properties.
    d. Select Steps tap, it should be like this:
    e. Click Run agent and click Edit button, add following scripts by the end of scripts in the command box:
            -Output C:\Temp\OUTPUTFILE.txt -Outputverboselevel 2
    f. Exit the dialogs
     For more information about the steps, please refer to:
    http://support.microsoft.com/kb/312292
    Hope the information helps.
    Tracy Cai
    TechNet Community Support

Maybe you are looking for

  • How to highlight multiple files

    i had to replace my old iMac with a new 27' running yosemite OS  for some reason I am not able to hi-lite more than one email file in "MAIL" using the typical click and drag over what i want to hi-lite.   i can use the command key and click on  as ma

  • How many messsages can we insert using JDBC receiver adapter in to DB

    Hi Friends, We are having 30 JDBC receiver interfaces in my current implementation project; load of JDBC receiver interfaces was 50 k messages per day and Performing only INSERT operation on data base. We have created individual communication channel

  • How can I find ipad2(3g) in Korea?

    Hello. I'm Jong Hyun Cho Who Has your machine. I've lost my Ipad2......on set.26 which  is korean time. but i have no idea about that It's 3g model so, Can I know where it is with using GPS or Logging on itunes.? There is no way I can find it in kore

  • Email used for spam

    Someone sent a spam email to the first 25 people in my "Sent" folder of my Verizon Webmail account.  I've changed the password, but is there some place that I need to report this.  They definitely did not get it from my home computer because I use Ou

  • Error code 80070103 during Windows Update

    I have Windows Vista Home Premium installed as the OS in my T61p. Today, Windows Update showed the follwoing two updates available: --  Update for Windows Live Sign-in Asistant (KB 967912)   --  Important --  Lenovo - Other hardware  - ThinkPad PM De