Calculate used space in database!
Hi all,
I can calculate used space by using the following ways:
1. Calculate allocated size by issuing
SELECT SUM(d.bytes/1024/1024/1024)
FROM dba_data_files;
2. Calculate free space by issuing
SELECT SUM(bytes/1024/1024/1024)
from dba_free_space;
Used space will be the value from first statement - value of the second statement! This is manual way!
Is this possible to combine the two above queries?
Thank you!
Dan.
You can certainly combine the queries
SELECT (allocated.bytes - free.bytes )/1024/1024/1024 used_gb
FROM (select sum(bytes) bytes from dba_data_files) allocated,
(select sum(bytes) bytes from dba_free_space) freeNormally, you'd group by tablespace as well.
But if you just want the amount of space used, it's probably easier to just
SELECT sum(bytes)/1024/1024/1024 used_gb
FROM dba_segmentsJustin
Similar Messages
-
Tsql for database , size , free space or used space in database
hi,
i want to know how to find out database sizeuse master
declare @PageSize varchar(10)
select @PageSize=v.low/1024.0
from master..spt_values v
where v.number=1 and v.type='E'
select name as DatabaseName, convert(float,null) as Size
into #tem
From sysdatabases where dbid>4
declare @SQL varchar (8000)
set @SQL=''
while exists (select * from #tem where size is null)
begin
select @SQL='update #tem set size=(select round(sum(size)*'+@PageSize+'/1024,0) From '+quotename(databasename)+'.dbo.sysfiles) where databasename='''+databasename+''''
from #tem
where size is null
exec (@SQL)
end
select * from #tem order by DatabaseName
drop table #tem
The first select statement is to get how many kilobytes a data page has. SQL Server allocates disk space in the unit of data page. Currently each SQL server data page contains 8k bytes. The number of data pages allocated to each database file is recorded
in the sysfiles system table. With this information on hand the script creates a temporary table #tem and update the temporary table with size information which is gathered by querying the sysfiles table.
thx benedikt -
How to know used space(size) of database or user?
Hi
can anyone let me know how to caluculate the used space(size) of the database ans user(schema).
Thanks in advance.Hello,
For the used space of the database you may use the following query:
select sum(bytes)/(1024*1024) "Mo" from dba_segments;For the used space of the Schemas you may use the query below:
select owner, sum(bytes)/(1024*1024) "Mo"
from dba_segments
group by owner;Hope this help.
Best regards,
Jean-Valentin -
How to use a Logical Database in Function Module.
Hi Experts,
I want to use a logical database in a Function Module to fetch data from a standard SAP table into a Internal table for certain filter conditions.
How can I get get this done????
I called LDB_PROCESS FM in my FM, but I could not figure out how to store the extract in my IT table since we cant use GET in FM.
Please provide me a sample code if possible.
Thanks in Advance,
Alex.Hi,
i had an example program like this ,in this i want to get the data using pnp logical database with 5 fields in an interface program.
data: begin of it_final occurs 0,
pernr like pa0002-pernr,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
usrid like pa0105-usrid,
usrid_long like pa0105-usrid_long,
end of it_final.
get pernr.
clear : p0000,p0002,p0105.
rp-provide-from-last p0000 space p_date p_date.
if p0000-stat2 = '3'.
v_pernr = pnppernr-low.
else.
reject.
endif.
*---Get employee pernr, First name ,Last name into final table
rp-provide-from-last p0002 space p_date p_date.
if pnp-sw-found = '1'.
it_final-pernr = p0002-pernr.
it_final-vorna = p0002-vorna.
it_final-nachn = p0002-nachn.
else.
*---Error message if not infotype 0002 maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-EMI '0002'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
**--Get SYSTEM USERNAME to final table
rp-provide-from-last p0105 0001 p_date p_date.
if pnp-sw-found = '1'.
it_final-usrid = p0105-usrid.
else.
*---Error message if not SYSTEM USERNAME maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-003 '0105'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
**--Get Email ID to final table
rp-provide-from-last p0105 0010 p_date p_date.
if pnp-sw-found = '1'.
it_final-usrid_long = p0105-usrid_long.
else.
*---Error message if not Email ID maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-004 '0105'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
append it_final.
clear it_final.
reward points if useful,
venkat. -
Using sql to monitor free/used space
Hi,
Using the next sql statement
SELECT /* + RULE */ df.tablespace_name "Tablespace",
df.bytes / (1024 * 1024) "Size (MB)",
SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"
FROM dba_free_space fs,
(SELECT tablespace_name,SUM(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY df.tablespace_name,df.bytes
UNION ALL
SELECT /* + RULE */ df.tablespace_name tspace,
fs.bytes / (1024 * 1024),
SUM(df.bytes_free) / (1024 * 1024),
Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
FROM dba_temp_files fs,
(SELECT tablespace_name,bytes_free,bytes_used
FROM v$temp_space_header
GROUP BY tablespace_name,bytes_free,bytes_used) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
ORDER BY 4 DESC;from the source
http://www.orafaq.com/wiki/Tablespacethe output is
Tablespace Size (MB) Free (MB) % Free % Used
TS_UNDO 4000 3973,875 99 1
SYSAUX 512 293,5625 57 43
SYSTEM 512 224,3125 44 56
DATA 70000 24346,375 35 65
TS_TEMP 5000 460 9 91
INDX 30000 2349,0625 8 92why doesn't have the ts_temp tablespace almost free space?
becouse if I use the management database sql developer option the ts_temp output is
Tablespace Size (MB) Free (MB) % Free % Used
TS_TEMP null 0 null nullthanks in advancedThe first half of your query seems to work -- just keep in mind that is doesn't consider that the tablespace datafiles might be auto-extendable up to some limit.
The second half doesn't seem to work (I'm in 11g).
Here's what I use to look at temp-space totals:
select f.tblspc as "Tablespace"
, nvl( sum( s.blocks * b.value ), 0 ) as "Bytes-Used"
, f.bytes as "Bytes-Available"
, round( nvl( sum( s.blocks * b.value ), 0 ) / f.bytes * 100, 2 ) as "%-Used"
from ( select tablespace_name as tblspc
, sum(bytes) as bytes
, 'Temporary' as tstype
from dba_temp_files
group by tablespace_name, 'Temp-TblSpc'
union
select tablespace_name as tblspc
, sum(bytes) as bytes
, 'Regular' as tstype
from dba_data_files
where tablespace_name in ( select distinct temporary_tablespace from dba_users )
group by tablespace_name, 'Reg-TblSpc'
) f
left join
v$sort_usage s on ( f.tblspc = s.tablespace )
join
( select value
from v$parameter
where name = 'db_block_size'
) b on (1=1)
group by f.tblspc
, f.tstype
, f.bytes
order by 1 ;And here's what I use to look at which users are using temp-space:
select t.tablespace
, t.username
, f.tstype as type
, round((sum(decode(segtype, 'SORT', t.blocks,0))*b.bsz)/1024/1024,2) as sort_mb
, round((sum(decode(segtype, 'DATA', t.blocks,0))*b.bsz)/1024/1024,2) as data_mb
, round((sum(decode(segtype, 'HASH', t.blocks,0))*b.bsz)/1024/1024,2) as hash_mb
, round((sum(decode(segtype, 'INDEX', t.blocks,0))*b.bsz)/1024/1024,2) as indx_mb
, round((sum(decode(segtype, 'LOB_DATA', t.blocks,0))*b.bsz)/1024/1024,2) as lobs_mb
, round((sum(decode(segtype, 'SORT', 0, 'DATA', 0, 'HASH', 0, 'INDEX', 0, 'LOB_DATA', 0
, t.blocks ))*b.bsz)/1024/1024,2) as othr_mb
, round((sum(t.blocks)*b.bsz)/1024/1024,2) as all_mb
, round((max(u.blks)*b.bsz)/max(f.bytes)*100,2) as "All-TS-%"
, round((max(u.blks)*b.bsz)/1024/1024) ||'/'||
round(max(f.bytes)/1024/1024,2) as "All-TS-Usage-mb"
from v$tempseg_usage t
cross join
( select value as bsz from v$parameter where name = 'db_block_size' ) b
left join
( select tablespace_name as tablespace
, sum(bytes) as bytes
, 'Temporary' as tstype
from dba_temp_files
group by tablespace_name
union
select tablespace_name
, sum(bytes)
, 'Regular'
from dba_data_files
where tablespace_name in
( select distinct temporary_tablespace from dba_users )
group by tablespace_name
) f on ( t.tablespace = f.tablespace )
left join
( select tablespace, sum(blocks) as blks
from v$tempseg_usage
group by tablespace
) u on ( t.tablespace = u.tablespace )
group by t.username, t.tablespace, f.tstype, b.bsz
order by t.tablespace, t.username ;Maybe that helps. -
Is Oracle Expert tool still used in Oracle database 11g?
Is Oracle Expert tool still used in Oracle database 11g?
!exp help=yes
Export: Release 11.2.0.1.0 - Production on Sat May 8 08:17:06 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
You can let Export prompt you for parameters by entering the EXP
command followed by your username/password:
Example: EXP SCOTT/TIGER
Or, you can control how Export runs by entering the EXP command followed
by various arguments. To specify parameters, you use keywords:
Format: EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
USERID must be the first parameter on the command line.
Keyword Description (Default) Keyword Description (Default)
USERID username/password FULL export entire file (N)
BUFFER size of data buffer OWNER list of owner usernames
FILE output files (EXPDAT.DMP) TABLES list of table names
COMPRESS import into one extent (Y) RECORDLENGTH length of IO record
GRANTS export grants (Y) INCTYPE incremental export type
INDEXES export indexes (Y) RECORD track incr. export (Y)
DIRECT direct path (N) TRIGGERS export triggers (Y)
LOG log file of screen output STATISTICS analyze objects (ESTIMATE)
ROWS export data rows (Y) PARFILE parameter filename
CONSISTENT cross-table consistency(N) CONSTRAINTS export constraints (Y)
OBJECT_CONSISTENT transaction set to read only during object export (N)
FEEDBACK display progress every x rows (0)
FILESIZE maximum size of each dump file
FLASHBACK_SCN SCN used to set session snapshot back to
FLASHBACK_TIME time used to get the SCN closest to the specified time
QUERY select clause used to export a subset of a table
RESUMABLE suspend when a space related error is encountered(N)
RESUMABLE_NAME text string used to identify resumable statement
RESUMABLE_TIMEOUT wait time for RESUMABLE
TTS_FULL_CHECK perform full or partial dependency check for TTS
VOLSIZE number of bytes to write to each tape volume
TABLESPACES list of tablespaces to export
TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
TEMPLATE template name which invokes iAS mode export
Export terminated successfully without warnings. -
Finding the size of db and size of used space
Greetings all good people.
Can you please help me find out about 2 database information?
One, I want to find out the size of a database =size of physical files.
and the size of data which is the size occupied in physical files.
We are about to start a new project and there is a table on the database but it is empty.
We want to be exporting data into this table but we want to make sure that there is enough space on the db before we start populating the table with data.
I believe the code below just gives me the size of the database.
select (bytes/1024/1024) as total_gigs from dba_segments where owner='BELL' and segment_name='$TABLE_NAME
But I want to know the total size of the database and how much size has been used already, much the same as you would want to know the size capacity of a hard drive and how much of the size has been used.
Sorry if my request is confusing.
Thanks a lot in advancedb size can be found out
select sum(bytes)/1024/1024/1024 from dba_data_files ;
and size of data is -- in the datafiles
select sum(bytes)/1024/1024/1024 from dba_segemnts ;
You can find out by below query .. the tablespace sizes -- would be DBSIZE
used space -- would be the actual occupied space.
select t.tablespace, t.totalspace as " Totalspace(MB)",
round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
nvl(fs.freespace,0) as "Freespace(MB)"
from
(select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
from dba_data_files d
group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
from dba_free_space f
group by f.tablespace_name) fs
where t.tablespace=fs.tablespace (+)
order by t.tablespace -
How can I effectively use "Spaces?"
I am going to try this again and see if anyone has any suggestions: Is there any way of disassociating an application's ownership of a "Space" in Spaces?
I want to be able to have, say, different open documents belonging to, say, Word, or Excel, in different Spaces for different projects. The trouble is if I open an application is a space, that space appears to now "own" that application. If I open a document using that application in, say, Space 1, and I then move that window to Space 2 for example, I have a problem!
So I am using Space 2 for Project A and all documents for Project A are in Space 2. Also, in Space 3 I have all the windows for Project B. It is often the case that Word, which I opened in Space 1, now has document windows in Space 1, 2 and 3.
Let us say that in Space 2 I also have a database application open and I do something in its window, when I click on the Word document window - swoosh - I am back in Space 1, where I opened Word in the first place. To get back to my project I must move back to Space 2 where I find the document window is focused and I can work in it. However if I go back to the other window in Space 2, the database window, and then again click on the Word document window - swoosh again - back in Space 1.
Extremely irritating, and makes Spaces unusable.
Any help? I do NOT want any Space to "own" any application. An application is common to ALL spaces, no ownership. In fact, and application is just a system resource like a printer or the clock.
Thanks - LawrenceYes, if I do not change apps in the interim I can move from document 1 in Space 1 to document 2 in Space 2 and they are both editable instantly. But now if I go to the document 2 in Space 2 and, while in Space 2 I use a window from some other application, like for example I look at some entry in an Excel spreadsheet, then click back on my document 2 - swoosh, I am moved back to Space 1.
In other words, as an app "owns" a space, if I am to switch back and forth between documents (windows) in the same app, they must all be in the same Space else I am moved back to the Space where I first opened the app.
To me, this is entirely illogical! Why must a Space "own" an application? I should be able to access and use any window from any app in any Space, and stay in that Space until "I" decide to move.
For example I have my usual apps (Mail, Address Book, Calendar, Adium, etc.) in Space 1. Space 2 contains some log files. Space 3 is a project I am working on. All 3 Spaces have Word documents in them. This does not work, yet it seems an entirely reasonable way to work.
I do not understand it.
Thanks for your help.
Lawrence -
To know free space in database files
Hi all,
how to know free space and used space in individual database files by sql quer or command not from oracle enterprise manager.please can any body tell me query.quick response will higly appreciated.thanks a lot in advance.Hi;
column file_name format a42
column tablespace_name format a15
column status format a3 trunc
column t format 999,999.000 heading "Total MB"
column a format a4 heading "Aext"
column p format 990.00 heading "% Free"
SELECT df.file_name,
df.tablespace_name,
df. status,
(df.bytes/1024000) t,
(fs.s/df.bytes*100) p,
decode (ae.y,1,'YES','NO') a
FROM dba_data_files df,
(SELECT file_id,SUM(bytes) s
FROM dba_free_space
GROUP BY file_id) fs,
(SELECT file#, 1 y
FROM sys.filext$
GROUP BY file#) ae
WHERE df.file_id = fs.file_id
AND ae.file#(+) = df.file_id
ORDER BY df.tablespace_name, df.file_id;
column file_name clear
column tablespace_name clear
column status clear
column t clear
column a clear
column p clear
ttitle off
Sample Output:
FILE_NAME TABLESPACE_NAME STA Total MB % Free Aext
/usr/ORACLE/u02/data/example01.dbf EXAMPLE AVA 153.600 49.13 YES
Edited by: emre baransel on Sep 30, 2009 10:11 AM -
Monitoring Used (%) space for tablespaces
Hi everyone,
I am currently using:
Redhat Linux ES 5 2.6.18 and also
Oracle 10g Release 2 for Linux x86 R10.2.0.3
While monitoring my Tablespaces using OEM Database Control, I notice that two tablespaces were almost full.
[SYSAUX] - Size: 290MB , Used 283MB (97% full)
[SYSTEM] - Size: 320MB, Used 313MB (98% full)
When I try to locate the datafiles of both tablespaces in its directory (/home/dba/oracle/oradata/oracle), it shows the allocated size (290MB for sysaux01.dbf & 320MB for system01.dbf) and not the used space.
I got three questions to ask over here:
1st- Why there isn't any warnings or alarms even though the tablespaces exceeds the critical size?
2nd- How come the datafiles shows the allocated size of the tablespaces and not the Used space?]
3rd- How can I find & monitor the actual used space of the tablespaces?
4th- I have enabled the AutoExtend function but I am worry whether is there any other concern?
I am still very new here.
Please pardon me for anything that is improper.
Looking forward for your expertise, guidance & help.
Thanks for your attention.
-Regards-
++ Kef Lim ++Hi,
Here you have some scripts:
TABLESPACE USAGE NOTES:
Tablespace Name - Name of the tablespace
Bytes Used - Size of the file in bytes
Bytes Free - Size of free space in bytes
Largest - Largest free space in bytes
Percent Used - Percentage of tablespace that is being used - Careful if it is more than 85%
select a.TABLESPACE_NAME,
a.BYTES bytes_used,
b.BYTES bytes_free,
b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
select TABLESPACE_NAME,
sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
a,
select TABLESPACE_NAME,
sum(BYTES) BYTES ,
max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc
SET SERVEROUTPUT ON
SET PAGESIZE 1000
SET LINESIZE 255
SET FEEDBACK OFF
PROMPT
PROMPT Tablespaces nearing 0% free
PROMPT ***************************
SELECT a.tablespace_name,
b.size_kb,
a.free_kb,
Trunc((a.free_kb/b.size_kb) * 100) "FREE_%"
FROM (SELECT tablespace_name,
Trunc(Sum(bytes)/1024) free_kb
FROM dba_free_space
GROUP BY tablespace_name) a,
(SELECT tablespace_name,
Trunc(Sum(bytes)/1024) size_kb
FROM dba_data_files
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name
AND Round((a.free_kb/b.size_kb) * 100,2) < 10
PROMPT
SET FEEDBACK ON
SET PAGESIZE 18
Set Termout On
Set Heading On
clear breaks
break on contents -
skip 1
compute Sum of alloc used free nbfrag on contents
column tblsp format a20 wrap heading "Tablespace Name"
column Alloc format 999,999 heading "Alloc|(Mb)"
column Free format 999,999 heading "Free|(Mb)"
column used format 999,999 heading "Used|(Mb)"
column pused format 990.9 heading "%|Used|Space"
column fragmax format 99,999.9 heading "Largest|Free|Ext.(Mb)"
column nbfrag format 99999 heading "Nb|frag"
column contents format a10 heading "Content"
column pct_ext_coal format 999 heading "% Ext.|Coal."
column ext_manage format a7 wrap heading "Ext.|M."
column autoext format a7 wrap heading "Auto|Ext."
select
contents
, nvl (dt.tablespace_name, nvl (fsp.tablespace_name, 'Unknown')) tblsp
, alloc
, alloc - nvl (free, 0) Used
, nvl (free, 0) Free
, ((alloc - nvl (free, 0)) / alloc) * 100 pused
, nbfrag
, fragmax
, dfsc.pct_ext_coal pct_ext_coal
, dt.ext_manage
, df.inc autoext
from
( select sum (bytes)/1048576 free
, max (bytes)/1048576 fragmax
, tablespace_name
, count(*) nbfrag
from sys.dba_free_space
group by tablespace_name
) fsp
, ( select sum(bytes)/1048576 alloc
, tablespace_name
, Decode(((inc * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes') inc
from sys.dba_data_files sddf
, sys.filext$ aut
where sddf.file_id = aut.file# (+)
group by tablespace_name
, Decode(((inc * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes')
Union
select sum(bytes)/1048576 alloc
, tablespace_name
, Decode(((increment_by * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes') inc
from sys.dba_temp_files sddf
group by tablespace_name
, Decode(((increment_by * &Var_DB_BLOCK_SIZE)/1024), Null, 'No', 'Yes')
) df
, ( select contents
, tablespace_name
, initial_extent/1024 initial_ext
, next_extent/1024 next_ext
, pct_increase
, max_extents
, min_extents
, Substr(extent_management,1,5) ext_manage
from dba_tablespaces
) dt
, ( select percent_extents_coalesced pct_ext_coal
, tablespace_name
from dba_free_space_coalesced
) dfsc
where
fsp.tablespace_name (+) = dt.tablespace_name
and
df.tablespace_name (+) = dt.tablespace_name
and
dfsc.tablespace_name (+) = dt.tablespace_name
order
by contents
, pused desc
;Cheers,
Francisco Munoz Alvarez
http://www.oraclenz.com -
Why IPC uses CRM as database and not R/3 ?
Hi ,
can any one help me with an answer for the following question :
<b>Why IPC uses CRM as database and not R/3 ?</b>
Points will be rewarded for helpful answer
thanks
rituHi
IPC have Sales Pricing Engine, Pricing Configuration engine and TTE which helps to maintain the similar R3 pricing settings. As you are aware pricing in R3 is determined by Sales area, Cupp, DPP, so IPC is capable of determining the Pricing using same R3 standard procedure. T
This is not available in CRM, so CRM needs IPC to undertake the determine pricing/ calculate the pricing of the products.
Regards
Nagarj -
Merge space within database.
Hi,
Our company is moving a production database from one storage subsystem to another, more efficient. Objects within the database are highly fragmanted. The data wihin the database uses about 1TB. If somebody performed a full export and an import to another database, the same data would need less than 600GB. There is an idea to recreate and rebuild all objects during the mentioned maintenance.
Full imp/exp is not an option as it would cause a long database outage what is not acceptable. My idea is to copy the whole database to the new storage, create a new tablesace and perioically (weekly) move several objects to it (using ALTER TABLE... MOVE and ALTER INDEX REUBUILT... TABLESPACE...). When all objects are moved, drop the old tablespace and realese space. Is there any other more convenient way to merge space within database?
The database uses a lot of small, 2GB files. Wouldn't it be better to create a smaller number of bigger files? Would it influence the performance of the database?
Thank you in advance,
TimThank you very much for the reply!
The version that is currently used is 10.1.0.5 (EE).
To be honest mainly indexes are fragmented. We don't suffer from table's data chaining or migration.
I have made a full database export recently (using data pump) and imported it into an other database. In the source database indexes utilize about 500GB whereas in the target only about 300GB. The indexes haven't been rebuilt for ...years. According to many publications, index defragmentation vastly improves overall system performance, especially for queries that use index scans.
As I know during checkpoint the headers of all data files are updated with current SCN. I thought that decreasing the number of data files would decrease the number of writes. That's why I asked about performance differences.
In what way do you consider ASM as the perfect tool for migration?
Regards,
Tim -
IPod empty, still showing used space
So after disconnecting my ipod after charging/adding songs, it shows ther is no music within despite there being ~120GB of used space. When I connect to iTunes it says "iTunes cannot read the contents of the iPod "OWNER'S IPO".
Go to the Summary tab in iPod preferences and click Restore to restore this iPod to factory settings."
Is there any way to recover what's on there, or am I screwed?*Recover media from iPod*
Check out this post from Zevoneer for some iPod recovery options.
http://discussions.apple.com/thread.jspa?messageID=6273675�
Some of the tools require a working iPod database which, in your case, I suspect has been corrupted. I've successfully helped out friends using the manual recovery method mentioned towards the end which doesn't rely on the library.
tt2 -
"Connection is closed" closed error while using MS Access database
We are using MS Access database in our project. Recently the database was upgraded to 2000.
After upgrading the database, I get the folowing error when getAutoCommit() is called on a connection -
java.sql.SQLException: Connection is closed
at sun.jdbc.odbc.JdbcOdbcConnection.validateConnection(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.getAutoCommit(Unknown Source)
The connection is not closed explicity before getAutoCommit() is called, only the statement is closed.
This error is sporadic and occurs under load scenario only (when a lot of connections are open). Once the error occurs, all the database calls fail then onwards. The error was not occuring before the database was upgraded.
I suspect the jbdc-odbc driver. The driver might not be compatible with Access2000 database. Under load scenario, it might be closing connections automatically.
Has anybody faced similar problem before? Where can I find the compatible jdbc-odbc driver? And how to ensure that it is jdbc-odbc driver problem only?
The database verison - MS Access 2000
Java version - 1.3.1_01can i just point out that there is no support for transactions in Access so I wonder why you are calling autoCommit methods at all...
-
How to use your own database with your users to authenticate in a Web app?
Hello, everybody!
I'm starting to write my first web application and I'm going to use JSF, JPA and EJB3 in this application. One of the first things that I have to do on it is the authentication part where I'll have a page with a user name and a password for the user to login. So, as I'm new to all this in Java (I've already implemented this on .NET in the past), I was studying the Java EE 5 Tutorial, especifically the section "Example: Using Form-Based Authentication with a JSP Page". But I saw that the users that the sample application uses come from the file realm on the Application Server. The users are created there and assigned a name, a password and a group. After the users are in the Application Server we can simply uses forms authentication declaratively in the deployment descriptor (web.xml).
But the problem is that this doesn't work to me as I already have my own database with my users, so I want to use it instead of having to create the users on the Application Server.
So, I'm asking you how to do that. Of course I'm not expecting that you place the code here to me as I know that such a thing could be complicated. Instead, I'm asking if you know about some tutorial, article, book or something that teaches how to do what I want. But I would like to see theses examples using JSF and/or EJB3 because these are the technologies that I'm using to develop. It's a pity that the Java EE 5 Tutorial doesn't have an example using a custom database as I know that this situation is very common in the majority of web sites.
Thank you very much.
MarcosFrom memory, it goes like this... You just create a
raw jdbc connection on your user database using a
special "login" DB user account, which has
permissions only to an "authenticate" stored query,
which accepts two arguments: username & password, and
returns a boolean 0 or 1 rows found.When I implemented this in .NET's ASP.NET I had the same solution. I had an special user created in the database that I used to log in. When the real user entered his username and password I was already logged in and I had just to check his username and password agains the right table in my database.
But that was only possible bacause when I connected to the database using my hidden user, I used the rights APIs in ASP.NET that coordinate the authentication process. This means that before login in, no one could access any resources (pages, atc...). So what I'm saying is that I can't manager this manually in Java. Java has to have some API or whatever to allow me to control the login process programmatically, while letting the Application Server control the access to the resources.
Maybe you are looking for
-
IPhone suddenly has no signal.
I have a iPhone 3g 8GB on 02-UK. It was working fine until about 10am GMT this morning. After trying to send a text it failed and I received a no signal service message in the top left. I thought ok, maybe the tower died or its restarting or somethin
-
Weird behaviour in dragging from tilelist to list
Hi All, I am trying to drag an item from a tilelist into a list but I am encountering this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at components::TileListItem/set data()[C:\Documents and Setti
-
Hi, I have acknowledged the warning under the faults and events filter, but the log still does not clear. The global fault policy is set to delete on clear. Please see the screen shot Thanks
-
SQL Agent jobs status for multiple servers using Powershell.
Hi All, I am following website link: http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/09/17/powershell-script-to-monitor-a-service-on-a-group-of-servers-html-formatted-email-output.aspx I require to gather status details about all
-
Urgent pls-AdapterActivatorPOA overrides final method Error
I am getting the following error when trying to access our reports .jsp files. java.lang.VerifyError: class org.omg.PortableServer.AdapterActivatorPOA overrides final method . at java.lang.ClassLoader.defineClass0(Native Method) at java.lan