tablespace

CREATE and DROP TABLESPACE Oracle

有些话、适合烂在心里 提交于 2019-12-04 01:03:02
I have created this tablespace CREATE TABLESPACE IA643_TBS DATAFILE 'IA643_dat' SIZE 500K AUTOEXTEND ON NEXT 300K MAXSIZE 100M; I tried to drop it using this command DROP TABLESPACE IA643_TBS; And it said that it was dropped, when I tried to create it again, I got those error messages: ERROR at line 1: ORA-01119: error in creating database file 'IA643_dat' ORA-27038: created file already exists OSD-04010: <create> option specified, file already exists How can I delete the datafile and recreate the tablespace with same file names? You can either login to the operating system and actually delete

True tablespace size in oracle

半腔热情 提交于 2019-12-03 13:40:00
I need to know true tablespace size in Oracle. I have some tablespace and I need to know how many space it uses now and how many space is free (and maybe percent of free space). I found in web some sqls but all of them showed size based on water mark... which is not true space allocated now but as far as I know the highest value which has ever been reached... So my real need is to know if I have enough space for my data which constantly are written and I must know how much of them I can store before having to delete some of them. Thanks Try this: -- Available space, by tablespace SELECT * FROM

How to find table and column in DB2 with tbspaceid tableid specified in error message

北城余情 提交于 2019-12-03 11:43:09
问题 I get following error message when trying to insert an object in the database: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=19, COLNO=0, DRIVER=4.15.134 How can I retrieve the table/column name for which the error is thrown? 回答1: Apparently at the package level, DB2 only works with the IDs and not the names. You can find them back using the following query: SELECT C.TABSCHEMA, C.TABNAME, C.COLNAME FROM

How to find table and column in DB2 with tbspaceid tableid specified in error message

房东的猫 提交于 2019-12-03 02:24:45
I get following error message when trying to insert an object in the database: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=19, COLNO=0, DRIVER=4.15.134 How can I retrieve the table/column name for which the error is thrown? Apparently at the package level, DB2 only works with the IDs and not the names. You can find them back using the following query: SELECT C.TABSCHEMA, C.TABNAME, C.COLNAME FROM SYSCAT.TABLES AS T, SYSCAT.COLUMNS AS C WHERE T.TBSPACEID = 2 AND T.TABLEID = 19 AND C.COLNO = 0 AND C

Is there any logical reason of having different tablespace for indexes?

假装没事ソ 提交于 2019-12-02 23:29:36
Hi Can some let me know why we created different table space for Index and data. Tony Andrews It is a widespread belief that keeping indexes and tables in separate tablespaces improves performance. This is now considered a myth by many respectable experts (see this Ask Tom thread - search for "myth" ), but is still a common practice because old habits die hard! Third party edit Extract from asktom: "Index Tablespace" from 2001 for Oracle version 8.1.6 the question Is it still a good idea to keep indexes in their own tablespace? Does this inhance performance or is it more of a recovery issue?

How can I tell what is in a Postgresql tablespace?

℡╲_俬逩灬. 提交于 2019-12-02 20:32:59
I've created a new tablespace called indexes , and I'm trying to remove the old tablespace indexes_old , which used to contain some tables and indexes. When I try to drop the tablespace, I get: => drop tablespace indexes_old; ERROR: tablespace "indexes_old" is not empty But when I try to see what's in there, it seems that no tables live in that tablespace: => select * from pg_tables where tablespace = 'indexes_old'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers ------------+-----------+------------+------------+------------+----------+------------- (0

PL/SQL developer import dump

◇◆丶佛笑我妖孽 提交于 2019-11-30 20:29:14
I have a dump file which includes two tables. Now I need to import this dump file. I was instructed to create two tablespaces beforehands.Now how do I import this dump file to these tablespaces. I'm using PL/SQL developer. You cannot import a dump file from PL/SQL developer. Instead, you have to do it from the command line. Furthermore, you need access to the file system of the database server since you have to put the dump file in a directory directly accessible by Oracle. The tool to import the dump file is called impdp (in earlier version, it was imp ). My experience is that you need

Find out free space on tablespace

▼魔方 西西 提交于 2019-11-30 10:10:02
问题 Our application has failed a few times because an 'ORA-01536: space quota exceeded for tablespace', and we would like to be able to prevent this by checking regularly the free space on the tablespace and raising an alert when it drops below certain level. Is there any way to find out how much free space is left in a tablespace? After some research (I am not a DBA), I tried the following: select max_bytes-bytes from user_ts_quotas; select sum(nvl(bytes,0)) from user_free_space; but those

PL/SQL developer import dump

依然范特西╮ 提交于 2019-11-30 05:09:49
问题 I have a dump file which includes two tables. Now I need to import this dump file. I was instructed to create two tablespaces beforehands.Now how do I import this dump file to these tablespaces. I'm using PL/SQL developer. 回答1: You cannot import a dump file from PL/SQL developer. Instead, you have to do it from the command line. Furthermore, you need access to the file system of the database server since you have to put the dump file in a directory directly accessible by Oracle. The tool to

Find out free space on tablespace

自闭症网瘾萝莉.ら 提交于 2019-11-29 18:57:19
Our application has failed a few times because an 'ORA-01536: space quota exceeded for tablespace', and we would like to be able to prevent this by checking regularly the free space on the tablespace and raising an alert when it drops below certain level. Is there any way to find out how much free space is left in a tablespace? After some research (I am not a DBA), I tried the following: select max_bytes-bytes from user_ts_quotas; select sum(nvl(bytes,0)) from user_free_space; but those queries return completely different results. I use this query column "Tablespace" format a13 column "Used MB