BI JDBC Connection fails to connect to SQL Server 2000
Hello SDNs,
I have configured my JDBC connector to connect to MS SQL Server 2000(Third party in my case) using the document How to Configure UD connect on the J2EE server for JDBC Access to External Drivers.
I have given the following properties for my JDBC connector:
Driver Name : com.microsoft.jdbc.sqlserver.SQLServerDriver
URL : jdbc:microsoft:sqlserver://servername:1433;database=<databasename>
When i test the connection using the url: http://hostname:50000/TestJDBC_Web/TestJDBCPage.jsp
Here is the Error:
<b>Details:
com.sap.ip.bi.sdk.exception.BIConnectionFailedException: Cannot open the connection at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcConnectionFactory.getConnectionEx(JdbcConnectionFactory.java:238) at com.sap.ip.bi.sdk.trialarea.connector.servlet.model.JDBCModel.getConnection(JDBCModel.java:797) at com.sap.ip.bi.sdk.trialarea.connector.servlet.model.JDBCModel.getTables(JDBCModel.java:132) at
com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnection.(JdbcManagedConnection.java:118) ... 23 more Caused by: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver Found in negative cache -
Loader Info -
ClassLoader name: [connector:default] Parent loader name: [Frame ClassLoader] References: common:service:http;service:servlet_jsp service:ejb common:service:iiop;service:naming;service:p4;service:ts service:jmsconnector library:jsse library:servlet common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl library:ejb20 library:j2eeca library:jms library:opensql common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore interface:resourcecontext_api interface:webservices interface:cross interface:ejbserialization common:library:bimmrcore;library:bimmrdb sap.com/cafcore sap.com/cafruntimeear library:tcconnconnectorframework library:sapxmltoolkit sap.com/com.sap.ip.bi.sdk.dac.connector.xmla.x library:com.sap.mw.jco library:com.sap.aii.proxy.framework library:com.sap.aii.util.misc library:com.sap.ip.bi.sdk.dac.connector.odbodll library:BI_JDBC library:bimmrcwm_1.0_library library:bimmrjmi library:com.sap.ip.bi.sdk library:MSSQL Resources: H:\usr\sap\BD2\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.ip.bi.sdk.dac.connector.xmla\connector\connectors\bi_sdk_xmla.rar\bi_sdk_xmla.jar H:\usr\sap\BD2\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\cafbwadapterassembly\connector\connectors\sap.com_cafbwadapterassembly.rar\lib\java\sap.comcafbwadapter~caf.bw.adapter.jar H:\usr\sap\BD2\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.ip.bi.sdk.dac.connector.sapq\connector\connectors\bi_sdk_sapq.rar\bi_sdk_sapq.jar H:\usr\sap\BD2\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.ip.bi.sdk.dac.connector.jdbc\connector\connectors\bi_sdk_jdbc.rar\bi_sdk_jdbc.jar Loading model: {parent,references,local} -
at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:360) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connectDB(Connection.java:365) ... 25 more</b>
Please let me know if any changes are required in Driver name and URL.
Your inputs will be highly appreciated.
Thanks,
Sireesha.B
Message was edited by:
sireesha Borra
Hi Sireesha,
Some insights.....while using JDBC connector .
For JDK 1.1 environments, access to the "current working directory" mustbe granted.
For Java 2 environments, access to the temporary directory specified by the VM configuration must be granted. The following is an example of permissions being granted in the file java.security.policy for the C:\TEMP directory:
// permissions granted to all domains grant { // Permission to create and delete temporary files. // Adjust the temporary directory for your environment. permission java.io.FilePermission "C:
TEMP
-", "read,write,delete"; };
Note 777304 - Problems with JDBC drivers when using BI UDI
Related notes -
834385 - 'Invalid operation: result set closed' Exception
834384 - Problems with selection in InfoPackage in UD Connect
777306 - MSSQL problem when using BI UDI
777305 - Problems with Unicode when using BI UDI
Fyi-
http://dev.mysql.com/downloads/index.html
Regards,
Anil
Similar Messages
-
Invalid session : connecting from developer 6i to sql server 2000
Hi ,
I am facing the following problem for connecting to sql server
2000 from oracle forms 6i.
Oracle developer 6i(form builder 6.0.8.11.3)
sql server 2000
o/s windows 2000 server
plus80.exe <username>/<password>@odbc:<dsn_name>
SQL*Plus: Release 8.0.6.0.0 - Production on Tue Oct 24 17:36:56
2000
(c) Copyright 1999 Oracle Corporation. All rights reserved.
ORA-00022: invalid session id; access denied
ORA-00022: invalid session id; access denied
ORA-00022: invalid session id; access denied
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Server not available or version too low for this feature
ORA-00022: invalid session id; access denied
Connected to:
Oracle Open Client Adapter for ODBC 6.0.5.29.0
Microsoft SQL Server 08.00.0194
SQL>
pls help
Thanks in advance
YogeshHello ,
this forum must have a attachment option , so it very easy for others to update their development
Now how can i paste the procedure it have 6 - 8 pages and when i paste it, the words merge or join with others word, it become very difficult to read,,
anyhow
mail me i send the document
[email protected] -
Connect with BPEL to MS SQL Server 2000
Hi All,
I would like to ask how can I connect from my BPEL Server 10.1.3.3 to MS SQL Server in BPEL process?
What I have to set for this type of connection?
Is there a database adapter for MS SQL Server?
Thank's for your response.
MichalThere is a DB Adapter that supports SQL Server in 10.1.3.3. You can perform normal DML operations such as SELECT, INSERT, DELETE, etc. You can also invoke Stored Procedures using a manual approach. To connect to SQL Server you need to specify your connection settings just as you would normally do for an Oracle connection (by editing data-sources.xml and oc4j-ra.xml). You need to first create a connection to SQL Server in JDeveloper before you can model your process (or as a step while you're using the Database Adapter). Refer to the documentation which describes third party database support provided by the DB Adapter.
-
SQL Server 2000 Jdbc connection
I just have a small question and I was wondering if anyone could help me out with it? I'm using a JSP page to connect up to the database on the server. I have the JDBC driver and am trying to connect from my machine to SQL Server 2000 on our server. The thing is I'm having a little trouble with the connection string.
(i am using the Microsoft SQL Server 2000 JDBC Driver)
Can you use Windows Authentication when using the connection string?
Also i tried using a SQL Server connection but it gave me the error : "com.microsoft.sqlserver.jdbc.SQLServerExcepti on: Login failed for user 'Arun'. The user is not associated with a trusted SQL Server connection. "
This is the connection string
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection connection1 = java.sql.DriverManager.getConnection("jdbc:sqlserver://localhost:1433;Database=BusinessDatabase","Arun","testpass");can you set it up for windows authentication?
thanks for any help anyone can give me with this! <img src="http://www.java-forums.org/images/smilies/smile.gif" border="0" alt="" title="Smile" width="16" height="16" />Hi,
Yes, it is possible to use Windows Authentication but you will need to make sure the sqljdbc_auth.dll file is in your system path specified with the -Djava.library.path="xxx" option. The dll is included as part of the JDBC Driver download.
Hope this helps.
Ben. -
How to connect Sql Server 2000 using JDBC ODBC Driver
How to connect Sql Server 2000 using JDBC ODBC Driver ?
plz Send Syntax.
thanksIn SQL Server 2000 the driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver
The connection URL for the default SQL Server 2000 database is jdbc:sqlserver://localhost:1433
Class.forName(
"com.microsoft.sqlserver.jdbc.
SQLServerDriver");
String url =
"jdbc:sqlserver://localhost:1433";
Connection conn = DriverManager.
getConnection(
url, "sa", "sqlserver"); -
Setting up Connection Pool in sun app server 8.1 with SQL server 2000
Hello,
I am trying to set up a connection pool & data source for SQL server 2000 (MSDE 2000).
Here is what I attempted to do:
I have a pool data source in a jar file called poll.jar and I copied it to C:\sun\Appserver\lib (Install dir\lib)
com.microsoft.mspool.PoolDataSource is the pool data source class.
In the Admin console, JDBC>Connection pools. Selected NEW and made the following entries.
GENERAL SETTINGS
Name: MsPool
Datasource class name : com.microsoft.mspool.PoolDataSource
Resource type: javax.sql.DataSource
POOL SETTINGS: default values
CONNECTION VALIDATION: default values
TRANSACTION ISOLATION: default values
PROPERTIES:
DataSourceName:PoolDataSource
NetworkProtocol:tcp
DatabaseName: myDB
Password:User specific
user:User specific
server: localhost
PortNumber:1433
I get the following error when I ping:
Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Class name is wrong or classpath is not set for : com.microsoft.mspool.PoolDataSource.
Can any one help me if have a solution?
Thanks in advance.
magYou need to copy your jar to ${AS_INSTALL}/domains/domain1/lib/ext (replace domain1 by your
domain). Another option is to leave the jar in ${AS_INSTALL}/lib and add a entry in the classpath-suffix element of your domain.xml.
thanks,
:aditya -
MS SQL Server 2000 connectivity problems
Hello everyone,
I'm having problems connecting my application to MS SQL Server 2000. I am making a desktop application that is going to read and update a database I have created in MS SQL Server 2000. The problem is I cannot connect to the database from the application. Here are the details:
I have only created a GUI for one table so far. I have created one other class that is used for connecting to the database.
The GUI class is called Products.java and I have created it in Netbeans. The other class is called ConnectClass.java. In the constructor of the Products.java (GUI class), I instantiate an object of ConnectClass. That object in turn tries to establish a connection to the database. Here is the code of the constructor of the Products.java class (GUI class).
public class Products extends javax.swing.JFrame {
private ConnectClass connect1; // declaring the reference variable for ConnectClass
/** Creates new form Products */
public Products() {
initComponents();
connect1 = new ConnectClass(); // instantiating the ConnectClass
The code of ConnectClass.java is as follows:
import java.sql.*;
public class ConnectClass {
Connection connection;
Statement statement;
public ConnectClass()
try
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=assignment2;User=root;Password=sa");
statement = connection.createStatement();
catch(SQLException sqle)
System.err.println("Error creating connection");
catch(ClassNotFoundException cnfe)
System.err.println(cnfe.toString());
When I run the application I expect that the database should be connected at least. However I get the following message in Netbeans output window:
run:
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
BUILD SUCCESSFUL (total time: 6 seconds)
I am using Windows XP Home Edition SP3
The JDBC driver I am using is: Microsoft® SQL Server® 2000 Driver for JDBC™ Service Pack 3
The name of the database I have created in MS SQL Server 2000 is: assignment2
I have given the following settings in the CLASSPATH environment variable: .;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar
I don't know what is wrong. Any help would be GREATLY appreciated. If you want to know something more please ask me.
RegardsAce1111111 wrote:
Thanks for the answers. I put the jar file in the jdk/jre/lib/ext folderWhich is exactly what you should not do. That folder is for language extensions, which a Driver is not. Why does everybody find it so hard to take the time to learn the language basics?
and the driver was finally detected but then the program would not connect to the database.Did you configure the server properly. Per default it is not configured to accept network connections.
I tried jtds driver too. I was so frustrated that I installed MySQL instead. Put the jar file in jre/lib/ext folder and then gave the URL and to my relief the database connected. Maybe there are some settings that need to be configured in MS SQL before it can connect. But I could not get it to connect :(The manual would contain that info, btw. -
Cant create connection Pool for MS SQL Server 2000 with Microsoft Driver
i am using bea weblogic server 6.1, i cant create connection pool while using MS
SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft website. when
i give the following class name for JDBC driver and the connection url and click
apply while selecting the available server, a number of exception appears in default
server (that is the connection pool cannot be created..... cannot load the driver
class).
URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
when i use the above setting in a JDBC simple application in Jbuilder
7.0 the application runs successfully and fetches the data deom MS SQL database
but in at Bea connection Pool is not created with these settings. i do give appropriate
username and password in properties field in connection pool. Thankx for any help!khabbab wrote:
That was the original code part from "startweblogic" :
:runWebLogic
echo on
set PATH=.\bin;%PATH%
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;
echo off
and i changed it to :
:runWebLogic
echo on
set PATH=.\bin;%PATH%
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;D:\Program Files\Microsoft
SQL Server 2000 Driver for JDBC\lib\msbase.jar;D:\Program Files\Microsoft SQL
Server 2000 Driver for JDBC\lib\msutil.jar;D:\Program Files\Microsoft SQL Server
2000 Driver for JDBC\lib\mssqlserver.jar;I suggest moving or copying the three ms driver jars to a directory that has no blanks
in it so the classpath doesn't have blanks in it. Ie:
go to the "D:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib"
directory and do this:
mkdir D:\microsoft_jdbc_driver
cp *.jar D:\microsoft_jdbc_driver
Then make the classpath include D:\microsoft_jdbc_driver\msbase.jar etc.
Joe
>
>
echo off
when i save and run the bat file, server appears then disappears.
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
The class path which is echoed at server startup does not include thepaths to
driver jar files. when i edited the "startweblogic.bat" file and includedthe
driver class paths to jar files, now the server doesnot even run. tellme what
to do now???Show me what change you made to the startweblogic file.
Joe
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
kindly tell me how can i check that the class paths for driver jarfiles are included
in that string? thanks. also tell me can not i use the jdriver forsql server
2000?.The startup script will echo what it's doing, including printing out
the classpath
it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
for
basic JDBC, but the MS drivfer is preferable in some ways.
Joe
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
i am using bea weblogic server 6.1, i cant create connection
pool
while
using MS
SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
website.
when
i give the following class name for JDBC driver and the connectionurl and click
apply while selecting the available server, a number of exception
appears
in default
server (that is the connection pool cannot be created..... cannot
load
the driver
class).The server startup script creates a string that will become the
classpath
for the server.
This string is part of the java call to start the server with a-classpath
argument. You need to
make sure the MS driver jars are part of that classpath string.
Joe
URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
when i use the above setting in a JDBC simple applicationin Jbuilder
7.0 the application runs successfully and fetches the data deom
MS
SQL database
but in at Bea connection Pool is not created with these settings.
i
do give appropriate
username and password in properties field in connection pool.
Thankx
for any help!
khabbab wrote:
The class path which is echoed at server startup does not include thepaths to
driver jar files. when i edited the "startweblogic.bat" file and includedthe
driver class paths to jar files, now the server doesnot even run. tellme what
to do now???
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
kindly tell me how can i check that the class paths for driver jarfiles are included
in that string? thanks. also tell me can not i use the jdriver forsql server
2000?.The startup script will echo what it's doing, including printing out
the classpath
it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
for
basic JDBC, but the MS drivfer is preferable in some ways.
Joe
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
i am using bea weblogic server 6.1, i cant create connection
pool
while
using MS
SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
website.
when
i give the following class name for JDBC driver and the connectionurl and click
apply while selecting the available server, a number of exception
appears
in default
server (that is the connection pool cannot be created..... cannot
load
the driver
class).The server startup script creates a string that will become the
classpath
for the server.
This string is part of the java call to start the server with a-classpath
argument. You need to
make sure the MS driver jars are part of that classpath string.
Joe
URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
when i use the above setting in a JDBC simple applicationin Jbuilder
7.0 the application runs successfully and fetches the data deom
MS
SQL database
but in at Bea connection Pool is not created with these settings.
i
do give appropriate
username and password in properties field in connection pool.
Thankx
for any help! -
Oracle XE connection to SQL Server 2000
Hello everybody,
I need to make a connection to a table in SQL Server 2000. I am using Oracle XE with Apex 3.0.1.
SQL and XE are on the same server(windows server 2003).
I need to make an application that uses some data of the SQL Server and for the rest it uses data from Oracle XE.
How can I make this connection to SQL Server from Oracle XE? Some suggestion where I should start, would be great.
It would be great if the Apex developers would not notice that the data is retrieved from SQL Server, is this possible?
For 10g there is a gateway for this I believe, but not for XE.
Thank you for your time!Thanks, after searching some information about Heterogeneous Services.
I came accross this site http://www.databasejournal.com/features/oracle/article.php/10893_3442661_1
I followed the instructions but I get the following error:
SQL> create database link sqlxe connect to testuser identified by testuser USING
'SQLXE';
Database link created.
SQL> desc employess@sqlxe
ERROR:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from SQLXE
I searched for the error ORA-28545 and followed some suggestions but I cannot find a solution.
Here some information that might be usefull (sqlxe is the connectionname):
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\Listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = SQLXE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = hsodbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
LISTENERSQLXE =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
DEFAULT_SERVICE_LISTENER = (XE)
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = win2003)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
SQLXE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522))
(CONNECT_DATA =
(SID=SQLXE)
(HS=OK)
lsnrctl start listenersqlxe
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-NOV-2007 10:46
:31
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\ad
min\listener.ora
Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log
\listenersqlxe.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
STATUS of the LISTENER
Alias listenersqlxe
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
Start Date 08-NOV-2007 10:46:34
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
dmin\listener.ora
Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
og\listenersqlxe.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc)))
The listener supports no services
The command completed successfully
lsnrctl status listenersqlxe
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-NOV-2007 10:47
:24
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
STATUS of the LISTENER
Alias listenersqlxe
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
Start Date 08-NOV-2007 10:46:34
Uptime 0 days 0 hr. 0 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
dmin\listener.ora
Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
og\listenersqlxe.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc)))
The listener supports no services
The command completed successfully
Thanks in advance -
MS SQL Server 2000 + JDBC
Hi everyone,
I know many of you don't like microsoft products, but I am getting weird errors when i connect my java program to SQL server 2000 with its driver. My code worked FINE with MS Access. The thing is I know there are some bugs to SQL server driver , and somebody knowledgeable with this software could def help me fix the problem, but i searched all over the microsoft site, couldnt find a fix to my problem, and contacting microsoft for help costs between $195-$245. I was wondering if somebody here is familiar with this software. I would really appreciate it if you could email me at [email protected] I will post all of the problem here also.
I'm getting the following error when i try to create a insert a new function (create a new row) in my database:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'Function'.
Here is the relevant code:
<code>
try{
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver() );
} catch (Exception e) {
System.out.println(e.getMessage());
try{
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://NJ8650MONDAL", "m", "m");
con.setAutoCommit(false);
PreparedStatement insertFvalues = con.prepareStatement("INSERT INTO function_description (Function, Description, Notes) VALUES (?,?,?)");
insertFvalues.setString(1,functionname);
insertFvalues.setString(2,descriptionname);
insertFvalues.setString(3,notesname);
insertFvalues.execute();
PreparedStatement insertRvalues = con.prepareStatement("INSERT INTO return_code_description (Function_Name, Return_Codes, Return_Codes_Description) VALUES (?,?,?)");
insertRvalues.setString(1,functionname);
insertRvalues.setString(2,rvvaluesname);
insertRvalues.setString(3,rvdescripname);
insertRvalues.close();
con.commit();
insertFvalues.close();
insertRvalues.close();
con.close();
} catch (SQLException e) {System.out.println(e.getMessage());
}</code>thanks. i fixed that error, so now that portion works. however, i have a question..
SQL server does not allow comparisons between text fields unless the IS NULL or LIKE operators are used. I'm using JDBC to load exisiting entries from the database and display them in a gui. THe thing is I have one main table, which has a one-to-many relationship with my other tables..so the way i linked them was to have one column in each table hold the same text data, and then i can use the = operator to see if there are matches..
for example one table (function_description) has the following data:
Function_Name_Ind Description Notes
sample blah blah
And another table (return_code_description)has the following data:
Function_Name Return_Code Return_Code_Description
sample x xx
sample y yy
And I want all of this displayed.
i don't know if that explanaiton is any good, but seeing the code below might help you understand..
<code>
try{
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://NJ8650MONDAL", "m", "m");
con.setAutoCommit(true);
Statement stmt = con.createStatement();
ResultSet result = stmt.executeQuery("SELECT * FROM function_description, return_code_description " + "WHERE function_description.Function_Name_Ind = return_code_description.Function_Name AND (((Function_Name_Ind)='"+ functionname + "'))");
result.next();
function.setText(result.getString("Function_Name_Ind"));
description.setText(result.getString("Description"));
notes.setText(result.getString("Notes"));
rvalues.setText(result.getString("Return_Codes"));
rvdescrip.setText(result.getString("Return_Codes_Description"));
stmt.close();
con.close();
} catch (SQLException e) {System.out.println(e.getMessage());
</code>
And i'm getting this error.
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
Can any of you think of another way I can do this? IS there another way in JDBC I can write it?
thanks! -
Basic Deployment problem, SQL Server 2000 and wanna create setup
I have just finished making a small app using Java and using JDBC driver to connect to an SQL Server 2000 that is installed on my PC.
I now want to create a setup (using NSIS) of this app and distribute among friends. But my problem is that I have created the database on my PC on the SQL Server 2000. Do all the people who want to use my app have to have Sql Server 2000 installed ?? How do they get the data from the database if they dont have Sql Server installed??
I really havent tried much of apps that use databases...soo dont know much, but then any help would be appreciated!!They have to connect to an instance of SQL Server 2000 that has the database and schema that your app requires, so the host machine has to be visible in their network, with SQL Server installed, listening on the port in your URL connection string (default is 1433), with a username and password that you've set up for a user with the appropriate permissions GRANTed.
As you can see, it's not trivial.
If all the people you're distributing the program to can see your machine's IP address, they can simply connect to your database.
If not, you should provide all the scripts necessary to create the database and create the tables, set up the permissions, and populate the data.
% -
How to establish a trusted connection with JDBC for SQL SERVER 2000
Hi!I am using jdk 1.4 and eclipse 3.3.
I create a servlet in eclipse with in-build tomcat.
When I run it ,it was working perfectlly has it was suppose to work.
In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
[Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
for user 'sa'
I searched around some post and found that ok ,I need trusted connection
But I have 2 Questions
1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
2). How do I create a trusted connection with JDBC for SQL server 2000
Thnaks for your help in advance.Hi! duffymo ,QussayNajjar ,dvohra09 .
Thank for help.
The ideas are really great.
I am trying generate reports for my company.
When I used eclipse the code worked perfectly.
below is code which I used
out.println("Calling For Class Name<br>");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
out.println("Calling For Class Name success Now calling database <br>");
1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
out.println("connecting to database success<br>");
I had tried to connect the database using this three way.
In 1st I tried using DSN name .
Next 2 self explainer for expert like you.
I used to 2nd variant to connect in eclipse and it worked fine.
I not an expert in java ,I just doing some research on jasperReport.
My best guest is that eclipse is using some library files of which I have no clue.
Thank's for your help,I appretiate it.
Once again thank a billion.
Sorry for the messy righting. -
Java Web Server 6.1 & Pooled SQL Server 2000 JDBC Connections
If anyone can shed some light on this problem I would greatly appreciate it.
I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web Server 6.1 with the SQL Server 2000 JDBC Driver.
The background:
1. I have downloaded the SQL Server 2000 JDBC Driver and installed it on the web server.
2. I used the Administration GUI to add the .jars(namely msbase.jar, msutil.jar, and mssqlserver.jar), to the classpath.
3. Upon creating a simply JSP to access connection metadata using the direct connect method, ie.,
Class.forName( com.microsoft.jdbc.sqlserver.SQLServerDriver);
Connection con = DriverManager.getConnection( "jdbc:microsoft:sqlserver:// ....
I am shown a successful output of...
JDBC Test
Registering JDBC Driver
driverClass: com.microsoft.jdbc.sqlserver.SQLServerDriver loaded and registered.
Driver Information
Driver Name: SQLServer
Driver Version: 2.2.0037
Database Information
Database Name: Microsoft SQL Server
Database Version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: )
Avalilable Catalogs
catalog: master
catalog: msdb
catalog: Northwind
catalog: pubs
catalog: tempdb
4. This tells me that the web server has access to the files necessary and the classpath is configured correctly.
Now the fun begins...
In order to set up the JDBC Connection Pool I have done the following...
1. I have created a web.xml file for the web-app which contains the JSP and includes the following entry
<resource-ref>
<res-ref-name>jdbc/devjwscp</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
2. I have used the "JDBC Connection Pools" link under the "Java" tab in the Administration GUI to create a connection pool.
"Pool Name:" is "devjwscp"
"DataSource Classname" is set to "com.microsoft.jdbcx.sqlserver.SQLServerDataSource". All other properties have been left alone.
3. I have used the "JDBC Resources" link under the "Java" tab in the Administration GUI to create a JNDI resource.
"JNDI Name" is set to "jdbc/devjwscp"
"Status" is "true"
"Pool Name" is "devjwscp"
The web-app JSP comes back with the following exception.
JDBC Test
Exception Thrown
Cannot create resource instance
javax.naming.NamingException: Cannot create resource instanceorg.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
org.apache.naming.NamingContext.lookup(NamingContext.java:834)
org.apache.naming.NamingContext.lookup(NamingContext.java:181)
org.apache.naming.NamingContext.lookup(NamingContext.java:822)
org.apache.naming.NamingContext.lookup(NamingContext.java:181)
org.apache.naming.NamingContext.lookup(NamingContext.java:822)
org.apache.naming.NamingContext.lookup(NamingContext.java:181)
org.apache.naming.NamingContext.lookup(NamingContext.java:822)
org.apache.naming.NamingContext.lookup(NamingContext.java:194)
org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
javax.naming.InitialContext.lookup(InitialContext.java:347)
_jsps._jdbctest_jsp._jspService(_jdbctest_jsp.java:236)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:667)
com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
4. FYI my server.xml <RESOURCE> entry looks as is shown below
<RESOURCES>
<JDBCCONNECTIONPOOL name="devjwscp" datasourceclassname="com.microsoft.jdbcx.sqlserver.SQLServerDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
<PROPERTY name="serverName" value="secret"/>
<PROPERTY name="portNumber" value="1433"/>
<PROPERTY name="User" value="secret"/>
<PROPERTY name="Password" value="secret"/>
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="jdbc/devjwscp" poolname="devjwscp" enabled="on"/>
</RESOURCES>
What gives? Do I need to add anything else to the server.xml? I know the server.xml for JWS differs from Apache. I have done an exhaustive search of the web. Many other individuals have had the same thing happen, buy none of them offered any explaination or remedy.
Thanks in advance.Hi,
Were you able to get it working.
I am using
Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
I am still getiing the same error. I also suspect that there is something wrong with thr DTD too. It gives me the following when the server comes up.
Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
Listening for transport dt_socket at address: 1699
info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun M
icrosystems Inc.]
info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
wdpr.disy.com] at [acsanet]
info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
wdpr.disy.com] at [testing]
failure: WEB0120: XML error parsing deployment descriptor [C:/Sun/WebServer6.1/h
ttps-AW-NYNY-D609628.nna.wdpr.disy.com/webapps/https-AW-NYNY-D609628.nna.wdp
r.disy.com/testing/WEB-INF/sun-web.xml]
Failed to create the XML-DOM Document. Check your XML to make sure it is correc
t.org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8
character beginning with 0xa0" (line number may be too low).
at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(Input
Entity.java:914)
at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl
.java:185)
at org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(Grap
hManager.java:711)
at org.netbeans.modules.schema2beans.BaseBean.createGraph(BaseBean.java:
2075)
at com.iplanet.ias.web.WebContainer.loadWebModule(WebContainer.java:695)
at com.iplanet.ias.web.WebContainer.loadStandaloneWebModule(WebContainer
.java:626)
at com.iplanet.ias.web.WebContainer.loadWebModules(WebContainer.java:600)
at com.iplanet.ias.web.WebContainer.createVS(WebContainer.java:374)
at com.iplanet.ias.server.J2EERunner.createVS(J2EERunner.java:223)
info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.wdpr.disy.com] at [search]
config: HTTP4292: flex-init: Log file C:/Sun/WebServer6.1/https-AW-NYNY-D609628.
nna.wdpr.disy.com/logs/access should be removed before changing its format
info: HTTP3072: [LS ls1] http://AW-NYNY-D609628.nna.wdpr.disy.com:80 ready to
accept requests
startup: server started successfully
info: CORE3274: successful server startup
the sun-web.xml is as below:
<?xml�version="1.0"�encoding="UTF-8"?>
<!--
Copyright 2002 Sun Microsystems, Inc. All rights reserved.
-->
<!DOCTYPE�sun-web-app�PUBLIC�"-//Sun�Microsystems,�Inc.//DTD�Application�Server�8.0�Servlet�2.4//EN"�"http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
<sun-web-app>
<resource-ref>
<res-ref-name>jdbc/oraclePool</res-ref-name>
<jndi-name>jdbc/oraclePool</jndi-name>
</resource-ref>
</sun-web-app>
Am I using the right DTD ?
Please let me know.
Thank you.
-- Martin Louis -
Connecting to SQL Server 2000 with MS SQL Server Driver for JDBC
Hi,
I am brand new to JDBC . I have installed JDBC driver (for JDBC 2.0) from the Microsoft site and made relevant changes to the class path variable to include the driver paths, as suggested in the driver help documnnts. I have written a simple java code to register. But i get "class NotFound" error.
here's my code. What am I doing wrong? Thnaks for the help....
class Test {
public Test() throws Exception {
// Get Connection
// Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
DriverManager.registerDriver (new com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://SQL1:1433",myuser,mypwd);
if (conn != null) {
System.out.println();
System.out.println("Successful Connection");
System.out.println();
// Meta Data
DatabaseMetaData meta = conn.getMetaData();
System.out.println("\n Driver Information");
System.out.println("Driver Name: " + meta.getDriverName());
System.out.println("Driver Version: " + meta.getDriverVersion());
System.out.println("\n Database Information");
System.out.println("Database Name: " + meta.getDatabaseProductName());
System.out.println("Database Version: " + meta.getDatabaseProductVersion());
} //Test
public static void main(String [] args) throws Exception {
Test test = new Test();
}Hi MoD,
This is the exact command I used for compiling
C:\>javac -classpath "c:\java;c:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib\mssqlserver.jar;c:\Program Files\Microsoft SQL Server 2000 Driver f
or JDBC\lib\msbase.jar;c:\Program Files\Microsoft SQL Server 2000 Driver for JDB
C\lib\msutil.jar" c:\java\Test.java
To Execute I used
C:\>java -classpath "c:\java;c:\Program Files\Microsoft SQL Server 2000 Driver
for JDBC\lib\mssqlserver.jar;c:\Program Files\Microsoft SQL Server 2000 Driver f
or JDBC\lib\msbase.jar;c:\Program Files\Microsoft SQL Server 2000 Driver for JDB
C\lib\msutil.jar" c:\java\Test
In fact it kept thrwing up the Class Not Found error for the above commands.
But as U suggested I removed the classpath and executed both javac and java commands without classpath clause , and guess what it worked for the line
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
(i.e., it dint throw any exception like before). So can I assume that driver is successfully registered?
I tried using Jcreator for compile and run. But I got the same error msg as the commands given above with calsspath caluse. Is there a way around for this to make it work from an external editing tool like Jcreator apart from removing the classpath option from the JDKTool optional setting(doing this did not help for me)
Also one last favor: How do I connect with the trusted connection option? (i.e. it should use already logged in windows authentification login)
Thanks for all U'r help. I appreciate it very much.
Suma -
Cannot establish connection - JDBC driver for MS SQL server 2000
Hi,
We are facing problems in connecting to SQL server 2000.
We have installed the latest version of the driver from followin link and following
https://websmp108.sap-ag.de/msplatforms > SQL Server > JDBC Driver for MS SQL Server (Version 3.70.10)
We have given the following entries in our communication channel:
JDBC Driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection: jdbc:sqlserver://<SQLserver IP>:1433;databaseName=production_info
Please let us know the procedure to find if the JDBC driver for SQL 2000 is installed from our SAP XI.
ERROR DETAILS:
Error during database connection to the database URL 'jdbc:sqlserver://<SQLserverIP>:1433;databaseName=production_info' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://<SQLserverIP>:1433;databaseName=production_info': SAPClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver'
Please help.
Regards,
RehanHi Chris,
We have used the same because we have downloaded the driver from following location
https://websmp108.sap-ag.de/msplatforms ; > SQL Server > JDBC Driver for MS SQL Server (Version 3.70.10)
I have tried with both "com.microsoft.jdbc.sqlserver.SQLServerDriver"; and "com.microsoft.sqlserver.jdbc.SQLServerDriver";, but still I am facing the same error.
Service market place has given the driver as "JDBC Driver for MS SQL Server (Version 3.70.10)", is there a way to find out if it is for 2000 or 2005?
Thanks for your reply.
Regards,
Rehan
Maybe you are looking for
-
I keep having problem with the Adobe plug-in
Whenever I try to open a PDF file in Firefox, all I get is a black screen, sometimes with the blue bar across the middle. I tried reinstalling Adobe, which worked for one or two files. Then it stopped working correct, again!
-
Wierd bar with blue circle appeared above tabs
HI -- last night, shortly after (not sure how long exactly) having installed Silverlight - direct from the amazon prime video site, a strange white bar with a blue ringed circle appeared above my tabs in the browser. I don't think it appeared directl
-
I, I have a brand new 70D and i'm not able to install eos utility 2 on my computer. I already have eos utility 1. I tried with the cd and with the installation package on the canon site. At the step 4 of the installation, it say NG (in red) Eos Uilit
-
Help!! Suddenly..no airport hardware found! Please help!
My 17" powerbook fell and now claims that no airport hardware can be found. I'm thinking the card dislodged or something but how do I re-secure it?? Please help.
-
This software is killing the battery life. Anyone find a way to solved this issue with their iPads? If not, is there a way to go back to the last software, this is not acceptable.