on 02-02-2006 8:20 AM
I need to create a datasource in Visual Admin for SQL Server 2005. I have already downloaded the JDBC Driver for SQL server 2005 and while creating the driver in visual admin I specified sqljdbc.jar from the downloaded directory.
Then created the datasource, filling out the following properties:
o Main tab > DataSource Name: fx MyDatasource
o Main tab > Add Alias: fx MyAlias
o Main tab > Driver Name: SQL Server
o Main tab > JDBC version: 2.0 (with XA support)
o Main tab > Object factory: com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory
o Main tab > DataSource Type: ConnectionPoolDataSource
o Main tab > CPDS classname: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
o Additional tab > add property serverName = <myserver>,
o Additional tab > add property databaseName = <mydb>,
o Additional tab > add property portNumber = <port>, fx 1433
o Additional tab > add property user = <sql database user>, fx sa
o Additional tab > add property password = <password>
Then I set the initial connections to 1. On saving, I was shown an error saying:
Causedby: java.lang.ClassNotFoundException:com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory
Then I tried with SAPs Driver for MSSQL, giving the parameters as:
Driver Name: SYSTEM_DRIVER
JDBC Version: 1.x
Driver Class: com.sap.portals.jdbc.sqlserver.SQLServerDriver.class
Database URL: jdbc:sap:sqlserver://<myserver>:1433;DatabaseName=<mydb>
On saving an error was generated saying:
Causedby:java.lang.ClassNotFoundException:com.sap.portals.jdbc.sqlserver.SQLServerDriver.class
Where have I gone wrong? Pls help.
Regards
Shyam.
<b></b><b></b>
hi all,
i have solved the issue.
it was due to the changes in formats of the driverclass name&URl for accessing SQLServer2005.
Details:
in SQLServer2000:
the driverclass name format is like:
com.sqlserver.microsoft.jdbc.SQLServerDriver
but in SQLServer2005 it is:
com.microsoft.sqlserver.jdbc.SQLServerDriver
and
the URL in SQLServer2005 should be of the format:
jdbc:sqlserver://<server>:1433;DatabaseName=<db>
instead of SQLServer2000's
jdbc:microsoft:sqlserver://<server>:1433;DatabaseName=<db>.the prefix has
changed.
i selected JDBC version as 1.x.
now its working fine and i cud fetch data from the db in my Web dynpro appln.
Thanks a lot.
regards
shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
can anyone of u tell me whether the driverclass name has changed for MSSQLServer 2005. can it be a possible reason for this problem?
regards
shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shyam,
I was able to successfully define a JDBC 1.x DS for MS SQL Server, using com.sap.datadirect as driver library
To define a Db driver based on an existing library, proceed as follow:
1. open admin shell, using command
telnet <your-nw-host> <50000100*InstanceNr8>
i.e. telnet localhost 50008
2. answer the user and password challenge
3. execute command lsc to get the node id of the server node inside your cluster, called from now on <server-node-id> ( is 9430350 for my NW sneak preview install )
4 execute the follwing comands to define the db driver
jump <server-node-id>
add dbpool
define_jdbc_driver com.sap.datadirect
Now you can use the new db driver to define your MS SQL Server DS.
Good luck!
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sasha,
if I understand you correctly, you are going to access another db/schema then the default one. And in this case, afaik, you can't use the SYSTEM_DRIVER, rather you have to define your own driver. That's, what i proposed. For defining the DS you will still use the Visual Admin.
Regards
Gregor
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.