Empty USER_TABLES
Hi,
Trying to select blocks, num_rows, avg_row_len from user_tables but the result return is empty.
I need those data to find the table size. Using oracle 10g XE
SQL> set echo on
SQL> set linesize 100
SQL> SELECT table_name, blocks, num_rows, avg_row_len FROM user_tables;
TABLE_NAME BLOCKS NUM_ROWS AVG_ROW_LEN
DOCTOR
HOSPITAL
PATIENT
TREATMENT
PRESCRIPTION
WARD
6 rows selected.
Thanks =)
Edited by: user11184507 on 20-May-2009 05:01
Gather statistics on that schama and then try to run this query.
exec dbms_stats.gather_schema_stats('SCHAMA_NAME');
SQL> exec dbms_stats.delete_schema_stats('HR');
PL/SQL procedure successfully completed.
SQL> SELECT table_name, blocks, num_rows, avg_row_len FROM user_tables;
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
MASTER
MLOG$_MASTER
SNAP
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
REGIONS
LOCATIONS
JOBS
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
COUNTRIES
RUPD$_MASTER
DEPARTMENTS
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
EMPLOYEES
JOB_HISTORY
11 rows selected.
SQL> exec dbms_stats.gather_schema_stats('HR');
PL/SQL procedure successfully completed.
SQL> SELECT table_name, blocks, num_rows, avg_row_len FROM user_tables;
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
MASTER
4 5 8
MLOG$_MASTER
SNAP
4 5 8
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
REGIONS
5 4 14
LOCATIONS
5 23 49
JOBS
5 19 33
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
COUNTRIES
25 14
RUPD$_MASTER
DEPARTMENTS
5 27 20
TABLE_NAME
BLOCKS NUM_ROWS AVG_ROW_LEN
EMPLOYEES
5 107 68
JOB_HISTORY
5 10 31
11 rows selected.
Similar Messages
-
How to list out Empty users in system schema
Can any one help to list out only empty users in system schema?
Edited by: leen on Jul 24, 2012 11:34 PMOsama-mustafa wrote:
EdStevens wrote:
Osama-mustafa wrote:
thank you
in this case if i use count like below :
select 'select ''' || table_name || ''' from ' || table_name || ' having count(*) = 0;' from user_tables;
its suppose to work right ?I don't know. What did you get when you tried it?
And we still don't really know what the OP thinks he wants. He posted a rather vague and confusing "requirement" and people started jumping in with solutions without finding out the problem.Yes its did , but like you said we need solution.Before we can offer a solution, we need to know the problem, which the OP still hasn't been able to articulate. -
Statistics Analysis on Tables that are often empty
Right now I'm dealing with a user application that was originally developed in Ora10g. Recently the database was upgraded to Ora11g, and the schema and data was imported successfully.
However, since the user started using Ora11, some of their applications have been running slower and slower. I'm just wondering if the problem could be due to statistics.
The application has several tables which contains temporary data. Usually these tables are empty, although when a user application runs they are populated, and queried against, and then at the end the data is deleted. (Its this program that's running slower and slower.)
I'm just wondering if the problem could be due to a problem with user statistics.
When I look at the 'last_analyzed' field in user_tables, the date goes back to the date of last import. I know Oracle regularly updates statistics, so what I suspect is happening is that, by luck, Oracle has only been gathering statistics when the tables are empty. (And since the tables are empty, the statistics are of no help in optimizing the DB.)
Am I on the right track?
And if so, is there a way to automatically trigger a statistics gather job when a table gets above a certain size?
System details:
Oracle: 11gR2 (64 bit) Standard version
File System: ASM (GRID infrastructure)Usually these tables are empty, although when a user application runs they are populated, and queried against, and then at the end the data is deletedYou have three options (and depending on how the data changes, you might find that not all temporary tables work best with the same option) :
1. Load representative data into the temporary table, collect statistics (including any histograms that you identify as necessary) and then lock the statistics
2. Modify the job to re-gather statistics immediately after a temporary table is populated
3. Delete statistics and then lock the statistics and check the results (execution plan and performance) when the optimizer uses dynamic sampling
Note : It is perfectly reasonable to create indexes on temporary tables -- provided that you DO create the correct indexes. If jobs are querying the temporary tables for the full data set (all rows) indexes are a hindrance. If there are many separate queries against the temporary table, each query retrieiving a small set of rows, an index or two may be beneficiial. Also some designs do use unique indexes to enforce uniqueness when the tables are loaded.
Hemant K Chitale -
Cannot assign an empty string to a parameter with JDBC type VARCHAR
Hi,
I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
Regards,
Chanti.
Heres the complete detail from logs -
Log Record Details
Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH = ? <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
Date: 2010-03-12
Time: 11:32:37:435
Category: com.sap.xmii.system.FileManager
Location: com.sap.xmii.system.FileManager
Application: sap.com/xappsxmiiearSounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.
-
Oracle, Null and empty Strings
Currently I'm facing problems with a class, which contains a String, which
is set to "" (empty String).
When the class is persistent, oracle writes null to the table column
(which seems to be common oracle behaviour) and when retrieving the class,
the field is set to null as well, giving me a lot of null-pointer
exceptions.
Anyway ... I can cope with that (just a lot of extra work)
far worse is the problem, wenn searching objects, that have this field set
to "" oder null.
Oracle can't find the records because JDO creates Querys "where
string=null" or "where string=''" , where oracle expects "where string is
null" to find the records.
Is there a workaround or solution ?Yeah, that would work as well, thx, but since I have to cope with
null-Strings now everywhere in my program, it doesn't hurt just to forbid
empty strings on the program side.
In future times I'll test on Oracle first, then porting to DB/2 - this way
I suppose work is far less to garant compability.
Nevertheless ... having to set the bankcode into quotes is a kodo bug in
my opinion.
Kodo knows the type of classfields (in this case string) and shouldn't
send the parameter as a BigDecimal to the database.
Given that, and having only bankcodes of null (only neccesary when using
Oracle), the method would look like:
public Collection getAccounts (String bankCode)
throws Exception
return getAccounts (Account.class, "bankcode=="+bankcode);
which is how a transparent persistent layer, um, should be , um , I mean
... just transparent ;-D
Marc Prud'hommeaux wrote:
Stefan-
Couldn't you just do something like:
public Collection getAccounts (String bankCode)
throws Exception
String filter;
if (bankCode == null || bankCode.length () == 0)
filter = "(bankCode == null || bankCode == "")";
else
filter = "bankCode == "" + bankCode + """;
return getAccounts (Account.class, filter);
If I understand the problem correctly, this should work for all the
databases.
In article <[email protected]>, Stefan wrote:
What operations are you performing to cause this SQL to be issued? You
say you are having trouble removing objects, but this is clearly not a
DELETE statement. Is this the SQL that is issued when looking up
objects by identity?I'm not removing objects, I was removing just quotes from parameters ;-)
A string column... is it also represented as a string field in your class?Yeah ... just to give you an impression of the code:
First we have a class, representing a bank account:
public class Account {
private AccountMgr myAccountMgr;
private String bankCode;
private String id;
Note, that in nearly all cases bankCode will be a number or null.
I have a second class "AccountMgr", which does all of the persistant stuff
(seaching, making persistent etc.)
This class has two methods, one versatile (protected) to retrieve accounts
by a given filterString and one who just returns accounts by bankCode,
building the expected filterstring. Here is my current working version:
public class AccountMgr {
public Collection getAccounts(String bankCode) throws Exception {
if (bankCode!=null) {
if (bankCode.equals("")) {
throw new Exception("check code, bankCode='' not allowed to get
same behavior from DB2 and Oracle");
// if set, quote the bankCode
bankCode="""+bankCode+""";
return getAccounts(Account.class,"bankCode=="+bankCode);
protected Collection getAccounts(Class accountClass, String filterAdd)
throws Exception {
PersistenceManager pm = MyHelper.getPersistenceManager();
String filter="";
if (filterAdd!=null && !filterAdd.trim().equals("")) {
filter+=filterAdd + " && ";
filter += "myAccountMgr==_accMgr";
Query query = pm.newQuery(accountClass, filter);
query.declareParameters("AccountMgr _accMgr");
return (Collection) query.execute(this);
As you can see, in the first method I have to set the bankCode into
quotes, when it's not null.
This is because otherwise a filter like "bankCode=1234" will be translated
in a way, where 1234 is send as a BigDecimal to the database:
[...] executing statement <4239745>: (SELECT [...] FROM JDO_ACCOUNT t0
WHERE t0.BANKCODE = ? : [reused=1;params={(BigDecimal) 1234}]
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Hi There,
As far as I know, Null is not the same as an empty string; however, when I try this out, I get some unexpected results (well, at least unexpected for my liking):
SQL> CREATE TABLE TS (MID NUMBER,
2 MDESC VARCHAR2(20) DEFAULT '' NOT NULL);
Table created.
SQL> INSERT INTO TS VALUES(1,'');
INSERT INTO TS VALUES(1,'')
ERROR at line 1:
ORA-01400: cannot insert NULL into ("TT"."TS"."MDESC")So, according to the above scenario, I can't insert an empty string!! However, an empty string is a valid string that doesn't have tuples/data!!
How come Oracle translates the null string '' as NULL?
ThanksWilliam Robertson wrote:
There is a special case to do with CHAR values, whereby '' counts as a string and so gets blank-padded, whereas NULL does not.Are you referring to:
SQL> DECLARE
2 flag CHAR(2);
3 PROCEDURE check_null (p_flag IN CHAR)
4 IS
5 BEGIN
6 IF p_flag = ' '
7 THEN
8 dbms_output.put_line ('flag is equal to '' ''');
9 ELSIF p_flag IS NULL
10 THEN
11 dbms_output.put_line ('flag is null');
12 ELSE
13 dbms_output.put_line ('other');
14 END IF;
15 END;
16 BEGIN
17 flag := '';
18 check_null (flag);
19 flag := NULL;
20 check_null (flag);
21 end;
22 /
flag is equal to ' '
flag is null
PL/SQL procedure successfully completed.
SQL> alter session set events '10932 trace name context forever, level 16384';
Session altered.
SQL> DECLARE
2 flag CHAR(2);
3 PROCEDURE check_null (p_flag IN CHAR)
4 IS
5 BEGIN
6 IF p_flag = ' '
7 THEN
8 dbms_output.put_line ('flag is equal to '' ''');
9 ELSIF p_flag IS NULL
10 THEN
11 dbms_output.put_line ('flag is null');
12 ELSE
13 dbms_output.put_line ('other');
14 END IF;
15 END;
16 BEGIN
17 flag := '';
18 check_null (flag);
19 flag := NULL;
20 check_null (flag);
21 end;
22 /
flag is null
flag is null
PL/SQL procedure successfully completed.
SQL> SY.
P.S. Don't ask me why normal (or at least consistent) behavior is not the default. -
Null and empty string not being the same in object?
Hello,
I know that null and empty string are interpreted the same in oracle.
However I discovered the strange behaviour concerning user defined objects:
create or replace
TYPE object AS OBJECT (
value VARCHAR2(2000)
declare
xml xmltype;
obj object;
begin
obj := object('abcd');
xml := xmltype(obj);
dbms_output.put_line(xml.getStringVal());
obj.value := '';
xml := xmltype(obj);
dbms_output.put_line(xml.getStringVal());
obj.value := null;
xml := xmltype(obj);
dbms_output.put_line(xml.getStringVal());
end;
When creating xml from object, all not-null fields are transformed into xml tag.
I supposed that obj.value being either '' or null will lead to the same result.
However this is output from Oracle 9i:
<OBJECT_ID><VALUE>abcd</VALUE></OBJECT_ID>
<OBJECT_ID><VALUE></VALUE></OBJECT_ID>
<OBJECT_ID/>
Oracle 10g behaves as expected:
<OBJECT><VALUE>abcd</VALUE></OBJECT>
<OBJECT/>
<OBJECT/>
However Oracle 9i behaviour leads me to the conclusion that oracle
must somehow distinguish between empty string and null in user defined objects...
Can someone clarify this behaviour?
Thus is it possible to test if object's field is empty or null?However Oracle 9i behaviour leads me to the conclusion that oracle
must somehow distinguish between empty string and null in user defined objects...
Can someone clarify this behaviour?
Thus is it possible to test if object's field is empty or null?A lot of "fixes" were done, relating to XML in 10g and the XML functionality of 9i was known to be buggy.
I think you can safely assume that null and empty strings are treated the same by Oracle regardless. If you're using anything less than 10g, it's not supported any more anyway, so upgrade. Don't rely on any assumptions that may appear due to bugs. -
Difference in Null and Empty String
Hi,
I have been wondering about the difference between Null and Empty String in Java. So I wrote a small program like this:
public class CompareEmptyAndNullString {
public static void main(String args[]) {
String sNull = null;
String sEmpty = "";
try {
if (sNull.equalsIgnoreCase(sEmpty)) {
System.out.println("Null and Empty Strings are Equal");
} else {
System.out.println("Null and Empty Strings are Equal");
} catch (Exception e) {
e.printStackTrace();
This program throws Exception: java.lang.NullPointerException
at practice.programs.CompareEmptyAndNullString.main(CompareEmptyAndNullString.java:10)
Now if I change the IF Clause to if (sEmpty.equalsIgnoreCase(sNull)) then the Program outputs this: Null and Empty Strings are Equal
Can anyone explain why this would happen ?
Thanks in Advance !!JavaProwler wrote:
Saish,
Whether you do any of the following code, the JUnit Test always passes: I mean he NOT Sign doesnt make a difference ...
assert (! "".equals(null));
assert ("".equals(null));
You probably have assertions turned off. Note the the assert keyword has nothing to do with JUnit tests.
I think that older versions of JUnit, before assert was a language keyword (which started in 1.4 or 1.5), had a method called assert. Thus, if you have old-style JUnit tests, they might still compile, but the behavior is completely different from what it was in JUnit, and has nothing to do with JUnit at all.
If you turn assertions on (-ea flag in the JVM command line, I think), the second one will throw AssertionError. -
Check for null and empty - Arraylist
Hello all,
Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
<c:if test="${!empty sampleList}">
</c:if>
Help is greatly appreciated.
Thanks,
Greeshma...A null check might not be you best option. If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
In the C# method, first check if either is an empty string, if so return an empty string.
If not, TryParse the data, if successful, return a valid data string for EventDate. If not, error or return empty string, whichever satsifies the requirement. -
Interactive Report view is empty
Hi,
I'm on CRM 7.0 EHP3. I'm encountering empty report criteria and display when open the Campaign effectiveness and all other interactive report page. Please see the screen shot below. There is no error message on the screen, as well as ST22.
I've configured the interactive report and ran the configuration wizard /CRMBW/CONFIG_WIZARD successfully and no error found.
Also the roles SAP_CRM_OR_ADMIN, SAP_CRM_OR_CONFIG and SAP_CRM_OR_USER and SAP_ALL are given to the user in both clients.
Please let me know what could be the causes.
Thanks in advance.
cheers,
juliusOkay, problem seems solved. I don't know if it is a bug or a feature... (: Anyway, this view selects data from threads that had been created from a portal application. And if you create threads from WC_Collaboration server admin console, there's no data will be selected with FORUMCRAWLER_VW view. Sorry, have no time to check SQL query for those DB view, may be this behaviour is reasonable.
Edited by: Insomnium on 17.01.2013 2:33 -
Can I somehow print an empty report, and specify with a parameter how many times it should be repeated?
The report is a form with checkboxes, and sometimes we want the empty one for someone to fill in when out on the field. And since this form is a subreport, we cant print the entire report over again, but need the subreport to be repeated, let's say five times.
/Thank you!Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly
-
My photos on iphotos just became empty boxes, bordered by white intermittent lines. If I click on a photo it comes up, but I can't see what each photo is at a glance. Any ideas how to resolve this? thanks
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Include the options to rebuild the thumbnails.
Regards
TD -
Error while running fiori application in launchpad which is having image in its empty view
Hi Experts,
I have created a fiori application using odata services and uploaded it into launchpad.I want to display image in its empty view. It is getting displayed when i run the application on eclipse but i am getting the error for the same when i run it on launchpad.
Below is the error:
"NetworkError: 404 NOT FOUND - http://ws-sapsvr01:8010/sap/bc/ui5_ui5/ui2/ushell/shells/abap/img/TeamSAP.jpg"
Can any body help me solve this issue why i am getting this??
Thanks & Regards.
Rahul.Hi Masa,
In my case, i've the file 'preco_ok.jpg' located inside my extended project (Z_MM_MyProject -> WebContent -> images)
And I refer it as follow:
<Image src="images/preco_ok.jpg" class="spaceIndicator"/>
In the local enviroment it is ok, but on launchpad, the 404 error is shown:
GET http://host:port/sap/bc/ui5_ui5/ui2/ushell/shells/abap/images/preco_ok.jpg 404 (NOT FOUND)
Thank you for your support. -
OBI 11G sUnquotedTableName.empty() error while creating a report
hello guru's
We have a problem when trying to build a report in OBI 11G. We have migrated an RPD from 10 to 11 and one 1 installation DEV all is OK, on TEST we get all kind of problems.
One of the main issues is when trying to build a report and clicking on the + to expand a node of a dimension object we hget the sUnquotedTableName.empty() error
When going to the logs I see the following details of the error.
Does anyone have a clue and can help us out?
Koen Verheyen
ProblemhMessage Level 10
Relationship ID 0:1
Component OBIPS
Module saw.httpserver.processrequest
Host XXXXXXX
Host IP Address XXXXXX
Thread ID 2836335504
ECID 0000Ijcd5UzFw000jzwkno1Clgr10001eK
Message
Assertion failure: !sUnquotedTableName.empty() at line 1936 of /scratch/aime1/adestore/views/aime1_dadvfa0138/bifndn/analytics_web/main/project/webutil/tablenameutils.cpp
Supplemental Detail
File:tablenameutils.cpp
Line:1936
Location:
saw.httpserver.processrequest
saw.rpc.server.responder
saw.rpc.server
saw.rpc.server.handleConnection
saw.rpc.server.dispatch
saw.threadpool
saw.threads
SessionID: 07vh3ae7bqk8nsnslpm32fhtcm9nsc5cd7va98q
AuthProps: AuthSchema=UidPwd|PWD=******|UID=koen_verheyen|User=koen_verheyen|RunAs=koen_verheyen
ecid: 0000Ijcd5UzFw000jzwkno1Clgr10001eK,0:1
ThreadID: 2836335504
HttpCommand: JSONRequestTableColumns
RemoteIP: 10.10.1.15
HttpArgs:Hi,
I am newly using BI publisher . I am using 10.1.3.4.0 . I am just trying to create a report in test name. that is the first step to create a report where i am getting error. I am using default RPD paint , where all the user and Groups are defined . -
Is there a way to prevent users from sending empty or incomplete PDF forms?
Hi all,
Using Acrobat Professional 8, I made a fillable form to individuals to fill in and submit to me as a pdf attachment to an e-mail or print out it and fill by hand.
Question 1. I want to make sure they don't send incomplete or empty forms back to me. Is there a way to do that?
2. The form is 8.5x15 inches. I want it to look like one continuous page on screen but print as 2 letter size pages. However, when i go to print it, acrobat scales it down to fit in one page which makes the text too small to read.
Please advise! Thanks.
KarenOn Question 2:
when you get to the Print menu in Acrobat/Reader look for scale to fit paper and uncheck if there is a reference to Full size check that.
Maybe you are looking for
-
please help. recently upgraded to 10.8.5 however the Himedia player connected to my iMac via sharing can no longer connect to the iMac. the media player recognizes the imac and the shared files, however when you try to connect from himedia to imac it
-
Two or more UI components background colors get mixed up
Hello, I´ve got an issue here It´s hard to explain in words so I got a print screen of it. Ok, I will try to explain the structure here and what the problem is... Each rectangle is a canvas. Inside each of them there is a LABEL where the text is writ
-
How to hide a tab, or why does have to be so complicated?
Hi I have a tabNavigator, and I am trying to hide some of the tabs. I have tried the obvioius visible="false" //this did not work includeInLayout="false" visible="false" //and this did not work and finally var secondTab = tabNavigator.getChildAt(1);
-
Ie: make sub folders and enter a name without it appearing in the main list. Put the name in two sub folders and main list, then delete one without deleting all???
-
Increase the length of a character array
hello, i need to increase the length of my character array.i tred using ArrayUtils class which supports setSize method to set the size of a previously declared character array.But,i have no idea of how to import that class.i meant 'which package to u