Find the type of all tables in Java, can i do that
Hello all
In my postgres database, I have many tables (>100 tables). I want to check all these tables to see if the first field of these tables are correct type and default value. E.g. I want to check the first field is type "int4" and default value is something like
item_id int4 NULL DEFAULT nextval(item_id_seq'::regclass),
Suppose that I have a list of all tables in this database. I am trying to create a Java program to go through all those tables, get the first fields of these table and check its type and its default value
Can I do it in Java or I can only do it manually ?
Thank you very much for any help
shuhu
You may find Connection#getMetaData() useful.
Here is it's API documentation: http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#getMetaData()
Similar Messages
-
How to find the list of all tables populated
How to find the list of tables populated in the implentation of a particular company. DD02L contains all the tables SAP having. But i want only which are configured for a particular company.
Also how to find the list of reports used by all users in a particular company. TSTC contains all transactions. But i require only reports used by a particular company.Hi Mohamed
You use Solution Manager to do the comparison for you. There are some nice features that will highlight all your customised coding. Have a look at the SolMan resources on the Support Portal e.g. using SolMan for upgrade comparisons.
Rgards
Carl. -
First I want to tell you: I'm a amateur concerning Java Programming.
My task is to write a java program - using JCO -, which retrieves the names of all tables (a user can access).
Can anybody help me, please?Hi Michael,
i can't help you because i don't know anything about JCO!
It's simply funny and i'm happy to see a "known face" here!
Perhaps this will help you:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/tips and tricks for sap java connector client programming.pdf
And don't be so decent...you're not so bad in Java at all
Greetings
Florian -
Java.io.IOException: unable to find the type mapping resource file
Hi,
I am using weblogic7.0 to deploy my applications. I wrote a web service and
was able to deploy it sucessfully. I am trying to access the web service through
a jsp page. I am the error posted below on my server and " error:505 internal
server error" on the browser. Can any one please help me out with the problem.
My jsp page just displays the float value i am returing from the session bean
method.
Thanks,
Ramya.
<Apr 14, 2003 4:32:51 PM PDT> <Error> <HTTP> <101019> <[ServletContext(id=64204
55,name=bankwebapp,context-path=/bankwebapp)] Servlet failed with IOException
java.io.IOException: unable to find the type mapping resource file for:bank.Ban
kService
at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegi
stry.java:62)
at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
at bank.BankService_Impl.<init>(BankService_Impl.java:23)
at jsp_servlet.__getbal._jspService(__getbal.java:106)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.ru
n(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:445)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActi
on.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServi
ceManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppS
ervletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestI
mpl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
<Apr 14, 2003 4:40:59 PM PDT> <Notice> <Application Poller> <149400> <Activatin
g application: appsdirbankwebapp_war>
<Apr 14, 2003 4:40:59 PM PDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbankwebapp_war on myserver - Running>
<Apr 14, 2003 4:41:01 PM PDT> <Notice> <Application Poller> <149404> <Activate
application appsdirbankwebapp_war on myserver - Completed>
The url value from the jsp page ishttp://localhost:7001
The wsdl value from the jsp page ishttp://localhost:7001/web_services/BankServi
ce
<Apr 14, 2003 4:41:06 PM PDT> <Error> <HTTP> <101019> <[ServletContext(id=72463
20,name=bankwebapp,context-path=/bankwebapp)] Servlet failed with IOException
java.io.IOException: unable to find the type mapping resource file for:bank.Ban
kService
at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegi
stry.java:62)
at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
at bank.BankService_Impl.<init>(BankService_Impl.java:23)
at jsp_servlet.__getbal._jspService(__getbal.java:106)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.ru
n(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:445)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActi
on.run(WebAppServletContext.java:5412)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServi
ceManager.java:744)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppS
ervletContext.java:3086)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestI
mpl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>Hi Manoj,
Thanks a lot for your hepl. I tried as you said and its working now.
Ramya
"manoj cheenath" <[email protected]> wrote:
Make sure that you put the client jar file generated by
clientgen in the lib directory of the jsp web app.
It looks like the runtime is unable to load
<service>.xml type mapping file. This xml file
should be in the classpath (web-inf/lib or
web-inf/classes).
-manoj
"Ramya" <[email protected]> wrote in message
news:[email protected]...
Hi,
I am using weblogic7.0 to deploy my applications. I wrote a web serviceand
was able to deploy it sucessfully. I am trying to access the web servicethrough
a jsp page. I am the error posted below on my server and " error:505internal
server error" on the browser. Can any one please help me out with theproblem.
My jsp page just displays the float value i am returing from the sessionbean
method.
Thanks,
Ramya.
<Apr 14, 2003 4:32:51 PM PDT> <Error> <HTTP> <101019><[ServletContext(id=64204
55,name=bankwebapp,context-path=/bankwebapp)] Servlet failed withIOException
java.io.IOException: unable to find the type mapping resource filefor:bank.Ban
kService
atweblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegi
stry.java:62)
atweblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
at bank.BankService_Impl.<init>(BankService_Impl.java:23)
at jsp_servlet.__getbal._jspService(__getbal.java:106)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.ru
n(ServletStubImpl.java:1058)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:401)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:445)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:306)
atweblogic.servlet.internal.WebAppServletContext$ServletInvocationActi
on.run(WebAppServletContext.java:5412)
atweblogic.security.service.SecurityServiceManager.runAs(SecurityServi
ceManager.java:744)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppS
ervletContext.java:3086)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestI
mpl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
<Apr 14, 2003 4:40:59 PM PDT> <Notice> <Application Poller> <149400><Activatin
g application: appsdirbankwebapp_war>
<Apr 14, 2003 4:40:59 PM PDT> <Notice> <Application Poller> <149404><Activate
application appsdirbankwebapp_war on myserver - Running>
<Apr 14, 2003 4:41:01 PM PDT> <Notice> <Application Poller> <149404><Activate
application appsdirbankwebapp_war on myserver - Completed>
The url value from the jsp page ishttp://localhost:7001
The wsdl value from the jsp page
ishttp://localhost:7001/web_services/BankServi
ce
<Apr 14, 2003 4:41:06 PM PDT> <Error> <HTTP> <101019><[ServletContext(id=72463
20,name=bankwebapp,context-path=/bankwebapp)] Servlet failed withIOException
java.io.IOException: unable to find the type mapping resource filefor:bank.Ban
kService
atweblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegi
stry.java:62)
atweblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
at bank.BankService_Impl.<init>(BankService_Impl.java:23)
at jsp_servlet.__getbal._jspService(__getbal.java:106)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.ru
n(ServletStubImpl.java:1058)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:401)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:445)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubI
mpl.java:306)
atweblogic.servlet.internal.WebAppServletContext$ServletInvocationActi
on.run(WebAppServletContext.java:5412)
atweblogic.security.service.SecurityServiceManager.runAs(SecurityServi
ceManager.java:744)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppS
ervletContext.java:3086)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestI
mpl.java:2544)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
> -
To Find the type of field in the internal table.
I have internal table i_tab.
TYPES : BEGIN OF t_makt,
matnr TYPE matnr,
maktx TYPE maktx,
qty type mseg-menge,
show type char01,
END OF t_makt.
DATA : i_tab TYPE t_makt OCCURS 0 WITH HEADER LINE.
I want to know the type of the field of the i_tab at some stage in the program.
is there any piece of code or FM available to find the TYPE of the field of the internal table.Check out the following code
TYPES:
BEGIN OF my_struct,
comp_a type i,
comp_b type f,
END OF my_struct.
DATA:
my_data TYPE my_struct,
descr_ref TYPE ref to cl_abap_structdescr.
FIELD-SYMBOLS:
<comp_wa> TYPE abap_compdescr.
START-OF-SELECTION.
descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).
WRITE: / 'Typename :', descr_ref->absolute_name.
WRITE: / 'Kind :', descr_ref->type_kind.
WRITE: / 'Length :', descr_ref->length.
WRITE: / 'Decimals :', descr_ref->decimals.
WRITE: / 'Struct Kind :', descr_ref->struct_kind.
WRITE: / 'Components'.
WRITE: / 'Name Kind Length Decimals'.
LOOP AT descr_ref->components ASSIGNING <comp_wa>.
WRITE: / <comp_wa>-name, <comp_wa>-type_kind,
<comp_wa>-length, <comp_wa>-decimals.
ENDLOOP. -
How to find the list of existing tables in a schema using DB link?
Hi
I know how to find the list of existing tables in a schema using the following query
SQL> select * from tab;
but, how to list the tables using a DB link?
For Example
SQL> select * from tab@dblink_name;
why this doesn't work?
Pl advice me
Thanks
Reddy.ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link? -
Need to find the Difference between two table
Hello ,
I have stucked in program as below scenario:-
I have two tables of huge data of same structure in a same schema.I need to find the difference exact values in tables.
By using MINUS we can find the difference between two table ,i need to find the what exact difference in the there values with colunm and value at that column.
Example TableA
Col1 col2 col3 col4 col5.... col50
10 ABC 2001 EE 444 TT
40 XYZ 3002 RR 445 TT3
80 DEF 6005 YY 446 YY8
TableB
Col1 col2 col3 col4 col5.... col50
10 ABC 2001 EE 444 TT
40 XYZ 3002 RR 445 TT3
81 DEF 6005 Yu 447 YY8
I need to the out put like this :-
The Diffence between two table is
TableA.COL1=80 TableB.Col1=81, Different
TableA.Col4=YY TableB.col4=Yu,Different
TableA.Col5=446TableB.col5=447,Different
Please suggest me to write the pl/sql program for the same
thanx in advance
KKThanx friends for all your efforts
I have a sample code for the same,this will compare the two tables for single row in each table .
what r the modification needed for the multiple rows of values in the two tables??
Please suggest!!
CREATE OR REPLACE PROCEDURE test_compare
IS
TYPE t_col
IS
TABLE OF VARCHAR2 (30)
INDEX BY PLS_INTEGER;
l_col t_col;
j NUMBER := 0;
l_sql VARCHAR2 (2000);
col1 VARCHAR2 (30);
col2 VARCHAR2 (30);
val1 NUMBER;
val2 NUMBER;
status VARCHAR2 (30);
CURSOR c1
IS
SELECT column_id, column_name
FROM all_tab_columns
WHERE table_name = 'TEST1';
BEGIN
FOR i IN c1
LOOP
j := j + 1;
l_col (j) := i.column_name;
END LOOP;
FOR k IN 1 .. j
LOOP
l_sql :=
'SELECT '
|| ''''
|| l_col (k)
|| ''''
|| ', '
|| 'TEST2.'
|| l_col (k)
|| ', '
|| ''''
|| l_col (k)
|| ''''
|| ', '
|| 'TEST1.'
|| l_col (k )
|| ', '
|| 'DECODE(TEST2.'
|| l_col (k)
|| ' -TEST1.'
|| l_col (k)
|| ', 0, ''NO CHANGE'', ''CHANGED'') FROM TEST2, TEST1';
EXECUTE IMMEDIATE l_sql INTO col1, val1,col2, val2, status;
IF status = 'CHANGED'
THEN
DBMS_OUTPUT.put_line( 'TEST2.'
|| col1
|| '='
|| val1
|| ', TEST1.'
|| col2
|| '='
|| val2
|| ', '
|| status);
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error:- ' || SQLERRM);
END;
/ -
Ram? how do i find the type that my macbook pro has?
ram? how do i find the type that my macbook pro has?
and whats the best brand to use?
thanks
also what kind of express cards addons are available for the macbooks?
thanks againA_MaStA wrote:
You simply take out and look on the ram chip(s), the manufacturer's name should be all over the chip(s).
Not very helpful. Micron / Crucial makes maybe 2000 RAM types. If all you have is the RAM and the label you may be thin on luck.
Reading the manual +*that came with the mac*+ is one resource, regrettably rarely used before posting here. -
Unable to Find the Type Mapping Resource File (Two web services)
Hello,
I am using BEA weblogic 7.0 to deploy my applications. I have a web service and was able to deploy it sucessfully. I am trying to access this web service from another web service previously succesfully deployed too. When I call the second one, I have the next problem:
java.io.IOException: unable to find the type mapping resource file for:tuoprec.sinsesion.TuOPRecService
at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegistry.java:62)
at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
at tuoprec.sinsesion.TuOPRecService_Impl.<init>(TuOPRecService_Impl.java
I put the client jar file (2nd web service) obtained from the <clientgen> in the class path of the ear file (1st web service), but I have the same error.
Can anybody help me?,
jose luisHello,
I am using BEA weblogic 7.0 to deploy my applications. I have a web service and was able to deploy it sucessfully. I am trying to access this web service from another web service previously succesfully deployed too. When I call the second one, I have the next problem:
java.io.IOException: unable to find the type mapping resource file for:tuoprec.sinsesion.TuOPRecService
at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegistry.java:62)
at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
at tuoprec.sinsesion.TuOPRecService_Impl.<init>(TuOPRecService_Impl.java
I put the client jar file (2nd web service) obtained from the <clientgen> in the class path of the ear file (1st web service), but I have the same error.
Can anybody help me?,
jose luis -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to find the size of a Table
Dear all,
How can i find the size of a table in a schema and size of the schema also.
Thanks
MahiTry out with the help of this package, which will give out the total bytes, unused bytes, calculate the free bytes from total byes-unused bytes.
dbms_space.unused_space(
upper(oname),upper(tbname),upper('TABLE'),
total_blocks, total_bytes,
unused_blocks, unused_bytes,
last_used_extent_file_id ,
last_used_extent_block_id,
last_used_block
); -
How to find the deleted data in tables
guys,
how to find the deleted data in tables example: i want to see whether anyone deleted data in MB5B report tables like mbew, etc.,
regards,Hi,
MBEWH is actually the history table of MBEW. It will record all the changes. As I have told you earlier if you have deleted the record dirctly from the table then it will not come even in the table MBEWH
That means no changes have been made.
regards -
Find the names of all open forms from inside a PJC
Hi,
is it possible to find the names of all open forms from inside a PJC (pluggable java bean)?
I have tried the window bean but it retrieves currently open windows and reads the title of each window, but what i need is to find the form name not the window title.
oracle forms version: 10g
Thank you
Edited by: user542352 on Jun 26, 2009 1:07 AMYou don't need to know names of all open forms to close them.
Try to do someting like this :
When you need to close all forms, set some global variable flag and call exit_form
in WHEN-WINDOW-ACTIVATED of each form check your global flag and if set, also exit_form. -
Finding the type of the BrokeredMessage body (Windows Azure Service Bus)
Hi all
I was wondering if it is possible to find the type stored in the BrokeredMessage body (payload)? I need the body type prior to calling BrokeredMessage.GetBody<T>().
Kind regards
OSInstead of using a custom property, another alternate is to use the BrokeredMessage.ContentType property.
According to the documentation, this is recommended way to indicate the type of the content of the message body.
http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.brokeredmessage.contenttype.aspx -
How to find the list of all user exits modified by the users
How to find the list of all user exits using by in R3
Hi Mohamed
You use Solution Manager to do the comparison for you. There are some nice features that will highlight all your customised coding. Have a look at the SolMan resources on the Support Portal e.g. using SolMan for upgrade comparisons.
Rgards
Carl.
Maybe you are looking for
-
I downloaded InDesign CS6 through Creative Cloud and am having lots of font problems. If I use any font other than an Adobe font or an Open Type font, I am unable to create an error-free pdf from the InDesign file. I can use True Type or Type 1 fonts
-
What is the logic for the behavior of LV9 when opening vi references?
I recently started using LV 9 and I can't figure out what the rationale is for the LV 9 behavior when opening references to vis. The way I understand it, LV9 looks up vis using the absolute path on the disk where they came from when opening reference
-
I can't add multiple photos to a shared photo stream in iPhoto.
Hi All, I need troubleshooting assistance! How do you add multiple photos at a time into a shared photo stream? I've selected multiple photos but when I add them, they don't appear in the stream. However if I add them individually they do appear. I'
-
This is happened today after I udpated my iPad to IOS v7 and iTunes to 11.1.0.126 and only for one of my computers. I keep on getting an error message when trying to log onto iCloud. The error message is "you cannot sign-in because of a server err
-
Missing events when searching Calendar
I am using Mountain Lion (10.8.5). I entered an event on 13 January, 2015, and set it to repeat weekly until 24 March. All eleven are shown in Calendar, and all of them sync to my iPhone. But when, in Month view on the Mac, I type the events' name in