freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

21天學(xué)通oracle課后答案解析[第三版]-文庫吧

2025-06-13 07:24 本頁面


【正文】 reserved.Connected to: Oracle Database 10g Enterprise Edition Release ProductionWith the Partitioning, OLAP and Data Mining optionsExport file created by EXPORT: via conventional pathimport done in ZHS16GBK character set and AL16UTF16 NCHAR character set. importing SYSTEM39。s objects into SYSTEM. . importing table USERS 2 rows importedImport terminated successfully without warnings.3.如果數(shù)據(jù)庫處于歸檔模式,那么,隨著時間的累積,歸檔日志將會占用很大空間。一旦達到默認大小20G,那么將導(dǎo)致數(shù)據(jù)庫掛起,在告警日志中一般會有如下提示:ORA00257: archiver error. Connect internal only, until freed。利用修改參數(shù)db_recovery_file_dest_size的方式,快速解決數(shù)據(jù)庫無法歸檔的問題。1)查看默認空間大小SQL show parameter db_recovery_file_dest_sizeNAME TYPE VALUE db_recovery_file_dest_size big integer 2G2)修改其大小SQL alter system set db_recovery_file_dest_size=3G scope=both。System altered.這一用法,適合于快速處理現(xiàn)場由于歸檔日志過大導(dǎo)致的數(shù)據(jù)庫掛起。第5章 Oracle數(shù)據(jù)表對象1.創(chuàng)建一個表空間testsize,其數(shù)據(jù)文件大小為2M,并設(shè)置自動增長尺寸為1M。在表空間中建立一個數(shù)據(jù)表,并向其中插入大量數(shù)據(jù),觀察表空間文件的變化。1)創(chuàng)建一個大小為2M,自動增長尺寸為1M的表空間SQL create tablespace testsize datafile 39。e:\database\oracle\39。 size 2M 2 autoextend on next 1M 3 / Tablespace created2)創(chuàng)建一個數(shù)據(jù)表test_tablespace_size(test_data varchar2(100))SQL create table test_tablespace_size(test_data varchar2(100)) tablespace testsize。 Table created3)利用如下SQL語句向表test_tablespace_size中插入數(shù)據(jù)SQL begin 2 for i in 1..100000 loop 3 insert into test_tablespace_size values(39。012345678939。)。 4 end loop。 5 mit。 6 end。 7 / PL/SQL procedure successfully pleted4)此時。2.刪除表空間testsize,同時刪除其物理文件。刪除表空間應(yīng)該使用drop tablespace命令,同時刪除物理文件,應(yīng)使用including contents and datafiles。SQL drop tablespace testsize including contents and datafiles。Tablespace dropped.3.在數(shù)據(jù)庫中創(chuàng)建一個表test_bak,并向其中插入10條記錄。利用exp/imp命令來實現(xiàn)該數(shù)據(jù)表的備份/恢復(fù)。1)在數(shù)據(jù)庫中創(chuàng)建表test_bak(id number)。SQL create table test_bak(id number)。 Table created2)向其中插入10條數(shù)據(jù)。SQL begin 2 for i in 1..10 loop 3 insert into test_bak values(i)。 4 end loop。 5 end。 6 / PL/SQL procedure successfully pletedSQL mit。 Commit plete3)利用exp命令備份該表C:\exp system/abc123@//(test_bak) file=39。d:/39。Export: Release Production on 星期六 7月 16 14:51:54 2011Copyright (c) 1982, 2004, Oracle. All rights reserved.Connected to: Oracle Database 10g Enterprise Edition Release ProductionWith the Partitioning, OLAP and Data Mining optionsExport done in ZHS16GBK character set and AL16UTF16 NCHAR character setAbout to export specified tables via Conventional Path .... . exporting table TEST_BAK 10 rows exportedExport terminated successfully without warnings..4)在數(shù)據(jù)庫中刪除表test_bak。SQL drop table test_bak。 Table dropped5)將表test_bak重新導(dǎo)入數(shù)據(jù)庫C:\imp system/abc123@//(test_bak) file=39。d:/39。Import: Release Production on 星期六 7月 16 14:54:24 2011Copyright (c) 1982, 2004, Oracle. All rights reserved.Connected to: Oracle Database 10g Enterprise Edition Release ProductionWith the Partitioning, OLAP and Data Mining optionsExport file created by EXPORT: via conventional pathimport done in ZHS16GBK character set and AL16UTF16 NCHAR character set. importing SYSTEM39。s objects into SYSTEM. . importing table TEST_BAK 10 rows importedImport terminated successfully without warnings.6)重新查詢表test_bakSQL select * from test_bak。 ID 1 2 3 4 5 6 7 8 9 10 10 rows selected第6章 約束1.查看表customers的主鍵狀況,如果有,則重建其主鍵,如果沒有,選擇其中一列創(chuàng)建主鍵。1)利用如下SQL語句查看表customers的主鍵狀況:SQL select table_name, constraint_name, constraint_type, status from user_constraints 2 where table_name = 39。CUSTOMERS39。 and constraint_type=39。P39。 TABLE_NAME CONSTRAINT_NAME CONSTRAINT_TYPE STATUS CUSTOMERS SYS_C005015 P ENABLED2)此時,在已有主鍵的情況下,首先刪除主鍵SYS_C005015。SQL alter table customers drop primary key。 alter table customers drop primary key ORA02273: this unique/primary key is referenced by some foreign keys3)表customers中的主鍵與其他表的外鍵關(guān)聯(lián),可以利用cascade選項來刪除關(guān)聯(lián)約束。SQL alter table customers drop primary key cascade。 Table altered4)重新創(chuàng)建基于列customer_id的主鍵。SQL alter table customers add primary key(customer_id)。 Table altered2.在數(shù)據(jù)庫中,創(chuàng)建表country(country_id, country_name)、city(city_id, country_id,city_name)。1)創(chuàng)建表country和citySQL create table country(country_id number, country_name varchar2(50))。 Table created SQL create table city(city_id number, city_name varchar2(50), country_id number)。 Table created2)在表country的country_id列上創(chuàng)建主鍵約束SQL alter table country add primary key(country_id)。 Table altered3)在表city上創(chuàng)建country_id到表country(country_id)的外鍵關(guān)聯(lián)SQL alter table city add foreign key (country_id) references country(country_id)。 Table altered3.驗證所建外鍵關(guān)聯(lián)的作用。1)嘗試向表city中添加城市信息。SQL insert into city (city_id, city_name, country_id) values (1, 39。北京39。, 1)。 insert into city (city_id, city_name, country_id) values (1, 39。北京39。, 1) ORA02291: integrity constraint () violated parent key not found由于表country中并不存在country_id為1的值,因此,將導(dǎo)致添加失敗。2)向表country中添加country_id為1的信息。SQL insert into country values(1, 39。中國39。)。 1 row inserted3)再次為表citry添加城市信息。SQL insert into city (city_id, city_name, country_id) values (1, 39。北京39。, 1)。 1 row inserted第7章 視圖1.在數(shù)據(jù)庫中不存在表animals(animal_id, animal_name, animal_type)的情況下,強制創(chuàng)建視圖vw_animal_cat(animal_id, animal_name)。該視圖中,僅含有animal_type=’cat’的貓科動物的信息。SQL create or replace force view vw_animal_cat(animal_id, animal_name) 2 as 3 select animal_id, animal_name, animal_type from animals where ainmal_type=39。cat39。 4 / Warning: View created with pilation errors2.創(chuàng)建一個物化視圖mv
點擊復(fù)制文檔內(nèi)容
外語相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1