cancel
Showing results for 
Search instead for 
Did you mean: 

Error in creating MSSQL 2005 server Datasource in visual admin

Former Member
0 Kudos

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 SAP’s 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>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Shyam,

If I have multiple SQL instances running on the same db server, how do you specify the SQL instance name?

Thank you,

Former Member
0 Kudos

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.

former_member184385
Active Participant
0 Kudos

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

Former Member
0 Kudos

Hi Gregor

Why do we have to go this way? cant we directly specify the driver class name in the visual admin for creating a driver. whats the advantage in going the other way?

regards

sasha.

former_member184385
Active Participant
0 Kudos

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