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

Similar Messages

  • 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 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?

  • 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

  • Creating Repositories using MS SQL Server DataBase in Data Service Reposito

    HI All,
    I installed BODS and I am trying to create repository using Data Service Repository Manager but I am getting the following error message :
    Cannot open connection to the repository.  The error message from the underlying DBMS is <ODBC call <SQLDriverConnect> for data source <localhost> failed: <[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.>. Notify Customer Support.>. (BODI-20006)
    An error occurred during creation of the local repository. (BODI-300054)
    While installing BODS i used the option to create DB .... Before that even I had Microsoft SQL server installed for MDM which was working fine (Able to Log on and so on)...
    Do I need to install Oracle in order to create repositories? How to proceed further please suggest.
    many Thanks
    Rajeev.

    Hi!
    What version of SQL Server are you using for the repositories? Maybe the error is because DS can not create repositories in SQL Server 2008. You can read and write data with SQL2008, but you need to create the repositories in SQL2005 or another RDBMS. I'm not sure when DS is going to be able to create them in SQL2008.
    I hope this could help you. Greetings!
    See you
    LCGC

  • Hyperion11.1.2.2 Sql Server and Essbase data load error

    Gentlemen,
    i have issue on loading data in Essbase via sql server , while loading data it was fine and all of sudden i see that i get network error 10054
    network error 10054 failed to recive data / send data
    unexpected essbase error 1042013
    even when i try to load manully it says Data Load Fails error Data load buffer [9999] does not exist Unexpected Essbase error 1270040
    and in logs
    Received client request: MaxL: Execute (from user [admin@Native Directory
    *Error writing to server*
    Also tried with maxll its the same issue
    is .esm is loacked?
    any issue with ODBC?
    or any orphan link which is connected to sql  and hyperion unable to process another ?
    let me know your thoughts
    thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Can you try limiting the query to return some records? Try adding a where clause and see whether that works?
    Regards
    Celvin
    http://www.orahyplabs.com

  • How to Generate script of tables in SQL Server that is compatible for MySQL?

    Dear All,
    I want a part of the tables of my database of SQL Server 2008 R2 to move to MySQL database. For that, I generated script in SQL Server. But that did not run in MySQL. The MySQL database is in different server. So, have anyone any better idea?
    Thank and Regards,
    Anujit Karmakar
    Anujit Karmakar Sr. Software Engineer

    Microsoft does not have any tools to migrate TO MySQL.  I suggest you post your question to a MySQL forum. Or hire a consultant. 

  • How do I send SQL statement to SQL Server and return data without using Database Connectivi​ty Toolkit?

    Hi,  I've been trying to figure out how to pull data out of my SQL Server databases and from reading some posts and doing some tests with examples, I can kind of get data connecting into my SQL server, but so far nothing that helps.  Is it possible to actually get data out of a SQL Server database without using the Database COnnectivity Toolkit?  and if so, how?  are there whitepapers and/or examples of this?  So far, I cannot find anything that works.  thanks.

    I haven't ever done it before in LabVIEW and don't have the time to do much of the research right now.
    That having been said, you will want to look for either a .NET library or an ActiveX control. Aside from the toolkit, you aren't going to find a native solution to LabVIEW - which means using other libraries. A quick google search returns this:
    http://msdn.microsoft.com/en-us/library/ms810810.a​spx
    which may help.

  • Sql server 2000 type4 driver for jdbc connection error

    hello,
    I am trying to connect m ms sql server 2000 database server with type 4 driver.But I am getting an connection error like *"Error Establishing Socket"* .Can any one please help me out?

    Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
    go through the below link for further info.
    http://jtds.sourceforge.net/
    REGARDS,
    RaHuL

  • 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?

  • Loading data from SAS tables to SQL server database

    Hi Guys
    I am championing a BI Proof of Concept project to create a self-service BI platform using tabular model parallel to  our traditional BI platform on SAS.
    I need to load certain SAS tables  to SQL server database so I can start creating reports in SSAS. Appreciate if anyone can suggest the process that I can load the files to database engine as a scheduled job.
    Appreciate your feedback and if further info needed please ask.
    Cheers
    Mark

    From VB6 there is not much alternative than to send row by row which indeed is slow.
    But you could write a C# application which uses a table-valued parameter to load the data, and this could be streamed so that the client never has the hold the entire file. I have an example of this in this article on my web site:
    http://www.sommarskog.se/arrays-in-sql-2008.html
    You can also use the SqlBulkCopy class, but I don't have any example of this myself.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Problem creating a table with a subquery and a dblink

    Hello!!
    I have a little problem. When I create a table with a subquery and a dblink, for example:
    CREATE TABLE EXAMPLE2 AS SELECT * FROM EXAMPLE1@DBLINK
    the table definition is changed. Fields with a type of CHAR or VARCHAR2 are created with a size three times bigger than the original table in the remote database. Field of type DATE and NUMBER are not changed. For example if the original table, in the database 1, has a field of type CHAR(1) it is create in the local database with a type of CHAR(3), and a VARCHAR2(5) field is created with VARCHAR2(15).
    Database 1 has a WE8DEC character set.
    Database 2 has a AL32UTF8 character set.
    Could it be related to the difference in character sets?
    What can I do to make Oracle use the same table definition when creating a table in this way?
    Thanks!!

    That is related to character sets, and probably necessary if you want all the data in the remote table to be able to fit in the new table.
    When you declare a column VARCHAR2(5), by default, you're allocating 5 bytes of storage. In a single-byte character set, which I believe WE8DEC is, that also happens to equate to 5 characters. In a multi-byte character set like AL32UTF8, though, 1 character may require up to 3 bytes of storage, so you'd need to allocate 15 bytes to store that data. That's what's going on here.
    You could still store all the data if you create the table locally by explicitly requesting 5 characters of storage by declaring the column VARCHAR2(5 CHAR). You could also set the NLS_LENGTH_SEMANTICS parameter to CHAR rather than BYTE before creating the table, but I believe that both of these will only apply when you're explicitly defining columns as part of your CREATE TABLE. I don't believe either will apply to CTAS statements.
    Justin

  • Problem connecting to SQL Server from JDeveloper 10g using jdbc third party

    I am using Oracle 10g Jdeveloper and I tried to setup a database
    connection to SQL Server using various Drivers for JDBC as Merlin, jtds, inet.tds, etc.
    (I had no problem to set up a connection to an Oracle Database using the
    Oracle JDBC driver).
    When I am testing the connection throughout the wizard, I do receive
    this error message: "Unable to find driver:
    com.microsoft.jdbc.sqlserver.SQLServerDriver".
    I m not understanding from last 3 days where to place the corresponding JAR files so thaI may not get the Error.
    When I hit n trialed at various directories of the JDeveloper as </rootDir/jdbc/lib>
    </rootDir/lib>
    </root/jdev/my Work/Application1/Project1/public_html>
    </root/jdev/my Work/Application1/Project1/public_html/web-inf/>
    when I tested the connection I do received:
    "Unable to find driver:
    xxx.xxx.xxx.xxxxxxx Unable to find driver:
    Obviously it can't locate the Micrososft JDBC driver but I can't
    figure out why.
    I tried all kind of things without any success. Is somebody can help
    me and took me beyond this.
    I m trying to build DataSource connection from JavaBeans.
    Please make me out of this cave. I m not finding any of the way to do this.
    The last code I tried is
    try {
    Class.forName("com.inet.pool.PoolDriver");
    com.inet.tds.TdsDataSource tds = new com.inet.tds.TdsDataSource();
    tds.setServerName( "local" );
    tds.setDatabaseName( "bluff" );
    tds.setUser( dbUserName );
    tds.setPassword( dbPassword );
    DataSource ds = tds;
    Connection con = ds.getConnection(dbUserName,dbPassword);
    Statement stmt;
    ResultSet rs = null;
    Thanks,

    you are confusing me at least as your error is discussing the microsoft driver yet you are configuring the inet datasource.
    I do not use JDeveloper, but you need to make sure that whatever is servicing your web app/JavaBean has access to the driver. Not sure why you are not doing a JNDI look up of the resoure, but because you are not you can stick the driver jar in the lib directory within the WAR bundle. I would suggest that you add the driver to the lib/ext or the lib directory which is loaded at boot time for your web container and then use JNDI to look up your DataSource to reduce your coding maintenance headaches.

  • SQL Server and Oracle

    is there a SQL server tool or database utility that allows to automatically synchronize data between a table in SQL server and a table(same structure) residing in Oracle on a different server...
    Ashish

    SQL Server has DTS for this sort of thing. Oracle has Heterogenous Services.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for

  • Query suggestion

    Hi All, I need to apply condition where column should not be null and also must not be an empty string. I wrote like: WHERE (TRIM(ITEM_BAR_CODE)!='' AND ITEM_BAR_CODE IS NOT NULL) OR (TRIM(ITEM_COLOR)!='' AND ITEM_COLOR IS NOT NULL) But I am not gett

  • How do I get airport utility to recognise my wdstorage

    I have a 1TB my book (WD storage) external hard drive - my iMac can see it and access it on the network but I can't figure out how to get it picked up by airport utility to allow me to set up time capsule back up.

  • Read only field in selection screen

    hi friends,     I am using selection screen for getting input.one field must be hardcoded & should not be changed but the user wanted that field also to be displayed in screen as read only. Is it Possible? If possible, how it is possible? please help

  • Problem in running multilple WLI 8.5 domains on Linux 3.0 AS

    Not able to run multiple WLI 8.5 Domains on single Linux 3.0 AS Hi I am not able to run to parallel Weblogic Integration 8.5 domains on a single Linux Server version 3.0AS. While creating the domain through config.sh i was able to comfigure and have

  • How could ID authorize on my computers once it's been done once a year could you please help me thank you

    How could I be authorized all my computers which is already been done once a year would you please help me if possible I call technical support dinner not help me