I need to create a shell script to find the free space of an auto extensible tablespaces and send an alert when the free space is < 700MB. I tried checking with the dba_free_space, but I did not get the exact free space.
Tell me the logic to find the exact free space of autoextensible enabled tablespaces?
When i try to gather server information by running the below query , i get error.
SQL> SQL> select utl_inaddr.get_host_address ('Hostnamename') from dual; select utl_inaddr.get_host_address ('Hostnamename') from dual * ERROR at line 1: ORA-24248: XML DB extensible security not installed ORA-06512: at "SYS.UTL_INADDR", line 19 ORA-06512: at "SYS.UTL_INADDR", line 40 ORA-06512: at line 1
I ran below query to see what is installed.
SQL> SQL> select comp_name from dba_registry;
COMP_NAME ----------------------------------------- Oracle Database Catalog Views Oracle Database Packages and Types Oracle Real Application Clusters
My question is do i need to install XML database to resolve this issue and is SYS user is required to perform this install?
I'm supposed to create a database for an application. The server where this will be running previously had a database for a pretty similar app. I don't know much about Oracle so I reused the ZFS filesystems and left them how they were created (because honestly, I didn't knew why they were created that way, but I'm pretty sure it was for a good reason).
Since I reused the filesystems I created my database and placed the controlfiles in the same places where the old database files were (/oradata/SMART/ora1,/oradata/SMART/ora2,/oradata/SMART/ora3). Thinking like MySQL works I created CODEapp/oradata_smart_ora4 60.6K 400G 60.6K /oradata/SMART/ora4 specifically to store the database there.
The databases startups and mounts no problem. Note that this server will manage with millions/billions records throughout its lifetime.
1. Now that my Database is created, whats the next step? Create the Schema or Tablespace? 2. Tablespace Questions: Tablespace datafile(s) is where actual data from tables is stored? how many are needed? Default or Temporary? How much space will I need for it? Autoextend?
Is there any strcuture or fucntion that can make the table have something like rotation.I mean the record can be first in first delete.So,for example , even the table have limit row for example , 100 row .so, the new data can be replace the oldest row in the table auto and insert into the table .so the new row will replace the oldest 99 th row auto .the table still keep 100 row but the data can be update . Is it "partition" or other ??
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener Usage: /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart ORACLE_HOME Processing Database instance "orcl": log file /u01/app/oracle/product/11.2.0/dbhome_1/startup.log
how to set oracle listener ? i tried using listener.ora file again show the same error
I want to export the oracle data into an excel sheet. I have written the code by using UTL_FILE package. but i am getting the output as shown in the screen shot(without formatting the column size as the width of the data it has). But I want the output column width to be set according to the size of the data automatically.
at my Oracle 11gR2 (11.2.0.3.0) Instance i have two tablespaces that i want to "bundle" into only one tablespace. Herre is the problem, that some of the tables in the two tbalespaces has the same title but some rows of the tables could be not the same.
Is it possible with a kind of migration assistent to migrate two tablespaces into one in that way, that theassistent only writes that rows into the new tablespace, that are not in the tablespace at the moment.
Another way i was thinking about is to have an insert statement coupled with a select statement. The select statement selects all the rows, that are not in the table where i want to migrate in and the insert statement put that selectet rows into the new table.
I've got one database which was Initially upgraded from Oracle 8i to 10.2.04 running on windows. Most of the tabespaces are Dictionary managed. Do you think moving them to locally managed tablespace would give me better performance?
if Yes, what approach I should apply to move them to locally managed? I would like to do this with minimum/no downtime.
I have a Physical Standby database on server#2 which has its UNDO and TEMP tablespaces in a mount point that is a bit small. I discovered yesterday that this mount point was completely filled. This is not an immediate problem, because even though the TEMP and UNDO tablespaces are large, there is almost no usage of them.
I logged into my Primary, and created a new temp tablespace (TEMP2), made it the database default, dropped the TEMP tablespace, and then re-created the TEMP tablespace in a different mount point (with a much higher capacity!). I then made the new TEMP as the database default temp tablespace again. I expected that these changes would be propagated over to the Physical Standby via log application, but they didn't come over.
I have standby_file_management set to AUTO, and there are no unapplied logs. Everything OTHER than the temp tablespaces seems to be in synch.
CODEPARTITION t1p1 VALUES LESS THAN (TO_DATE('2011-11-01', 'YYYY-MM-DD')) PARTITION t1p2 VALUES LESS THAN (TO_DATE('2011-11-02', 'YYYY-MM-DD')) .... PARTITION t1p4 VALUES LESS THAN (MAXVALUE)
Every year partitions will be added for next 12 month. The table partition will be dropped every month (I have to have data from last six month so in July I could drop partition t1p1, in August - t1p2....). How many tablespaces should I create for this table and how place partitions in them to have data for last six month and use minimum space on disk?
I was thinking about one tablespace for whole table because space of each dropped partition will be reused, what do you think about that?
Is the tablespace actually off-line when doing a user-managed hot backup? I know the data blocks are copied into a redo stream but I am not sure if that means it(tablespace) is actually on-line or off-line.
I just want to know what are precautionary measures if tablespaces in a database is in autoextend mode. I'm wondering if these tablespaces reached its maximum sizes.
In our case, we are administering a database (turned over by our outsourcer after a 2-year maintenance) with SAP interface, and we noticed that most of it's tablespaces were created with initial size of 2Gb up to a maximum size of 10Gb, all were 'autoextensible'.
I am using EXPDP to export a schema (Oracle 11g R2), and I need to exclude all the tablespaces that the schema is using. I have seen exluding Oracle objects like functions, tables, packages, indexes...etc. But I have not seen excluding tablespaces.Iis it possible to exclude tablespaces while creating the export dump?
I am trying to restore to a backup instance on a backup server. When I try to recreate the tables I keep getting ORA-01659: unable to allocate MINEXTENTS. The tablespaces and datafiles on both servers show as the same size in OEM.
I have dropped all tables and OEM shows tablespaces are empty. Then I run a script to recreate all tables. Most of the tables don't get created because their TS is full. After the script to recreate all tables runs, the main tablespaces are full, more full than on the production machine. I have also tried ALTER TABLESPACE xxx COALESCE; on each tablespace right after dropping all tables and before recreating them to reclaim free space. Why is it full? I've only dropped and created the tables, there shouldn't be any data in them yet.
ORA-01659: unable to allocate MINEXTENTS beyond 2 in tablespace PLUS_T...The backup instance was already there, all I did was drop the tables. Here's what I ran on prod to build a script to recreate the tables on backup server. Got it off Burleson somewhere.
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) ||'; ' FROM USER_TABLES u;
I have a 10G Express system running. I Have 2 tablespaces in production. WHen taking backup, it terminates unsuccessfully saying system01.dbf is damaged. The application works fine and no data loss is found through the application interface.
So can I shift the data to a new server using the dbf files of the tablespaces in use?
I am trying to find the space occupied on disk by the tablespaces of the database that contain tables, some (and not all) of whose columns are encrypted. My query is like this:
select distinct a.tablespace_name, file_name, bytes /(1024*1024*1024) File_Size_In_GB from dba_data_files a, dba_tables b, (select distinct owner, table_name from DBA_ENCRYPTED_COLUMNS) c where a.tablespace_name = b.tablespace_name and b.owner = c.owner and b.table_name = c.table_name order by a.tablespace_name;
The output of the query is as shown in the attached file:
Since the output (under the heading Total Size of the tablespace) is probably the sum of all the datafiles returned by the query and is obviously incorrect, I have not given the rest of it. I also tried the following:
select distinct a.tablespace_name, file_name, bytes /(1024*1024*1024) File_Size_In_GB, sum (bytes/(1024*1024*1024))over (partition by a.tablespace_name order by file_name) "Total Size of the tablespace" from dba_data_files a, dba_tables b, (select distinct owner, table_name from DBA_ENCRYPTED_COLUMNS) c where a.tablespace_name = b.tablespace_name and b.owner = c.owner and b.table_name = c.table_name order by a.tablespace_name ; [code]...
Here, the fig. under the heading "Total Size of the tablespace" are probably the sum of all the records returned by the query if distinct is not used i.e all the data file sizes returned by the query.
tune my query and get the desired results? I think this can be achieved by group by with rollup, cube, order by and grouping functions, but am not sure how to proceed. I know that I can get the results by using Enterprise Mgr. Console in 2 mins., but would still like to get the results with the queries.
I'm rying to import schema's from a dump file that came from a different environment.
What I have is:
1. dump file 2. log file of the export
I'm trying to import the file(containing three schemas) with remap_schemas, and it fails, gives a lot of ORA-00959: tablespace 'string' does not exist.
Now, I've read in OTN:
[URL]
that what you need to do in that case is to use the REMAP_TABLESPACE option,to redirect the objects to a different tablespace.
I don't see a name of the tablespace I'm getting the error for in the export log.I don't know if I have more tablespaces I have to redirect with REMAP_TABLESPACE.
I don't want to perform this 3 times, have an error, by that find out what's the next tablespace needing redirection and only then starting over...
How can I know from the dump file and the log file,what is the tablespace names i need for the redirection to my names? Or its just that the tablespace giving me the error is the only one in the dump file?