Accessing synonym tables with jdbc
accessing synonym tables with oracle jdbc driver 9i
hi
i'm having a problem selecting, updating, inserting and retrieving metadata from synonym tables.
simple example is selecting from a table that is a synonym, i receive ORA-00942 table or view does not exist.
is there any way to access synonym tables using the oracle jdbc driver?
any help would be most appreciated.
thanks
Takis
Hi Mirco,
you can create your own function module to read TOA01 table and call this function module. It is a 5 minutes job of your ABAP programmer.
To read list of BAPIs existing in your system call transaction BAPI.
Generally there is no reason to read SAP tables. Think about 15.000 - 20.000 tables of standard SAP Web AS. No one is able to give you data model. You have to use business objects and their methods.
Jiri
Similar Messages
-
Error while accessing BSAD Table with dunning date
Hi ,
I developed a report for FI module accessing BSAD table with default customer ranges and for specific dunning dates - It ran for a very long time and timed out - (I know this is due to huge volume of data) -
Is there any way to access BSAD table easily with Dunning dates (Other than creating Index on it) ???
Or any standard function module available ??
Regards
Rajesh.Hi
Try the below tables for the dunning data details:
MHND Dunning Data
MHNDO Dunning data version before the next change
MHNK Dunning data (account entries)
MHNKA Version administration of dunning changes
MHNKO Dunning data (acct entries) version before the next chang
SKS -
Performance issue when inserting into spatial indexed table with JDBC
We have a table named 'feature' which has a "sdo_geometry" column, and we created spatial index on that column,
CREATE TABLE feature ( id number, desc varchar, oshape sdo_gemotry)
CREATE INDEX feature_sp_idx ON feature(oshape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
Then we executed the following SQL to insert about 800 records into that table(We tried this by using DB visualizer and
our Java application, both of them were using JDBC driver to connect to the oracle 11gR2 database) .
insert into feature(id,desc,oshape) values (1001,xxx,xxxxx);
insert into feature (id,desc,oshape) values (1002,xxx,xxxxx);
insert into feature (id,desc,oshape) values (1800,xxx,xxxxx);
We encoutered the same problem as this topic
Performance of insert with spatial index
It takes nearly 1 secs for inserting one record,compare to 50 records inserted per sec without spatial index,
which is 50x drop in peformance when doing insertion with spatial index.
However, when we copy and paste those insertion scripts into Oracle Client(same test and same table with spatial index), we got a totally different performance result:
more than 50 records inserted in 1 secs, just as fast as the insertion without building spatial index.
Is it because Oracle Client is not using JDBC? Perhaps JDBC was got something wrong when updating those spatial indexed tables.
Edited by: 860605 on 19/09/2011 18:57
Edited by: 860605 on 19/09/2011 18:58
Edited by: 860605 on 19/09/2011 19:00Normally JDBC use auto-commit. So each insert can causes a commit.
I don't know about Oracle Client. In sqlplus, insert is just a insert,
and you execute "commit" to explicitly commit your changes.
So maybe this is the reason. -
How to find the OWNER of a table with JDBC metaData?
Hi,
i write a dynamique dataBase gui for multiple dataBase (oracle, postgre..)
I want to use JDBC meta data to configure the gui
I can't find methode to optain a specifique table list for a owner...
with getTablePrivileges I see the Grantor but not the owner (the grantor isn't always the owner)
and I can't use schema because schema isn't supported by postgre
some one can help me ?
thanks a lot
ChristopheYes of course but it is DataBase dependent...
and I want to use different DataBase...And what sort of owner would you expect in a MS Access
database?
if they are only one user we work only whith one "schema owner" the data base is structured in this way
but when multi user is possible we want to work with specifique relation beetwen different user ...
we want to use users because more dataBase suppport multiple owner than multiple schema
and generaly our information are divide in
genereral and referential information ( explain of data and list of values etc ...)
and the specifique data.
And our GUI distingue the "META DATA" and the pure "DATA" and propose specifique properties to interact with those data
i hope that my problem is better explain now .
example we use
resultSet = connection.getMetaData().getTables("","%","%",new String[]{"TABLE","VIEW"});
to optain all the table and view
resultSet = connection.getMetaData().getTablePrivileges(null,null,"tableName");
to optain privileges for a table
the trouble is that in specifique catatalog table like oracle we find a colomn whith the owner properites and when we use getTablePrivileges we can't see it idem for posgree
Each privilige description has the following columns:
TABLE_CAT String => table catalog (may be null)
TABLE_SCHEM String => table schema (may be null)
TABLE_NAME String => table name
GRANTOR => grantor of access (may be null)
GRANTEE String => grantee of access
PRIVILEGE String => name of access
IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
has you see we have GRANTOR information but not OWNER information
and the GRANTOR isn't allways the OWNER ...
Christophe -
Specifying table with jdbc-class-map-name
Greetings
How do I specify the name of the table to map to when using the jdbc-
class-map-name hint?
In my jdo file, I have specified:
<class name="Customer" objectid-class="CustomerId">
<extension vendor-name="kodo" key="jdbc-class-map-name" value="base">
<extension vendor-name="kodo" key="table" value="PERSONS"/>
</extension>
but when mappingtool generates the mapping file, the "table" hint
is ignored, and I end up with the following in the .mapping file:
<class name="Customer">
<jdbc-class-map type="base" table="FRED.CUSTOMER"/>
What I really want to see in the above jdbc-class-map is:
table="FRED.PERSONS"
I am using the property setting: kodo.jdbc.Schemas: FRED
Note that mapping fields to columns using jdbc-field-map-name
seems to work fine...
Any clues? Thanks.
droo.You can't specify table or column names via mapping tool hints. The
typical way to change the default names is either to override the
getValidTableName/getValidColumnName methods in a custom DBDictionary
for systematic changes, or to follow the process outlined in example 7.6
on this page:
http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_mapping.html#ref_guide_mapping_mappingtool_examples -
Access index table with FormCalc script langage in adobe lifecycle designer
Hi all,
I have some issue to hide a field in form adobe using FormCalc langage.
The link to the data is :
$record.DOCUMENTS.DATA[*].HEADER.EVALUATEUR_SECONDAIRE.NAME
On Each page of the Adobe form contains the data element of the line Document, it is ok :
$record.DOCUMENTS.DATA[1].HEADER.EVALUATEUR_SECONDAIRE.NAME
$record.DOCUMENTS.DATA[2].HEADER.EVALUATEUR_SECONDAIRE.NAME
$record.DOCUMENTS.DATA[3].HEADER.EVALUATEUR_SECONDAIRE.NAME
$record.DOCUMENTS.DATA[n].HEADER.EVALUATEUR_SECONDAIRE.NAME
Now, I just want to hide this data element if EVALUATEUR_SECONDAIRE.ID is initial, so i write a script at initialize event like this :
data.MAIN.Page1.Identification.Identification.ES ::initialize - (FormCalc, client) -
If ( not HasValue($record .DOCUMENTS.DATA[*].HEADER.EVALUATEUR_SECONDAIRE.ID)) then
$.presence = u201Chiddenu201D
endif
The problem is that FormCalc consider DOCUMENTS.DATA[*] as all the line of the table DOCUMENTS, I just want the current line of DOCUMENTS.
Please, do you have some solution ?
Thank's in advance.
Regards.
JohannRehello All,
After more tests, It seems that this solution doesn't work.
In fact, if $record.DOCUMENTS.DATA[1].HEADER.EVALUATEUR_SECONDAIRE.NAME is initial, the corresponding field doesn't appear on the form : correct but all fields bellow doesn't appear even if one of $record.DOCUMENTS.DATA[n].HEADER.EVALUATEUR_SECONDAIRE.NAME is NOT initial.
Inversely if $record.DOCUMENTS.DATA[1].HEADER.EVALUATEUR_SECONDAIRE.NAME is NOT initial the correponding fields appears on form, it's correct but.... all fields bellow appears even if one of $record.DOCUMENTS.DATA[n].HEADER.EVALUATEUR_SECONDAIRE.NAME is initial.
So, it's seems that the behavior of the differents elements DOCUMENTS.DATA[n].HEADER.EVALUATEUR_SECONDAIRE.NAME are the same that DOCUMENTS.DATA[1].HEADER.EVALUATEUR_SECONDAIRE.NAME.
Please do you have any solution to access to the current element ?
Thank's in advance.
Johann -
Maximum number of connections for MS Access with JDBC
Hi guys,
does anyone know about the maximum no. of connections that MS Access can have with JDBC...MS Access has not limit. It doesn't work that way.
There is certainly going to be some resource limit however, if nothing else then memory will eventually run out. -
Getting inline schema documentation with JDBC
Some databases (Oracle, IBM DB2) provides possibility to add additional documentation to database schema (using SQL commands COMMENT ON, LABEL ON). This is information is preserved together with other meta-information about tables in the database.
Is it possible to access this documentation with JDBC?
Best,
Maciej
Edited by: dzieciou on Feb 13, 2009 3:16 AMFrank
- is the JDBC jar file required on the "Server" side (RHEL 5.3) or "Client" side (Windows XP) (sorry if I'm using the wrong terminology, I'm still getting started with OWB)?
Yes. At the client JDBC driver is required to import the metadata (tables\views\etc) and at the server to execute the code generated by code templates.
- the JDBC driver requires a .dll (Win) / .so (Linux); is this possible with OWB? Or does OWB accept only "pure" JDBC drivers?
Not sure about this one - the .dll and .so are OS files , i think the JDBC driver should figure it out if they are configured correctly on the OS
- is there any possibility to debug the JDBC access (some kind of log file, perhaps)?
There are two ways you can debug
1) Logging at the OWB level (client side) -
The following blog to demonstrates how to do it
http://blogs.oracle.com/warehousebuilder/2009/11/how_to_turn_on_logging_for_owb_112_design_client.html
2) JDBC Driver logging -
Few JDBC drivers provides logging , you can specify the log file as part of your JDBC URL. Check the documentation of your JDBC driver (PI JDBC driver) whether it provides you that feature.
Regards,
Suraj. -
Access to tables created in HTML DB
How would I access tables created in the HTML DB, outside the HTML DB environment, for example with SQL*PLUS?
Doris,
The tables you create in HTML DB are regular Oracle database tables. All you need to know is what schema you created them in (the schema that is associated with your workspace, most likely) and you can access the tables with SQL*PLUS or any other tool.
Sergio -
JDBC BUG WITH SYNONYM TABLES AND DB-LINK
I have created a database link within my schema.
Then i have created a synonym for a table in the linked database.
When using metadata.getColumns() for the synonym table there
are no columns returned.
When using metadata.getTables() the synonym table is included in
the list.
Driver: Oracle 8.1.5 Thin
Is this a kown bug.
Any workarounds available.
nullHi togehter,
soory for my delayed answer. I was ill.
I created my scenario but it doesn#t work.
This is my input:
<?xml version="1.0" encoding="utf-8" ?>
<ns:SAKRJOIN.resultSet xmlns:ns="urn:sap.com:jdbcAdapter">
<row>
<MANDT>100</MANDT>
<LIFNR>146128</LIFNR>
<BUKRS>41</BUKRS>
<row>
<MANDT>100</MANDT>
<LIFNR>146128</LIFNR>
<BUKRS>42</BUKRS>
</row>
<row>
<MANDT>100</MANDT>
<LIFNR>146129</LIFNR>
<BUKRS>42</BUKRS>
</row>
</ns:SAKRJOIN.resultSet>
This is my target:
IDOC Element CREMAS.CREMAS05 1..unbounded
BEGIN Attribut xsd:string required
EDI_DC40 Element EDI_DC40.CREMAS.CREMAS05 1
E1LFA1M Element CREMAS05.E1LFA1M 1
SEGMENT Attribut xsd:string required
MSGFN Element xsd:string 0..1 maxLength="3"
LIFNR Element xsd:string 0..1 maxLength="10"
ANRED Element xsd:string 0..1 maxLength="15"
If I mapped the field row to the target field IDOC I create three IDOCs, but I want only one IDOC per <LIFNR>. In this example I want to see two IDOCs. One for 146128 and one for 146129.
If I mapped <LIFNR> -> split by value (valuechanged) in field IDOC I get only one IDOC.
Whats wrong ?
I tried
lifnr>sort>splitbyvalue(valuechange)->collapse context->IDOC
Now I get three once again.
Kind regards
Wolfgang -
How to create a ms-access table with java?
hi all
i've my application and i want to add the capability to creat an access file (.mdb) and then, via SQL , create a table, with many columns of many types, and with a primary key too.
i know that it's also an SQL problem, but i'm searching for it everywhere
thanx for your reply
sandroHi,
It would have been much better if you had specified your development environment- the database driver class depends on which environment you are working with. Forexample, if you are working with vj++6 you can make use of the com.ms.jdbc.odbc.JdbcOdbcDriver class. If you are using IBM's Visual Age for Java3.5 you can find the sun.jdbc.odbc.JdbcOdbcDriver. Oneway or another you should have the .class for jdbc-odbc(usu they have the form: xxx:jdbc:odbc:JdbcOdbcDriver). Check all the packages that are available in your development environment that have the form xxx.jdbc.odbc.JdbcOdbcDriver.(And not clear what you know and what you don't - so I start from the very elementary steps)
Anyways, What you have to know is that it is not possible to create databases (e.g. .mdb) directly from a Java application(as far as I know). What is possible is to create new tables inside an already created database and process queries based on those tables.In short what I am saying is : you need to have a DSN before writing applications that create tables.
Follow the following steps to create DSN(for win2000):
1)Go to the control panel and click the 'administrative tools'
2)In the 'administrative tools' click to open ODBC(data sources)
3)Click the 'add' button and choose 'Microsoft Access driver'
4)In the DSN text field enter the dsn (e.g., Test)
5)If you want to create a table in an already existing database choose select and select one. However, if you want to create a new database click 'create' and enter a name for your database(e.g. ExampleDB.mdb). If you do this successfully it will issue a successfull operation message.
6)Click advanced and enter the login name(e.g. Albert) and password(e.g. mxvdk) for the database
7)Click 'ok's to finish the operation.
After the above three operations what you will have is an empty database(with no tables) named "ExampleDB.mdb" in the directory you specified.
Now, you can write a java application that creates a table inside the database "ExampleDB.mdb".
Check this out:
import java.sql.*;
public class Class1{
public Class1(){
String userName = "Albert";
String password = "mxvdk";
String dsn = "Test";
String databaseURL = "jdbc:odbc:"+dsn;
//This is just an sql table creating statement- have nothing to do with java
String sqlCreateStmt = "CREATE TABLE StudentTable" +
"(StudentID varchar(32) PRIMARY KEY," +
"name varchar(30)," +
"age int)";
try{
Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException eCNF){
System.err.println("ClassNotFoundException:");
System.err.println(eCNF.getMessage());
try{
con = DriverManager.getConnection(databaseURL,userName,password);
stmt = con.createStatement();
stmt.executeUpdate(sqlCreateStmt);
}catch(SQLException e){
System.err.println("SQLException:");
e.printStackTrace();
//insert one sample data
insertSampleData();
private void insertSampleData(){
String sampleStudentID = "scr-342-tch";
String sampleStudentName = "Tom James";
int sampleStudentAge = 24;
//This is just an sql table updating statement- have nothing to do with java
String sqlUpdateStmt = "INSERT INTO StudentTable VALUES ('"+
sampleStudentID+"','"+
sampleStudentName+"',"+
sampleStudentAge+")";
try{
stmt.executeUpdate(sqlUpdateStmt);
}catch(SQLException e){
System.err.println("SQLException:");
e.printStackTrace();
public static void main(String[] args){
new Class1();
private Connection con;
private Statement stmt;
//This program runs perfectly in my VJ++6.0 (console application mode) and also in my IBM's
//visual Age for Java3.5 (with sun.jdbc.odbc.JdbcOdbcDriver as my database driver)
//If you are developing in another development environment, what you need to change is the
//"com.ms.jdbc.odbc.JdbcOdbcDriver" in Class.forName("com...") stmt.
//If you run this program more than once, it will issue 'tableAlreadyExists' message
If you still experience the problem, pls be specific and repost! -
Issue with Access a table of another schema
Hii,
Actully there is a table abc in one schema A and i am able to access that table from Schema B as A.abc but i want to access the table abc without using A.abc...could you please tell me the any solution..
Thanksuser644122 wrote:
I tried this but it is showing you can create a object with this name as it is already exist..I assume that you wanted to say that you can't create the object with the mentioned name as its used by another object. So now there are two things,
1) Find that object which has the same name that you want to use with the synonym. See if you have the option to rename that object or drop and recreate it with a different name.
2) Choose another name for your synonym.
HTH
Aman.... -
Hi Everyone,
I am trying to write an application which requires connection to an old MS Access database. Unfortunately some of the tables have spaces in the names. I can query all tables except those with spaces in the table names. I searched for how to quote tables with spaces in the FROM clause on the net and have tried the following:
// Angled quotes
String sql = "Select * From `Function Groups`";
// double quotation marks
String sql = "Select * From \"Function Groups\"";
// single quotation marks
String sql = "Select * from 'Function Groups'"
// square brackets
String sql = "Select * from [Function Groups]"
I have set setEscapeProcessing to be both TRUE and FALSE in various trials as follows:
stat.setEscapeProcessing(true);
All of the above throws an exception from the Access Driver stating I have an error in the From Clause (Yes, there is a table called Function[space]Groups in the database). I am using the free MS Access driver which comes with Vista to connect to the read-only database via JDBC.
I cannot just exchange spaces for underscores for other reasons.
Does anyone know the special character used by the Access Driver to parse tables with spaces? Square brackets works with field names but not tables names :(
All help appreciated,
TomDoh! missed out a keyword not a quoting problem at all - for interest angled quotes (`) work around the spaces in the table names.
-
How to create a table with just its structure in Access 2013?
I have a front-end and back-end Access 2013 database. I want to send it to an MS Access development company. I cannot send it with any data because it has our members social security numbers and other personal identification data. In MS Access 2003
I could save a table with just its structure.
How do I save a table with just its structure? I want to learn how to do this.
Thanks for the help.
RobertOn the Create tab of the ribbon, click Table Design.
This opens the table design window, in which you can define fields and indexes without entering any data. Don't forget to save the design when you're done.
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
dear all,
i have done a system copy from production server into quality server. quality was scrapped and freshly installed with SAP then used the DB flush method to carry out the system copy. i had to change the DBS_ORA_SCHEMA in environment variables to SAP<SOURCE SID> from SAPSR3. the sap version is ECC6.0,DB is ORACLE10.2 on WIN NT.
after MMC opened, i get "SQL error in the database when accessing a table" error is coming. in SM21, I am getting "Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000 )
Database error 8103 at SEL access to table TBTCO
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
Database error 8103 at FET access to table TBTCP
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130339 sibqty_Q TY_00 " generated
Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
> Short dump "081018 130339 sibqty_Q TY_00 " generated
Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
Delete session 001 after error 023
Database error 8103 at DEL access to table TMSALOGAR
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130432 sibqty_Q TY_00 " generated
Database error 8103 at FET access to table SNAP
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130432 sibqty_Q TY_00 " generated
Transaction Canceled SY 002 ( SQL error in the database when accessing a table. )
Database error 8103 at FET access to table TSP02"
please find the st22 DUMP:
ow to correct the error |
Database error text........: "ORA-08103: object no longer exists"
Internal call code.........: "[RSQL/READ/TBTCO ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"SAPMSSY2" or "SAPMSSY2"
"INITIATE_JOB_START"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"INITIATE_JOB_START" "(FORM)", or its possible occurrence must be declared in
the
RAISING clause of the procedure.
|
please do me this favor if you know to avoid this problem..
thanks a lot..Hello Anuj,
This is because the COUNT(*) is returning a value which is longer than the INT4 data type it is expecting. If you restrict the selection by introducing a WHERE clause, then you won't get the dump:
DATA: dyn_from TYPE string,
dyn_where TYPE string,
gx_sql_err TYPE REF TO cx_sy_open_sql_error,
gv_text TYPE string.
dyn_from = `DD01L INNER JOIN DD02L ON DD02L~AS4LOCAL = DD01L~AS4LOCAL AND DD02L~AS4VERS = DD01L~AS4VERS`.
dyn_where = `DOMNAME LIKE 'Z%'`.
TRY .
SELECT COUNT(*) FROM (dyn_from) WHERE (dyn_where).
WRITE: / sy-dbcnt NO-GROUPING.
CATCH: cx_sy_open_sql_db INTO gx_sql_err,
cx_sy_dynamic_osql_semantics INTO gx_sql_err,
cx_sy_dynamic_osql_syntax INTO gx_sql_err.
ENDTRY.
IF gx_sql_err IS BOUND.
gv_text = gx_sql_err->get_text( ).
WRITE: / gv_text.
ENDIF.
BR,
Suhas
Maybe you are looking for
-
Hello Expert, My SAP System environment as follow SAP Product : SAP NetWeaver 04 Operating System : Windows 2003 32 bit SAP Database : MS SQL 2005 32 bit I have installed SAP NetWeaver 04 system with system copy option. I have installed Application s
-
I recently replaced my Macbook Pro's hard drive with a solid state drive. Things have been fine until recently I tried turning on find my mac in the iCloud settings and was told I could not because I have sett the solid state drive as a RAID. Is ther
-
I am installing SAP Business ONE 2005 client on a machine.Engineering softwares are already installed on this machine i.e 1.UG NX 4.0 2.UG NX 6.0 3.AUTOCAD 2006 While installing SAP it gives error as, 1608:Unable to create InstallDriver instance.Retu
-
I'm trying out CS4 but it's crashing on the open
I just downloaded the CS4 free trial, but as soon as I open an image, I get an error and the program closes. I called tech support, and they sent me here. The exact message says (as soon as Photoshop opens "Photoshop has encountered a problem with th
-
I've lost my audio in the project, after exporting
I exported my project, and then wanted to modify the project still further- which I did. Only to find that all of my own audio has disappeared- that is, the green tabs are still there in the timelines, but they don't play anymore. Only the Apple jing