cancel
Showing results for 
Search instead for 
Did you mean: 

How can we configure the width of the table in SAP DB

Former Member
0 Kudos

Hello sirs,

How can we configure the width of the table in SAP DB? (<b>i.e to specify the total width of the sum of all columns</b>). I need to change the default value of table width for adding fields with biggger sizes...

With best regards,

Sudheesh....

Accepted Solutions (0)

Answers (3)

Answers (3)

Rudi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sudheesh,

see reply to your posting .

Best regards,

Rudi

Rudi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sudheesh,

jdbc is a part of the J2EE spec.

I.e. with a corresponding jdbc driver at hand an application that uses a certain DB (e.h. mySQL) can run on any J2EE compliant server. This holds true for SAP Web AS as well. You need to deploy the jdbc driver archives to the server and use it for your datasource. Check out help.sap.com on how to do this on SAP Web AS.

The SAP Web AS itself has its own system database that can be from different (but not all kinds of) vendors and requires drivers supported by SAP. To use this system database is optional for applications.

Best regards,

Rudi

Former Member
0 Kudos

Dear sir,

As you said, I have registered the JDBC driver for MySQL DB to SAP WAS using Visual Administration Console. I have created the Datasource also with the registered driver and deployed. But when i connect to the DB, I am getting SQL Exception as given below,

<b>"com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.sap.sql.log.OpenSQLException: Porting factory for MYSQL database not defined."</b>

The driver details in Datasource configuration file is defined as follows,

<b><jdbc-1.x>

<driver-class-name>com.mysql.jdbc.Driver</driver-class-name>

<url>jdbc:mysql://localhost:3306/TestDB</url>

<user-name>test</user-name>

<password>**********</password>

</jdbc-1.x></b>

I am using the JDBC Driver found in <b>"mysql-connector-java-3.1.8-bin.jar"(Which is downloaded from MySQL site)</b>

Could you please share your knowledge in this regard? If I am using the wrong JAR, Then which is the suitable jar and where can i found it?

Kindly help,

Sudheesh...

Former Member
0 Kudos

Hi,

The restrictions for using SAPDB are available at the following link http://dev.mysql.com/doc/maxdb/en/f6/069940ccd42a54e10000000a1550b0/content.htm

The 'internal length of the table' is 8088 bytes, which intern maps to the column width attribute.

Can we change the column width?

The answer is 'NO'.

check the general Column width error (-1115) at link below where it is specified that the column width can be altered http://dev.mysql.com/doc/maxdb/en/bb/57f18204fd11d2a96c00a0c9449261/content.htm

Refer link below for more details on the width of each column (based on the datatype associated with the column). http://orgs.man.ac.uk/documentation/mysql/manual_Column_types.html

So we will have to judiciously look into the boundary values for each column and set the right length because if the column is char(200) and it holds a null value then length allocated is 200 bytes.

The restriction cannot be broken.

Regards,

S.Divakar

Former Member
0 Kudos

Sir,

If we can only construct a table with row width below 8088 bytes, the how can we store data of type blob or varchar(1000)(with large no. of fields in the table)...

Regards,

Sudheesh...

Former Member
0 Kudos

Hi,

Sorry for the delayed reply.

ideally in such scenarios we have to try to normalise the table and try to build parent child relationships.. infact such a table will also improve the performance of the functionality.

Regards,

S.Divakar

Former Member
0 Kudos

Hello Divakar,

But i am migrating an existing j2ee application. so it will be very risky if i partition an existing table in to two since i may affect other part of the application. So normalising the table again would be a problem

Regards,

Sudheesh

Former Member
0 Kudos

Hi,

If you are migrating the application then i suugest you can use the existing database and create a DataSource that will point to the database, by this you can minimize Migration effort as well.

let me know your concerns.

Regards,

S.Divakar

Former Member
0 Kudos

But sir,

Currently we are using MySQL 4.0.2 as the back end DB. And from the best of my knowledge, SAP Netweaver will not support MySQL... right?

This lead me to select SAP DB(MAX DB) as Migratins Apps DB. But in this DB i found the problem stated above...

Regards,

Sudheesh...