Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009

    Post Unanswered: T-SQL query to connect to a database


    I am new to T-SQL and would need help on a task that i have been assigned to do

    I need to use T-SQL to connect to a DB and extract some datas

    I did look up in google for some help, but couldnt find any

    my first task is to establish a connection to the DBs(SQL server 2005, Mysql5.0 and Oracle 10g) using T-SQL(i do have user level access to all these DBs') and then query the datas needed using T-SQL.

    Would appreciate your earliest reponse

    thanks in advance

  2. #2
    Join Date
    Jun 2004
    Long Island
    You're gonna have to do a lot more googling Sparky, do you need to set up linked servers to Ora and MySQL from SQL Server, do you know how to do this ?, how about using OpenRowset ? Do you have Server Names, table names, accounts, schemas, etc.

    It's a lot more complex than simply getting data via T-SQL from Oracle and MySQL, sorry to burst your bubble.

  3. #3
    Join Date
    Jul 2009
    Hi PMASchmed,

    I too thought abt Linked server . but my boss is not in favor of using any kind of provider (where in for linked server we need providers like odbc to talk with other database)
    he wants the connection also to be established via t-sql upon which the extract query used in the t-sql should extract relevant data from the DB

    any help on this would be highly appreciated

  4. #4
    Join Date
    Feb 2004
    One Flump in One Place

    You have to pass PL\SQL etc though - you can't submit T-SQL to a RDBMS that uses a different SQL syntax and expect it to work.
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts