How to define a DSN without using a tnsnames.ora on the PC client machine

Hi,
Client : Windows XP with Oracle9i ODBC driver
Server : Oracle 10 on Solaris
I need to define a DSN which does not rely on tnsnames.ora on the client machine.
I tried to use a file dsn, but without success, because I don't know the parameters to use.
I used these params in the file.dsn :
[ODBC]
DRIVER=Oracle9i ODBC Driver
UID=testuser
PWD=testpw
SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=9999))(CONNECT_DATA=(SERVICE_NAME=testSID)))
It does not work ....

Hrm, interesting. It always used to be DBQ but it seems it might have changed to SERVER at some point.
Anyway, I tried this and it worked fine for me (using 10204)
TESTFILE.DSN
================
[ODBC]
DRIVER=Oracle in OraDb10g_home1
server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gdarling-pc2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))
TEST.VBS
==========
set con = createobject("adodb.connection")
con.open "filedsn=testfile;uid=scott;pwd=tiger;"
set rs = createobject("adodb.recordset")
rs.open "select user from dual",con
msgbox rs.fields(0).value
Note also that unless you really want to create a file dsn, you could also just use a dsnless connection string and pass that directly too:
set con = createobject("adodb.connection")
con.open "driver={Oracle in OraDb10g_home1};uid=scott;pwd=tiger;server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=gdarling-pc2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"
set rs = createobject("adodb.recordset")
rs.open "select user from dual",con
msgbox rs.fields(0).value
Hope it helps,
Greg

Similar Messages

  • How to list the datasources without use a tnsnames.ora file?

    Hi,
    I want to use the OracleDataSourceEnumerator class of ODP.Net to list the datasources on which the user can connect.
    It's work with a tnsnames.ora on the local station, so good.
    But I want use the easy connect naming methode so i have edited the sqlnet.ora file with this:
    NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
    then i have deleted the content of the tnsnames.ora
    so my code don't work : none datasource is returned by the OracleDataSourceEnumerator
    So my question : is it a way to list the datasources without use a tnsnames.ora file?
    Edited by: user13499556 on 17 déc. 2010 08:21

    You can check
    DataConnectionFile.EnumerateDependants method
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Possible to use 2 tnsnames.ora for just one client?

    Hi,
    in our organisation we have two different tnsnames.ora files. This because of the
    fact that there are remote locations each with their own IT department. Each department maitains their own databases, but applications are spread over the whole organisation.
    What I would like to to create is a tnsnames.ora in which there is an e.g. include c:\oracle\tnsnames.ora and include c:\oracle1\tnsnames.ore. Would that be possible?
    Fred

    If what you want to achieve is a situation where different users use the same PC, but you want to limit the tnsnames they have access to, what if you try setting the TNS_ADMIN environment variable to point to the permitted directory for each user env profile.
    e.g
    user1
    TNS_ADMIN=c:\oracle\network\admin\user1
    c:\oracle\network\admin\user1\tnsnames.ora
    c:\oracle\network\admin\user1\sqlnet.ora
    user2
    TNS_ADMIN=c:\oracle\network\admin\user2
    c:\oracle\network\admin\user2\tnsnames.ora
    c:\oracle\network\admin\user2\sqlnet.ora
    etc.

  • How do i install opensolaris without using the virtual box??

    hi.
    i am new to solaris
    i am currently using a windows XP OS
    i got down the opensolaris cd from SUN
    how do i install opensolaris without using a virtual box ?

    The OpenSolaris CD is a "Live CD". You can boot off of the CD, and either run the OpenSolaris operating system directly, or you can select the "Install" icon on the LiveCD desktop. You can find full instructions here: http://dlc.sun.com/osol/docs/content/IPS/getst1.html
    Do you want to keep your Windows OS on the disk? If so, then you want to follow the instructions for partitioning your disk (unless you already have a spare partition).
    -- Alan

  • How to connect to AD without using ADWS?

    How to connect to AD without using ADWS? Is it possible to do it? If yes, can teach me how to connect to AD and find their attributed?

    Hi Noobycy,
    There are few tools to find AD attributes without ADWS. See options you have below
    1.ADFIND -
    http://www.joeware.net/freetools/tools/adfind/  This is a command Line tool
    2.
    The ADSIEDIT tool
    from the Windows Support Tools is a great tool to "explore" the AD.
    http://technet.microsoft.com/en-us/library/cc731547.aspx
    3. ADUC -
    http://www.boostsolutions.com/blog/how-to-find-attributes-of-objects-in-active-directory/
    Regards, MassonTech

  • Hello! I'm out of the country and all my iWeb information is on my computer at home. Now I need to make changes on the webpage... how can i do that without using the computer i made the page on? Thank you!!

    Hello! I'm out of the country and all my iWeb information is on my computer at home. Now I need to make changes on the webpage... how can i do that without using the computer i made the page on? Thank you!!

    iWeb uses the domain.sites2 files to store its assets.
    You'll find it here :
    ~/Library/Application Support/iWeb/
    where ~ is your Home directory.
    If you take a computer with you, you have to store that file in the same location.
    It's not different from taking documents with you if you want to edit them.
    A solution is to remotely control your computer at home.
    TeamViewer, LogMeIn, Apple Remote Desktop or any VNC application you can use, like "Chicken of the VNC".

  • Note:304522.1 How to Move Queue Tables without using export import

    Trying to use the pkg available in Metalink "Note:304522.1 How to Move Queue Tables without using export import"
    Using the 10.1.0.x and upwards Package, I'm getting the following error on a single consumer queue table with an xmltype payload:
    SQL> exec move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK');
    BEGIN move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK'); END;
    ERROR at line 1:
    ORA-20000: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.MOVE_AQT", line 652
    ORA-06512: at line 1
    We've tried in multiple environments, always with the same results.
    Trace file shows:
    *** 2006-11-08 10:06:47.154
    *** SERVICE NAME:(SYS$USERS) 2006-11-08 10:06:47.147
    *** SESSION ID:(379.954) 2006-11-08 10:06:47.147
    qtable move procedure starting execution at 08-11-2006 10:06:47 for queue table XFORM_TEST_INT.INTERFACE_XML_QUEUE
    qtable move procedure experienced an exception at 08-11-2006 10:06:47
    qtable move error message ORA-06502: PL/SQL: numeric or value error
    qtable move procedure ended execution at 08-11-2006 10:06:47
    Can anyone help with this? Has anyone used this before successfully (or not successfully). We urgently need this working today to test moving our queue table into a tablespace with a smaller block size for performance reasons in production.
    Thanks for the help!
    Tony

    Thank you,
    Yes we've done that. They've confirmed a problem with the links/scripts on the note. The 10.1 and up version was not really 10.1 and up.
    As they would not have a new version available in time for the move we needed to perform, we switched our approach to using dbms_redefinition instead.
    Thanks for the reply,
    Tony

  • How we generate Surrogate Keys without using identify column

    Hi All,
    How we generate Surrogate Keys without using identify column.
    Regards,
    Manish

    There are various options
    1.IDENTITY columns - simplest to implement
    2. Using NEWID(), NEWSEQUENTIALID() functions (if you want to use GUID values as surrogate keys)
    3. SEQUENCE object (if SQL 2012 and above)
    4. Using custom functions to generate keys yourself
    This is an good article which compares use of GUIDs against integers as surrogate keys
    http://blog.jonathanoliver.com/integers-vs-guids-and-natural-vs-surrogate-keys/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • HT4993 how to unlock my passcode without using itunes

    how to unlock my passcode without using itunes

    cannot be done without itunes
    http://support.apple.com/kb/ht1212

  • How to connect from java without using oracle client installation

    hi ,
    Please tell me how to connect from java without using oracle client
    Thanks & Regars

    http://www.orafaq.com/wiki/JDBC#Thin_driver

  • HT4061 I bought my mom an iPad for Christmas this year.  We can't use it as it will not recognize her passwords.  How do I reset it without using passwords.  I want this thing wiped clean, just like it came from the store so that I might start over.

    I bought my mom an iPad for Christmas this year.  We can't use it as it will not recognize her passwords.  How do I reset it without using passwords.  I want this thing wiped clean, just like it came from the store so that I might start over.  This is very frustrating!

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
     Cheers, Tom

  • Hey guys i please i need a help on my ipad. i have received an ipad from anonymous person but she has already logged in to iclouds, since i dont know her password how do i sign out without using password on ios 8?

    Hey guys i please i need a help on my ipad. i have received an ipad from anonymous person but she has already logged in to iclouds, since i dont know her password how do i sign out without using her password on ios 8?

    You can't. Your mysterious benefactor must remove the device from her (I guess you know it's a her?) iCloud account by logging into icloud.com, going to Find my iPhone and removing from there.
    Matt

  • How many times i can purchase using a credit card on the day

    how many times i can purchase using a credit card on the day

    That would depend on the company your credit card is with.

  • Computer crashed and need to synch my phone to new computer, how do i do so without itunes updating my phone to the empty itunes library?

    Computer crashed and need to synch my phone to new computer, how do i do so without itunes updating my phone to the empty itunes library?

    Launch iTunes on your new computer.
    From the menu bar at the top of the screen click  iTunes / Authorize This Computer.

  • Deletion without archiving is not allowed in the production client

    Hi Gurus!
    I have a new problem with regards deleting products in the Production system in CRM. I can't seem to delete the product in Production Box using this report(COM_PRODUCT_DELETE_SINGLE). It gives me this error: 'Deletion without archiving is not allowed in the production client' I'm doing this to solve my issue with regards some of the products not having any Sales and Distribution Data. The steps i did below worked in QA box.
    These are the steps i did in the QA box to delete the product:
    1) I've deleted the products that has no sales data using the report COM_PRODUCT_DELETE_SINGLE. I went to COMMPR01 to tag the said products with a status 'To Archive' then saved it before I triggered this report.
    2) I've registered it first in the table COMC_PR_TOOL_REG and filling up the necessary parameters
    3) After Deleting the said products in CRM, I logged into R/3 to access the material (MM02). I just changed the sales text and saved it to trigger the replication in CRM.
    When I checked the product in CRM, it worked. The Sales and Distribution Data is already shown.
    Now I have a new problem with regards this procedure. I can't seem to delete the product in Production Box using this report. It gives me this error: 'Deletion without archiving is not allowed in the production client'
    I have already followed the same procedure as to what I did in the QA box but for some reason it didn't work in the Production Box.
    Could anyone please help me with this. Thanks!
    Thanks & Regards
    Nathan

    I was able to solve the problem.
    In Report COM_PRODUCT_DELETE_SINGLE,there is a special check in order for the productive system detection.
    The logic in this program has a perform check_authority which will automatically produce the error and prevents you from deleting a product in the production system.
    Solution:
    I copied the program COM_PRODUCT_DELETE_SINGLE to new one ZCOM_PRODUCT_DELETE_SINGLE then I placed a comment on the PERFORM check_authority.

Maybe you are looking for

  • Upgrade Oracle 10g RAC - Oracle 11g RAC on Linux Environment

    We are planning to Upgrade our databases to Oracle 10g RAC - Oracle 11g RAC which is Linux Environment. Kindly suggest me the best option for migration. Our production database size is 80GB. - Frest installation of oracle 11g using export/iimport dum

  • Splitting a cell containing data with space

    hello all i have a table with data as below sno name 1 radha krishna i want to retrive data as 1 radha 1 krishna thanks in advance jyothi

  • How to insert String variables in Execute Immediate Statement

    Hi, I have query dept varchar2(10); dept :='electronics' l_dyn_sql_input600_cbs := 'select EmployeeName,AGE,' || dept ||' from Employee' EXECUTE immediate l_dyn_sql_input600_cbs; when i run the query it says "electonics" Invalid identifier. Can anyon

  • Give My iphone 4 to my Daughter, BUT still have it available for me!

    Giving my iphone4 to my daughter to use.  She does have itunes on their PC already so could connect it to there, but there is the possibility that I may wish to switch back to it as well.  What would be the best way to manage this? Could the phone be

  • Oracle 8i for Linux is here!

    Looks like 8i for Linux is here. Check the download link on the left of this page. I ordered a CD a while back, but got an NT version. Anyone know if Oracle intends to send out the 8i/Linux CD to those that asked for it (during the EAP window)? null