Problm making sqlserver2000 dsn

whenever I am creating DSN in SQL2000,than I recived this msg
Connection Failed:
SQLState:'01000'
SQL Server Error: 53
[Micosoft][ODBC SQL Server Driver][DBNETLIB] ConnectionOpen (Connect()).
Connection failed:
SQLState:'08001'
SQL Server Error:17
[Micosoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied
plz advised me for solution......................

I would add one more bit of flexibility...
What if your user had their own JDBC driver they wanted to use in place of the JdbcOdbc one? With the code snippets we've seen, they would have to put their driver in the classpath or else class.forName() won't find it.
Of course, you could use the overload of forName() that let's you specify a classloader, but that actually won't work because the DriverManager will refuse to talk to any Driver class not loaded from the system classloader.
The solution is to make a ShimDriver that implements the Driver interface, have its methods proxy the methods of a driver you load with your own classloader (if you wish), and manually register an instance of your ShimDriver with the DriverManager (which won't complain because it was loaded with the system classloader).
Why go to the trouble? So that your properties file can have an extra line 'driver_url=jar:file:/path/to/driver/jar/file!/'.
See http://www.kfu.com/~nsayer/Java/dyn-jdbc.html

Similar Messages

  • Setting up a database as a data source. Is it a requirement?

    Am I required to set up my MS Access 2000 database (abcxyy.mdb) as a data source under Control Panel \ Administrative Tools \ Data Sources in Windows 2000 before I can connect to it using Java or can I set the path to it in my source code? If I can do it via the source code could someone give me an example of doing it that way? Thank you in advance for your help.

    OK, I've given you the dukes. Thanks for the link.
    If I'd known I was asking about making a "DSN less connection" I would've done a search for it.:)
    Can you tell me what DBQ is in the following?:
    String url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\full\\path\\to\\database.mdb";

  • Cant query 2+ LONGS via ODBC 8.1.71

    Running a query against two or more tables will not display correctly when selecting a Long Text field in each table.
    The data only is displayed incorrectly, no specific errors are thrown. For instance on first character of the 2nd column will display.
    It has something to do with the fact that for HP-UX we must check the "force retrieval of longs" under the Workaround tab in the ODBC configuration. The use of blobs may also be a factor.
    From my testing I know that the problem resides at the ODBC layer, other methods of connecting to the DB prove to work fine displaying the same query.
    Any suggestions?

    I think you're better off trying to find some JDBC drivers for Firebird.  CF & Hibernate are both Java apps, and will expect to use JDBC for connectivity.  Using ODBC on Java is a bit of a hack.
    CF does not have built-in support for Firebird for its Hibernate integration (supported DBs listed here: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSED380324-6CBE-47cb-9E5E-26B66ACA9E 81.html), so you'll need to configure it manually (how?  Don't know, but look @ the Hibernate website: https://www.hibernate.org/80.html, and the CF9 docs).
    As to why you're seeing discrepancies between JDBC, RDS and Hibernate... they're three different systems.  Making A DSN just requires a JDBC connection, and basically passes the SQL statements through the driver to the DB.  I have no idea how RDS works, but it's probably just doing something with JDBC as well.  Hibernate is a vastly complex application that sits on top of JDBC, and needs to generate an awful lot of very DB-platform specific code.  So it needs to know exactly what DB its talking to.  Simply "JDBC" is not sufficient.
    Adam

  • Hibernate Sequence & Firebird

    I am using a Firebird DB with the following Table structure:
    TABLE ROS_SOURCE_REPORTDBMAP_1
    ID INTEGER NOT NULL (Primary Key)
    SOURCE_REPORT VARCHAR (255)
    SOURCE_DATABASE VARCHAR (255)
    IS_ACTIVE INTEGER
    I am trying to add rows to this table with the ID column incramenting on every insert using the following Hibernate mapping file:
    <hibernate-mapping>
    <class name="rms.utility.db.local.ROS_Source" table="ROS_SOURCE_REPORTDBMAP">
    <id name="id">
    <generator class="sequence">
    <param name="sequence">ROS_COUNT</param>
    </generator>
    </id>
    <property name="source_report"/>
    <property name="source_database"/>
    <property name="is_active" type="java.lang.Integer"/>
    </class>
    </hibernate-mapping>
    The problem is that the application resets the sequence variable in the database to 1 everytime it is ran. When I attempt to insert two records the ID values are 1 and 2 respectively. And if I go to the Database and run:
    select gen_id( ROS_COUNT, 0 ) from RDB$DATABASE
    after the application runs 2 is return which means that it resets then incraments the value every time. This happens even if I set ROS_COUNT to a larger number before running the app.
    my java Code looks like so:
    createEvent("Test5", "test5", true);
    createEvent("Test4", "", true);
    private void createEvent(String srcRpt, String srcDB, boolean active) {
    Transaction tx = null;
    SessionFactory activeSessions = InitSessionFactory.getInstance();
    Session session = activeSessions.getCurrentSession();
    ROS_Source source = new ROS_Source(srcRpt,srcDB,active);
    try{
    tx = session.beginTransaction();
    session.save(source);
    tx.commit();
    activeSessions.close();
    catch (HibernateException e) {
    e.printStackTrace();
    if (tx != null && tx.isActive())
    tx.rollback();
    with InitSessionFactory being a custom function I wrote to manage the SessionFactory.
    How do I get it to continue counting from the last position or keep accurate count of ROS_COUNT?

    I think you're better off trying to find some JDBC drivers for Firebird.  CF & Hibernate are both Java apps, and will expect to use JDBC for connectivity.  Using ODBC on Java is a bit of a hack.
    CF does not have built-in support for Firebird for its Hibernate integration (supported DBs listed here: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSED380324-6CBE-47cb-9E5E-26B66ACA9E 81.html), so you'll need to configure it manually (how?  Don't know, but look @ the Hibernate website: https://www.hibernate.org/80.html, and the CF9 docs).
    As to why you're seeing discrepancies between JDBC, RDS and Hibernate... they're three different systems.  Making A DSN just requires a JDBC connection, and basically passes the SQL statements through the driver to the DB.  I have no idea how RDS works, but it's probably just doing something with JDBC as well.  Hibernate is a vastly complex application that sits on top of JDBC, and needs to generate an awful lot of very DB-platform specific code.  So it needs to know exactly what DB its talking to.  Simply "JDBC" is not sufficient.
    Adam

  • Help on Livecycle/DSN...API or some type of Active X solution to help making connection

    I have a solution that I'm trying to come up with.
    LiveCycle is a relatively handy tool for automating input from ODBC data
    sources to download to forms
    What we would like to do is automate the process of setting up the DSN used
    by LiveCycle and automate the process of making the connection to that DSN
    to populate the fields in the forms. Automating the DSN setup is done. But
    what I'm looking for is an API or some type of Active X solution to help
    with making the connection, populating the forms using LiveCycle and
    printing the PDF output file. Can you help me with this?
    Currently I'm using LiveCycle Designer 8.0 as part of the Adobe Acrobat
    suite. Can I use this, or do I need to look at a different software package?
    Thank you for any assistance you can provide me with.

    Hiho Ashley,
    Iam sorry that I can´t answer your question about the Active-X-Stuff and I truely doubt, that you will look in this thread again. But Iam interested in your solution for automated build of an DSN. Is it within the PDF-File, so not every user wanting the the PDF to be filled have to settle up an extra connection? And does it work, if the user has no permission to make a DSN on his own?
    Hope, someone can reply
    Greetings

  • Problem with making DSN

    I get this error everytime I try an make a DSN
    com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up

    Have you tried connecting to the server by other methods, perhaps the MySQL commandline client from the CF box?
    Does the database run on the same server or a different server?
    If different - firewall? Does MySQL allow remote connections?

  • Cannot see System DSN in Crystal Reports 2008 on Vista/Windows 2008

    I've been making quite a bit of progress in switching migrating our Crystal Reports 8.0 reports and apps to Crystal Reports 2008 on our Windows 2008 server, but am currently stuck on a DSN issue that I hope someone here can help me out with.
    When I go to select a new ODBC data source in Crystal Reports 2008, the only ODBC data sources that show up in the list are User DSNs.  These reports will be served via our intranet website, so I need to use System DSNs.  The same is true on both my development computer running 64-bit Vista and the production server running Windows Server 2008.
    I'm using Visual Studio 2008 (C#) for development along with Crystal Reports 2008 (not the Crystal Reports Basic that comes with Visual Studio).
    How can I use a System DSN?  Any help or advice will be much appreciated!

    Hi, Paul;
    The first thing to check is to ensure you are creating a 32 bit ODBC DSN, and not a 64 bit one. Crystal Reports 2008 is 32 bit only.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=381384&SiteID=1
    Best Regards,
    Jonathan

  • Disable DSN for specific messages

    Hi,
    i have a problem, where i wish to disable DSN for specific internal users.
    Scenario :
    Interal User a sends a mail to special address c,
    if mail host of special address c is not available or anything else i wish that internal user a is never informed that c didnt recieve his mail.
    Can this be done ?
    i thought about doing this with sieve.. but i dont know if DSNs generated by the IMS Master itself are also checked by sieve mechanism....

    Please do notice that your bits do not support many of the features you want. And that later bits do. If you offer that to your company, perhaps you could update more often, or at least this time. We're not talking about a new package, here, but just an update to the one you have, that's not doing the job properly.
    Also, if you had asked for what you needed at the beginning, I could have helped you better.
    What you want is the sieve command, save-copy, or, perhaps monitor. Please see whitepaper, quoted below:
    Saving Messages for Document Retention
    If the reason you want to capture a copy of the message is for document retention, then you will want to take advantage of the new "capture" sieve action. You have to have iMS v5.2 or better to use this facility. The capture action can only be specified in a system or channel sieve; it is not available in user sieves. The general syntax is
    capture "monitoraddress"
    The monitor action is the same as the capture action. Users are encouraged to use the 'capture' instead of monitor as it best reflects the function being performed.
    This action sends a DSN containing the original message in its entirety to the specified capture address. Since this is a DSN it is effectively a completely separate message so there's little chance of it causing side effects that will alert anyone to the monitoring. In particular, no addresses from the original message appear in the DSN header so there's very little chance of the capture copy getting forwarded to the wrong person by mistake. And even though the original message is encapsulated, it is a MIME encapsulation which means the content is easily accessible in any MIME-compliant user agent.
    The capture action is nonstandard and undocumented. It was originally intended to be part of the habanero release, but the backporting of direct LDAP support to 5.2 means it is available in 5.2 as well. We certainly intend to support it in the future.
    Saving Messages for Replay
    There is an undocumented functionality in iMS for making a copy of messages for archival purposes. It's intended for saving sent messages in the event that they need to be replayed. We did this for folks who send mail via bad links to places where the mail may be received OK by an intermediate host but then subsequently lost on its way to the final destination.
    This is done with the MESSAGE-SAVE-COPY mapping table. Entries in that table have the form
    MESSAGE-SAVE-COPY
    out-channel|from-address|D|msg-filename result
    where
    out-channel -- name of the channel the message is flowing out
    from-address -- originator's address (envelope From: address)
    D -- the letter "D" (stands for "dequeue" )
    msg-filename -- name of the message file being dequeued.
    result -- where to rename the file
    Outbound Traffic
    To save only messages out to the Internet, do
    MESSAGE-SAVE-COPY
    tcp_local|*|D|/instance-root/queue/tcp_local/*/* (tab-or-space)$Y/msg_save/$1/$2
    Be aware that the archive isn't made until the message is actually dequeued from iMS (i.e., sent successfully or bounced). A rename operation is done (as opposed to a copy operation). As such, the message file has to remain on the same disk that the IMTA_QUEUE lives on.
    Inbound Traffic
    To capture inbound mail will want to have good control of what machines/pathways a message will take on its way into your systems. If your setup is such that mail always enters the site via an INBOUND relay and leaves the site via know outbound gateways, then inbound message flow is from INBOUND-MTA --> MsgStore machine.
    Since you can have multiple MsgStore machines behind any one INBOUND-MTA, you will want to make configuration on the INBOUND-MTA machine such that it will use a dedicated queue to talk to the MsgStore machines. For instance, on the INBOUND-MTA machine, you could setup a rewrite rule in your imta.cnf file for MsgStore-A, MsgStore-B, ... MsgStore-Z like:
    Node-A.store.domain.com.au $U%$D@tcp_to_store-daemon
    Node-Z.store.domain.com.au $U%$D@tcp_to_store-daemon
    and a corresponding 'tcp_to_store' channel which looks like:
    ! tcp_to_store
    tcp_to_store smtp mx single_sys subdirs 20 noreverse maxjobs 7 \
    pool SMTP_POOL maytlsserver allowswitchchannel \
    saslswitchchannel tcp_auth
    tcp_to_store-daemon
    This has the effect of routing all mail to any of your MsgStore machines through tcp_to_store channel. Transactions to other machines in your setup will take the tcp_intranet channel.
    With this in place you can then throw in a MSG-SAVE-COPY mapping table which reads:
    MESSAGE-SAVE-COPY
    *|*|D|/instance-root/imta/queue/tcp_to_store/*/* $Y/msg_save/tcp_to_store/$2/$3
    the net effect will be a number of queue files in the /msg_save/tcp_to_store directory which are ready for replay. Note the $2 in the sample represents the subdir that the message was already in. As such if you have 'subdirs 20' on your tcp_to_store channel, you will want to precreate the /msg_save/tcp_to_save/000 thru 019 subdirectories with the appropriate ownership and permissions.
    To initiate the replay, you want to simply move the /msg_save/tcp_to_store/### directories to the /instance-root/imta/queue/reprocess and issue the command 'imsimta cache -synch'. The MTA will start pushing out those messages to the store(s).
    If you want to have multiple replays happening you can kick off parallel runs of the reprocess channel by doing 'imsimta run reprocess &' a number of times.
    And, If you want to segregate the storage for each MsgStore machine, you can make new channel in addition to the one suggested 'tcp_to_store' channel. You would then have groups of rewrite rules directing traffic over those channels or you could have one rewrite rule per channel block that you setup. That way you can have distinct entries in your MSG-SAVE-COPY mapping table.
    Finally, since there is a rename operation taking place when you use the MSG-SAVE-COPY mapping table, you will want to make sure that at the first pass that /msg_save is on the same device that your queues live on.
    Short Term Arvchival
    You could setup a process in cron to move those files to a new device on a periodic basis. Better yet, schedule this via the job_controller. For instance, these lines at the top of your job_controller.cnf file:
    [PERIODIC_JOB=archive_mover]
    command=/usr/iplanet/sitescripts/arc_mover.sh
    time=/00:10
    will run the arc_mover.sh script for you every 10 minutes. Your arc_mover.sh could look something like:
    #!/bin/ksh
    # ***Script is untested - should generate some ideas though****
    DUMMY=`test -d /var/tmp/timestamp.dir || mkdir -p /var/tmp/timestamp.dir`
    cd /msg_save
    # First pass
    for dir in `find ./ -type d`
    do
    DUMMY=`test -d /real/storage/area/$dir || mkdir -p /real/storage/area/$dir`
    cd $dir
    for msgfile in `find ./ -type f -newer /var/tmp/timestamp.dir -name "*.00"`
    do
    mv $msgfile /real/storage/area/$dir/
    done
    cd /msg_save
    done
    touch /var/tmp/timestamp.dir
    # Second pass cause we do not know how long we took.
    for dir in `find ./ -type d`
    do
    DUMMY=`test -d /real/storage/area/$dir || mkdir -p /real/storage/area/$dir`
    cd $dir
    for msgfile in `find ./ -type f -newer /var/tmp/timestamp.dir -name "00"`
    do
    mv $msgfile /real/storage/area/$dir/
    done
    cd /msg_save
    done
    exit

  • Making a mapping with queue

    Hi,
    I have one more quesstion. How can i make a connection to a database, when iam using a queue in a oracle database. I have given my coding at the bottom. I would like to know what i should write in the configuration files. Is there any particular site for it. Making a JNDI connections for the queue
    public QueueInterface(String strQueue, String dsn, Logger parmLog)
    throws JMSException, NamingException
    log = parmLog;
    log.info("Setting up a connection to the " + strQueue + " queue.");
    // Find the queue and make a connection.
    Context initCtx = new InitialContext();
    QueueConnectionFactory connFactory;
    connFactory = (QueueConnectionFactory) initCtx.lookup(dsn);
    QueueConnection = connFactory.createQueueConnection();
    System.out.println("queue connection is created");
    // Create a session.
    queueSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
    System.out.println("queue session setup");
    queueConnection.start();
    System.out.println("queue session and connection started");
    // Create and configure a sender.
    queueSender = queueSession.createSender(getQueue(strQueue));
    queueSender.setDisableMessageID(true);
    queueSender.setDeliveryMode(DeliveryMode.PERSISTENT);
    queueSender.setPriority(1);
    }

    Hi,
    QueueConnectionFactory is not a recommended approach and instead the ConnectionFactory interface should be used. Here's an example of using the OraConnectionFactory
    http://download.oracle.com/docs/html/B14341_02/oracle/dmt/jdm/resource/OraConnectionFactory.html
    Frank

  • Making Crystal reports to external customers

    Hi
    Im making reports for external customers. What do they need to install to see the reports? They have SAP and a database server. Is it enough with a crystal runtime? or do they need to change the connection to their own database and therefor need Crystal 2008 Basic to do that? I´m new with SAP but familiar to Crystal.
    //Elle

    Hi Elle,
    Yes they will likely need to set location manually but not completely sure. The integration forum can verify this if you are using that plug-in.
    What ever works best for you. ODBC is old technology and MS wanted to get rid of supporting it so OLE DB is the most current or using the native drivers if that works also. If using ODBC then just creating the DSN the reports should work. OLE DB requires the DB server name to be the same as yours so it would require them to set location also, same using the native DB drivers.
    Not sure what the best ways to get the reprots to them. Not enough info. If theya re not using Businessobjects Enterprise where you publish the reports to their system then simply sending the report via e-mail will work also.
    Thank you
    Don

  • FILE DSN using JDBC-ODBC Bridge ?

    Please Give Me sample code for Making connection
    against a dbms using FILE DSN & JDBC ODBC Bridge

    What do you mean by FILE DSN? Can you be a little more specific?

  • Making DNS through program

    I do not want to make dsn through windows/start/settings/control panel/odbc datasource. I want that my application should make the dsn through java program. The dsn will be used by jdbc-odbc bridge to make the database and create and manipulate the tables. Every thing through code only. I am facing problem in making dsn name on the machine on which my application will be installed.

    I would add one more bit of flexibility...
    What if your user had their own JDBC driver they wanted to use in place of the JdbcOdbc one? With the code snippets we've seen, they would have to put their driver in the classpath or else class.forName() won't find it.
    Of course, you could use the overload of forName() that let's you specify a classloader, but that actually won't work because the DriverManager will refuse to talk to any Driver class not loaded from the system classloader.
    The solution is to make a ShimDriver that implements the Driver interface, have its methods proxy the methods of a driver you load with your own classloader (if you wish), and manually register an instance of your ShimDriver with the DriverManager (which won't complain because it was loaded with the system classloader).
    Why go to the trouble? So that your properties file can have an extra line 'driver_url=jar:file:/path/to/driver/jar/file!/'.
    See http://www.kfu.com/~nsayer/Java/dyn-jdbc.html

  • Is connection NAME property DSN or connection name

    Hi We run std 2008 R2.  I have what I hear is an odbc connector to a btrieve general ledger system.
    I also hear that I have to and have created two separate odbc DSN's on my local to extract data from this source for two different companies.
    I want to use the same conn mgr in ssis for otherwise identical DFTs in both companies and am hoping by making the conn mgr "name" property an expression, I'll be able to pull that off.  But am not sure what that property is for. 
    My recollection is that there was trouble going with "use connection string" (too bad cuz that property is obvious) instead of "use user or system dsn" when setting up the conn mgr but wouldn't swear to that.   
    Can someone advise?  I'll keep looking on the internet but am coming up short so far. 
    my provider is ".net Providers\odbc data provider".  I didn't see a property for my oledb sources to use an expression based conn mgr but may look again at that alternative.  Unfortunately the going is slow cuz ssis keeps locking up in
    the gui presumably because its checking this connection's availability periodically.

    Hi db042190,
    A data source name (DSN) is a data structure that contains the information about a specific database that an Open Database Connectivity ( ODBC ) driver needs in order to connect to it. Included in the DSN, which resides either in the registry or as a separate
    text file, is information such as the name, directory and driver of the database, and, depending on the type of DSN, the ID and password of the user. Name is just the name of the connection manager. They are completely different.
    If you want to change the DSN dynamically, I suggest you configure the ConnectionString property via Expression.
    The following screenshot is for your reference:
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Cannot Connect To SQLServer2000 - driver

    I cannot cannot to SQLServer2000. Using the latest version of SQLDeveloper 1.1.3. I installed it on my fresh installed XP, downloaded the jtds-1.2-dist.zip driver and referenced it in the third party DB drivers but I still got the net.sourceforge.jtds.jdbc.Driver error.
    Before this, I am using the earlier version 1.1.2 and I can connect to SQLServer2000.
    Anyone has ideas why I am getting this error? I downloaded the whole 70MB zip file and extracted to a folder. I can connect to oracle databases.
    I just needed to connect to SQLServer 'coz I maintain both DBases.
    Please reply to this...
    Thanks.,
    Rey

    when I gave:
    catch (SQLException e)
    System.out.println(e.getMessage());
    to know actual problem then driver expiry date is over message was dispaly.
    How I come to know what drivername I should write in class.forName();
    Is DSN entry compulsory or name of database has to be
    written.
    Awaiting reply at the earliest.

  • DSN-LESS Connetion with SQLServer

    I am working on client server application and looking for a way to have dsn less connection with sqlserver2000 from java client application instead of using jdbc-odbc bridge.
    If anybody of u have work on it then pls help me
    thanks
    Your Friend

    I am working on client server application and looking
    for a way to have dsn less connection with
    sqlserver2000 from java client application instead of
    using jdbc-odbc bridge.That statement does not make sense. By definition the only time you would need a DSN-less connection string is if you are using jdbc-odbc.
    So your question is one of the following:
    1. You want to know how to create a DSN-less connection string using MS SQL Server. Answer - search this forum using "DSN-less" and "SQL Server" and you will find examples.
    2. You want a different driver. Answer - search for commercial drivers here: http://industry.java.sun.com/products/jdbc/drivers. Microsoft also has a driver depending on the version of SQL Server you are using and here is a free driver http://jtds.sourceforge.net/

Maybe you are looking for