cancel
Showing results for 
Search instead for 
Did you mean: 

Cant save in SQL SERVER.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi all.

i have a BMP that save data in a SQL Server Table from a XML document.

the BMP finish perfect but when i check in SQL there no any data.

I am using the next estructure:

<?xml version="1.0" encoding="UTF-8"?>

<sp_jdbc_MT>

<dbTableName action="INSERT">

<table>TEST</table>

<access>

<SALUDO>HI</SALUDO>

<NOMBRE>JAMES</NOMBRE>

</access>

</dbTableName>

</sp_jdbc_MT>

my JDBC Comunication channel has the next configuration:

JDBC DRIVER: com.microsoft.jdbc.sqlserver.SQLServerDriver

CONNECTION:jdbc:microsoft:sqlserver://srv-cap01-adm:1433;DatabaseName=TEST

any idea??

Thanks & Regards

Rodrigo

Accepted Solutions (0)

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Also,

Check by executing the following query from your DB client and see if data insertion is succesful,

insert into TEST(SALUDO,NOMBRE) values('HI','JAMES');

Also, make sure that the ISOLATION LEVEL FOR TRANSACTION HANDLING is SERIABLIZABLE in the JDBC adapter.

Regards,

bhavesh

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

- 2006-10-12 11:00:40 ART: Error: Accessing database connection 'jdbc:microsoft:sqlserver://SRV-CAP01-ADM:1433;DatabaseName=TEST' failed: DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://SRV-CAP01-ADM:1433;DatabaseName=TEST': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

this is the error that JDBC adapter return.

Thank & Regards

Rodrigo

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Looks like the SQL server drivers are not installed. Contact your BASIS team and find out if the installation has been done as shown in this document,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-964...

Regards,

Bhavesh

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi Bhavesh.

as you said, i dont have intalled JDBC driver.

when i execute drivertool create, win return

there does not seem to be a JRE installed. Please set de JAVA_HOME enviroment variable to the base directory of a JRE version 1.4 or higher.

could you said step by step what should i do.

Tahnks & regads

Rodrigo

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Whethere able to resolve the issue,

Regards

Agasthuri Doss

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi again.

thanks all for your quick anwers and your help.

i have just installed JDBC driver.

now, when im traying to post a XML SQL Format, in Adapter monitoring (RWB) for JDBC adapter i see the next error:

- 2006-10-17 11:58:04 ART: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TEST' (structure 'InsertStmnt'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]SELECT permission denied on object 'TEST', database 'TEST', owner 'dbo'.

- 2006-10-17 11:58:04 ART: Processing started

XML SQL format:

<?xml version="1.0" encoding="UTF-8" ?>

- <sp_jdbc_MT>

- <InsertStmnt>

- <dbTableName action="INSERT">

<table>TEST</table>

- <access>

<SALUDO>Hola</SALUDO>

<NOMBRE>Perez</NOMBRE>

</access>

</dbTableName>

</InsertStmnt>

</sp_jdbc_MT>

what should i do?

Regards.

RP

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The error is clear. The user id and password entered in the JDBC driver does not have the authorization to insert the data into the table.

Regards,

Bhavesh

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi Bhavesh.

The permissions where bad

thanks Bhavesh

Regards

RP

Message was edited by: Rodrigo Pertierra

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

In that case , make changes to the transaction level of the JDBC adapter and see if it works.

The ISOLATION LEVEL FOR TRANSACTION HANDLING -- make it to Serrializable, or repeatable_read and see if it works.

Regards,

Bhavesh

moorthy
Active Contributor
0 Kudos

Hi,

Go to RWB->Message Monitoring->Message Display tool and Audit log for error analysis

Also check RWB->Adapter Monitoring->JDBC communication channel for errors..

I think the error is in the document format,which goes into database i.e which calls JDBC adapter.

This format should be like this-

http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

what is your table name ? Is it TEST ?

if so structure should be

<?xml version="1.0" encoding="UTF-8"?>

<sp_jdbc_MT>

<<b>TEST</b> action="INSERT">

<table>TEST</table>

<access>

<SALUDO>HI</SALUDO>

<NOMBRE>JAMES</NOMBRE>

</access>

</dbTableName>

</sp_jdbc_MT>

Hope this helps,

Regards,

Moorthy

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi Moorthy.

there is no error in RWB, and document format is right.

i think the problem could be in receiver comunication channel.

i really dont know.

i compared it with another interface example but nothing wrong. :):):)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Have you already deployed the drivers (msbase.jar, mssqlserver.jar, msutil.jar). If yes,

Driver:

com.microsoft.jdbc.sqlserver.SQLServerDriver

Connection for MS SQL Server:

jdbc:microsoft:sqlserver://<server>:1433;databaseName=<dbname>

If you are using the new SQL Server 2005 jdbc driver (sqljdbc.jar). Setup is basically the same, except the driver is now:

com.microsoft.sqlserver.jdbc.SQLServerDriver

And the URL is slightly different as well:

jdbc:sqlserver://host:1433;DatabaseName=name

Regards,

Bhavesh