Tag Archives: a

Ora-01653: table a cannot be extended by 1024 (in table space ABC)

JavaScript implementation: how to write beautiful conditional expression>>>

Oracle ora-01653: error of unable to extend table

Today, when PL SQL developer was used to import data into Oracle database, an error was suddenly reported, which can only be terminated. The specific contents of the error are as follows:

ORA-01653: unable to extend table USER_ DATA.JKHDFXJL by 128 in tablespace MSMS

It means user_ The data table space is insufficient, so Google has a look, and it has some features. There are two kinds of problems: one is that the automatic expansion function of the table space is not on; The other is that the space is really not enough, which has reached the upper limit of automatic expansion

So the step to solve the problem is to check the table space size of Oracle database first, and then check whether the automatic expansion function of all data files under the table space is turned on; If the table space is not enough, then we need to expand the table space

The specific steps are as follows:

execute the following SQL statements in PL SQL developer

SELECTa.tablespace_ Name “table space name”,

a.bytes/1024/1024 “table space size (m)”,

(a.bytes – b.bytes)/1024/1024 “used space (m)”,

b.bytes/1024/1024 “free space (m)”,

round (((a.bytes – b.bytes)/a.bytes) * 100,2) “usage ratio”

from (select table space)_ name,sum(bytes) bytes

FROMdba_ data_ files

GROUPBYtablespace_ name) a,

(SELECTtablespace_ name,sum(bytes) bytes,max(bytes) largest

FROMdba_ free_ space

GROUPBYtablespace_ name) b

WHEREa.tablespace_ name = b.tablespace_ name

ORDERBY((a.bytes – b.bytes)/a.bytes)DESC

“table space size (m)” indicates the total disk space occupied by all data files in the table space in the operating system

For example: User_ Data table space has two data files, datafile1 is 300MB, datafile2 is 400MB, then User_ The “table space size” of data table space is 700MB

“used space (m)” indicates how much table space has been used

“free space (m)” indicates how much table space is left

“usage ratio” indicates the percentage that has been used

for example, view user from step 1_ Data table space has been used by more than 90% . You can view the total number of data files in the table space, whether each data file is automatically expanded, and the maximum value of automatic expansion

SELECTfile_ name,

tablespace_ name,

bytes /1024/1024″bytes MB”,

maxbytes /1024/1024″maxbytes MB”

FROMdba_ data_ files

WHEREtablespace_ name =’USER_ DATA‘;

check whether the MSMS table space is automatically expanded

SELECTfile_ id, file_ name, tablespace_ name, autoextensible, increment_ by

FROMdba_ data_ files

WHEREtablespace_ name =’USER_ DATA

ORDERBYfile_ iddesc;

Check whether the corresponding value of “ autoextensible ” is yes or no. if it is no, it means that the automatic expansion function of MSMS table space is not on. Just change it to yes

for example, the current size of MSMS table space is 0.9gb, but the maximum size of each data file can only be 1GB, and the data file is almost full, so we need to expand the table space

there are two ways to expand the table space: one is to increase the size of data files, the other is to increase the number of data files

first, find out the data file and path corresponding to the table space

SELECT*FROMdba_ data_ files tWHEREt.tablespace_ Name =’table space name ‘

–Find the full path of the data file in the corresponding table space, which corresponds to file_ Name field

solution 1: increase data file

alter database datafile ‘full path data file name’ resize * * m

–Increase the size of a data file in the corresponding table space to * * M

solution 2: add data file

Get the statement that creates the table space:

SELECTdbms_ metadata.get_ ddl(‘TABLESPACE’,’USER_ DATA‘)FROMdual;

confirm that the disk space is sufficient, and add a data file [use DF – G command in UNIX and Linux operating system (check the available disk space)]

alter table space name adddatafile ‘full path data file name’ size * * m

autoextension maxsize20g

–Add a new data file, and the full path data file name is the full path file name of the new data file. The size is * * m, the automatic expansion function is on, and the maximum expansion value of the data file is 20g

verify the added data files

SELECTfile_ name, file_ id, tablespace_ name

FROMdba_ data_ files

WHEREtablespace_ Name =’table space name ‘

0

if you delete a table space data file

alter table space name

drop datafile ‘/ u01/APP/Oracle/product/10.2.0/oradata/orcl/ User_ DATA.dbf’

ps : table space generally keeps the idle percentage above 10%, and the data file size should not exceed 2G. When the table space is insufficient, you can either reset the datafile or add the datafile

assignment makes pointer from integer without a…

warning: assignment makes pointer from integer without a cast

Today, debug a program with dev-c,

char *p;

p = GetStr();

The result has the above prompt, but the function does return char *.

This prompt is very strange. After searching on the Internet, this man’s answer is satisfactory.

Undeclared function prototypes return int by default.

Link to the original text:

http://hi.baidu.com/huishou/item/aafe9f00b5a66903cd34ea62

Android Your content must have a ListView whose…

Android Your content must have a ListView whose id attribute is ‘android.R. id.list ‘solutions to errors

Listview plays an important role in Android development, and it is used in many occasions

Error prompt: your content must have a listview which ID attribute is’ Android. R id.list ‘

For the above error, it may be that we inherit liseactivity to monitor setonitemclick events in listview, but there is no listview tag. It has been said on the Internet that we only need to add the following code to the layout file:

<ListView

a<ListView android:id= “@ Android: ID/list” or android:id= “@id/ android:list ” android:layout_ width=”fill_ parent” android:layout_ height=”wrap_ content”&> </ListView&>
ndroid:id= “@ Android: ID/list” or android:id= “@id/ android:list ”

android:layout_ width=”fill_ parent”

android:layout_ height=”wrap_ content”&>

</ListView&>

However, if we want to implement a custom listview, that is, we will monitor the space in the listview through the baseadapter, then we just need to inherit the activity. But note that we use listview instead of inheriting listactivity. Therefore, we must remember to declare a listview object in the project and instantiate it, so that we can get the listview we want

Don’t worry. Don’t forget that we have our own instantiated listview. With this, we can call the setonitemclicklistener method. The details are as follows:

listView.setOnItemClickListener (new OnItemClickListener() {

@Override

public void onItemClick(AdapterView<?&> arg0, View arg1, int arg2,

long arg3) {

// TODO Auto-generated method stub

Log.i(“TAG”,”The Item has been clicked”);

}

});

listView.setOnItemClickListener (new OnItemClickListener() { @Override public void onItemClick(AdapterView<?&> arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Log.i(“TAG”,”The Item has been clicked”); } });

At this time, we can still use the same construction method as the simpleadapter provided by the system to call our own customized baseadapter, as described before