143.You execute a command to resize a data file, sales.dbf, of size 200 MB in your database: ALTER D
2016-08-04 18:34
1131 查看
143.You execute a command to resize a data file, sales.dbf, of size 200 MB in your database:
ALTER DATABASE DATAFILE '/remorse/sales.dbf' RESIZE 150M;
Which statement is true about this command?
A.The command must be issued in MOUNT state.
B.The command succeeds only if the data file is offline.
C.The command must be issued when the database is in the archivelog mode.
D.The command succeeds if no extent in the tablespace is currently allocated above the 150 MB boundary of the file.
答案:D
解析:
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
--说明数据库是open的
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /home/oracle/lebaishi
Oldest online log sequence 98
Current log sequence 100
--说明是非归档的
SQL> select bytes/1024/1024 M from dba_data_files where tablespace_name='USERS';
M
----------
97.5
--看下目前大小
SQL> alter database datafile '/u01/oracle/oradata/wahaha3/users01.dbf' resize 90M;
alter database datafile '/u01/oracle/oradata/wahaha3/users01.dbf' resize 90M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value
--看这个提示,说明目前占用的已经超过了90M
SQL> alter database datafile '/u01/oracle/oradata/wahaha3/users01.dbf' resize 95M;
Database altered.
--调整成95
SQL> select bytes/1024/1024 M,online_status from dba_data_files where tablespace_name='USERS';
M ONLINE_
---------- -------
95 ONLINE
--验证成功
说明:A,B,C是错误的
ALTER DATABASE DATAFILE '/remorse/sales.dbf' RESIZE 150M;
Which statement is true about this command?
A.The command must be issued in MOUNT state.
B.The command succeeds only if the data file is offline.
C.The command must be issued when the database is in the archivelog mode.
D.The command succeeds if no extent in the tablespace is currently allocated above the 150 MB boundary of the file.
答案:D
解析:
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
--说明数据库是open的
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /home/oracle/lebaishi
Oldest online log sequence 98
Current log sequence 100
--说明是非归档的
SQL> select bytes/1024/1024 M from dba_data_files where tablespace_name='USERS';
M
----------
97.5
--看下目前大小
SQL> alter database datafile '/u01/oracle/oradata/wahaha3/users01.dbf' resize 90M;
alter database datafile '/u01/oracle/oradata/wahaha3/users01.dbf' resize 90M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value
--看这个提示,说明目前占用的已经超过了90M
SQL> alter database datafile '/u01/oracle/oradata/wahaha3/users01.dbf' resize 95M;
Database altered.
--调整成95
SQL> select bytes/1024/1024 M,online_status from dba_data_files where tablespace_name='USERS';
M ONLINE_
---------- -------
95 ONLINE
--验证成功
说明:A,B,C是错误的
相关文章推荐
- mysql5.7.12/13在安装新实例时报错:InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero
- You execute the following command to change the status of the SALES tablespace: SQL> ALTER TABLESPAC
- InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
- 94.You plan to move data from a flat file to a table in your database. You decide to use SQL*Loader
- 75.Your test database is configured to run in NOARCHIVELOG mode. One of the data files in the USERS
- 126.Identify the two situations in which you use the alert log file in your database to check the de
- 144.You execute the following command to change the status of the SALES tablespace: SQL> ALTER TABLE
- InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pa
- ccah-500 第45题 You want to minimize the chance of data loss in your cluster. What should you do
- 13.You have executed this command to change the size of the database buffer cache:
- Source Insight in Ubuntu+Windows+Samba:has been changed outside of the editor. Do you want to reload the file?
- How to Take Ownership of a File/Folder Using Command-Line in Windows 7 or newer version System
- how to get the space size of some tables in one database?
- Saving data to a file in your Android application
- 133 You want to enable automatic PGA memory management in your database. Which setting is required t
- How to reduce the size of logging database OR How to purge the old data from Logging Database
- how to get the space size of some tables in one database?
- 8 Types Of Friends You Need To Have in Your Life
- In order to run a trace against SQL Server you must be a member of sysadmin fixed server role or have the ALTER TRACE permission.
- How to get the Diagnostic data and debug file of Sales Order pick release