仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1001|回复: 8
打印 上一主题 下一主题

[学习教程] MYSQL教程之Oracle经常使用数据字典

[复制链接]
兰色精灵 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 22:43:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
对免费版的用户也具有充足的支持服务。在dev.mysql.com上,一个大型的MySQL学习教程强大社区用户和开发者可以讨论所有关于MySQL的事情。这个站点拥有博客、指南、视频、技术交流会、白皮书和论坛等方式的交流。oracle|数据佚名InterNet到场工夫:2003-7-20
以下表格中搜集了Oracle数据字典中几近一切的视图或别号,至于每一个视图或别号的字段请用‘Describe’语句来查询。

  定名申明:

  Oracle数据字典中,工具称号多半以"USER.","ALL.","DBA."为前缀"USER."视图中纪录一般纪录实行查询的帐户所具有的工具的信息,"ALL."视图中纪录包含"USER"纪录和受权至PUBLIC或用户的工具的信息,"DBA."视图包括一切数据库工具,而不论其一切者。

  利用举例:

  select*fromdba_data_files

  查询表空间的信息(以后用户必需具有DBA脚色)。

  selectowner,object_name,object_typefromall_objects

  查询某一用户下的一切表、历程、函数等信息。


视图名

形貌
ALL_CATALOGAlltables,views,synonyms,sequencesaccessibletotheuserALL_COL_COMMENTSCommentsoncolumnsofaccessibletablesandviewsALL_COL_GRANTS_MADEGrantsoncolumnsforwhichtheuserisownerorgrantorALL_COL_GRANTS_RECDGrantsoncolumnsforwhichtheuserorPUBLICisthegranteeALL_COL_PRIVSGrantsoncolumnsforwhichtheuseristhegrantor,grantee,owner,oranenabledroleorPUBLICisthegranteeALL_COL_PRIVS_MADEGrantsoncolumnsforwhichtheuserisownerorgrantorALL_COL_PRIVS_RECDGrantsoncolumnsforwhichtheuser,PUBLICorenabledroleisthegranteeALL_CONSTRAINTSConstraintdefinitionsonaccessibletablesALL_CONS_COLUMNSInformationaboutaccessiblecolumnsinconstraintdefinitionsALL_DB_LINKSDatabaselinksaccessibletotheuserALL_DEF_AUDIT_OPTSAuditingoptionsfornewlycreatedobjectsALL_DEPENDENCIESDependenciestoandfromobjectsaccessibletotheuserALL_ERRORSCurrenterrorsonstoredobjectsthatuserisallowedtocreateALL_INDEXESDescriptionsofindexesontablesaccessibletotheuserALL_IND_COLUMNSCOLUMNscomprisingINDEXesonaccessibleTABLESALL_OBJECTSObjectsaccessibletotheuserALL_REFRESHAlltherefreshgroupsthattheusercantouchALL_REFRESH_CHILDRENAlltheobjectsinrefreshgroups,wheretheusercantouchthegroupALL_SEQUENCESDescriptionofSEQUENCEsaccessibletotheuserALL_SNAPSHOTSSnapshotstheusercanlookatALL_SOURCECurrentsourceonstoredobjectsthatuserisallowedtocreateALL_SYNONYMSAllsynonymsaccessibletotheuserALL_TABLESDescriptionoftablesaccessibletotheuserALL_TAB_COLUMNSColumnsofalltables,viewsandclustersALL_TAB_COMMENTSCommentsontablesandviewsaccessibletotheuserALL_TAB_GRANTS_MADEUsersgrantsandgrantsonusersobjectsALL_TAB_GRANTS_RECDGrantsonobjectsforwhichtheuserorPUBLICisthegranteeALL_TAB_PRIVSGrantsonobjectsforwhichtheuseristhegrantor,grantee,owner,oranenabledroleorPUBLICisthegranteeALL_TAB_PRIVS_MADEUsersgrantsandgrantsonusersobjectsALL_TAB_PRIVS_RECDGrantsonobjectsforwhichtheuser,PUBLICorenabledroleisthegranteeALL_TRIGGERSTriggersaccessibletothecurrentuserALL_TRIGGER_COLSColumnusageinuserstriggersorintriggersonuserstablesALL_USERSInformationaboutallusersofthedatabaseALL_VIEWSTextofviewsaccessibletotheuserUSER_AUDIT_CONNECTAudittrailentriesforuserlogons/logoffsUSER_AUDIT_OBJECTAudittrailrecordsforstatementsconcerningobjects,specifically:table,cluster,view,index,sequence,[public]databaselink,[public]synonym,procedure,trigger,rollbacksegment,tablespace,role,userUSER_AUDIT_SESSION USER_AUDIT_STATEMENTAudittrailrecordsconcerninggrant,revoke,audit,noauditandaltersystemUSER_AUDIT_TRAILAudittrailentriesrelevanttotheuserUSER_CATALOGTables,Views,SynonymsandSequencesownedbytheuserUSER_CLUSTERSDescriptionsofusersownclustersUSER_CLU_COLUMNSMappingoftablecolumnstoclustercolumnsUSER_COL_COMMENTSCommentsoncolumnsofuserstablesandviewsUSER_COL_GRANTSGrantsoncolumnsforwhichtheuseristheowner,grantororgranteeUSER_COL_GRANTS_MADEAllgrantsoncolumnsofobjectsownedbytheuserUSER_COL_GRANTS_RECDGrantsoncolumnsforwhichtheuseristhegranteeUSER_COL_PRIVSGrantsoncolumnsforwhichtheuseristheowner,grantororgranteeUSER_COL_PRIVS_MADEAllgrantsoncolumnsofobjectsownedbytheuserUSER_COL_PRIVS_RECDGrantsoncolumnsforwhichtheuseristhegranteeUSER_CONSTRAINTSConstraintdefinitionsonusersowntablesUSER_CONS_COLUMNSInformationaboutaccessiblecolumnsinconstraintdefinitionsUSER_CROSS_REFSCrossreferencesforusersviewsandsynonymsUSER_DB_LINKSDatabaselinksownedbytheuserUSER_DEPENDENCIESDependenciestoandfromausersobjectsUSER_ERRORSCurrenterrorsonstoredobjectsownedbytheuserUSER_EXTENTSExtentscomprisingsegmentsownedbytheuserUSER_FREE_SPACEFreeextentsintablespacesaccessibletotheuserUSER_INDEXESDescriptionoftheusersownindexesUSER_IND_COLUMNSCOLUMNscomprisingusersINDEXesoronusersTABLESUSER_JOBSAlljobsownedbythisuserUSER_OBJECTSObjectsownedbytheuserUSER_OBJECT_SIZESizes,inbytes,ofvariouspl/sqlobjectsUSER_OBJ_AUDIT_OPTSAuditingoptionsforusersowntablesandviewsUSER_REFRESHAlltherefreshgroupsUSER_REFRESH_CHILDRENAlltheobjectsinrefreshgroups,wheretheuserownstherefreshgroupUSER_RESOURCE_LIMITSDisplayresourcelimitoftheuserUSER_ROLE_PRIVSRolesgrantedtocurrentuserUSER_SEGMENTSStorageallocatedforalldatabasesegmentsUSER_SEQUENCESDescriptionoftheusersownSEQUENCEsUSER_SNAPSHOTSSnapshotstheusercanlookatUSER_SNAPSHOT_LOGSAllsnapshotlogsownedbytheuserUSER_SOURCESourceofstoredobjectsaccessibletotheuserUSER_SYNONYMSTheusersprivatesynonymsUSER_SYS_PRIVSSystemprivilegesgrantedtocurrentuserUSER_TABLESDescriptionoftheusersowntablesUSER_TABLESPACESDescriptionofaccessibletablespacesUSER_TAB_AUDIT_OPTSAuditingoptionsforusersowntablesandviewsUSER_TAB_COLUMNSColumnsofuserstables,viewsandclustersUSER_TAB_COMMENTSCommentsonthetablesandviewsownedbytheuserUSER_TAB_GRANTSGrantsonobjectsforwhichtheuseristheowner,grantororgranteeUSER_TAB_GRANTS_MADEAllgrantsonobjectsownedbytheuserUSER_TAB_GRANTS_RECDGrantsonobjectsforwhichtheuseristhegranteeUSER_TAB_PRIVSGrantsonobjectsforwhichtheuseristheowner,grantororgranteeUSER_TAB_PRIVS_MADEAllgrantsonobjectsownedbytheuserUSER_TAB_PRIVS_RECDGrantsonobjectsforwhichtheuseristhegranteeUSER_TRIGGERSTriggersownedbytheuserUSER_TRIGGER_COLSColumnusageinuserstriggersUSER_TS_QUOTASTablespacequotasfortheuserUSER_USERSInformationaboutthecurrentuserUSER_VIEWSTextofviewsownedbytheuserAUDIT_ACTIONSDescriptiontableforaudittrailactiontypecodes.MapsactiontypenumberstoactiontypenamesCOLUMN_PRIVILEGESGrantsoncolumnsforwhichtheuseristhegrantor,grantee,owner,oranenabledroleorPUBLICisthegranteeDICTIONARYDescriptionofdatadictionarytablesandviewsDICT_COLUMNSDescriptionofcolumnsindatadictionarytablesandviewsDUAL GLOBAL_NAMEglobaldatabasenameINDEX_HISTOGRAMstatisticsonkeyswithrepeatcountINDEX_STATSstatisticsontheb-treeRESOURCE_COSTCostforeachresourceROLE_ROLE_PRIVSRoleswhicharegrantedtorolesROLE_SYS_PRIVSSystemprivilegesgrantedtorolesROLE_TAB_PRIVSTableprivilegesgrantedtorolesSESSION_PRIVSPrivilegeswhichtheusercurrentlyhassetSESSION_ROLESRoleswhichtheusercurrentlyhasenabled.TABLE_PRIVILEGESGrantsonobjectsforwhichtheuseristhegrantor,grantee,owner,oranenabledroleorPUBLICisthegranteeACCESSIBLE_COLUMNSSynonymforALL_TAB_COLUMNSALL_COL_GRANTSSynonymforCOLUMN_PRIVILEGESALL_JOBSSynonymforUSER_JOBSALL_TAB_GRANTSSynonymforTABLE_PRIVILEGESCATSynonymforUSER_CATALOGCLUSynonymforUSER_CLUSTERSCOLSSynonymforUSER_TAB_COLUMNSDBA_AUDIT_CONNECTSynonymforUSER_AUDIT_CONNECTDBA_AUDIT_RESOURCESynonymforUSER_AUDIT_RESOURCEDBA_REFRESH_CHILDRENSynonymforUSER_REFRESH_CHILDRENDICTSynonymforDICTIONARYINDSynonymforUSER_INDEXESOBJSynonymforUSER_OBJECTSSEQSynonymforUSER_SEQUENCESSM$VERSIONSynonymforSM_$VERSIONSYNSynonymforUSER_SYNONYMSTABSSynonymforUSER_TABLESV$ACCESSSynonymforV_$ACCESSV$ARCHIVESynonymforV_$ARCHIVEV$BACKUPSynonymforV_$BACKUPV$BGPROCESSSynonymforV_$BGPROCESSV$CIRCUITSynonymforV_$CIRCUITV$COMPATIBILITYSynonymforV_$COMPATIBILITYV$COMPATSEGSynonymforV_$COMPATSEGV$CONTROLFILESynonymforV_$CONTROLFILEV$DATABASESynonymforV_$DATABASEV$DATAFILESynonymforV_$DATAFILEV$DBFILESynonymforV_$DBFILEV$DBLINKSynonymforV_$DBLINKV$DB_OBJECT_CACHESynonymforV_$DB_OBJECT_CACHEV$DISPATCHERSynonymforV_$DISPATCHERV$ENABLEDPRIVSSynonymforV_$ENABLEDPRIVSV$FILESTATSynonymforV_$FILESTATV$FIXED_TABLESynonymforV_$FIXED_TABLEV$LATCHSynonymforV_$LATCHV$LATCHHOLDERSynonymforV_$LATCHHOLDERV$LATCHNAMESynonymforV_$LATCHNAMEV$LIBRARYCACHESynonymforV_$LIBRARYCACHEV$LICENSESynonymforV_$LICENSEV$LOADCSTATSynonymforV_$LOADCSTATV$LOADTSTATSynonymforV_$LOADTSTATV$LOCKSynonymforV_$LOCKV$LOGSynonymforV_$LOGV$LOGFILESynonymforV_$LOGFILEV$LOGHISTSynonymforV_$LOGHISTV$LOG_HISTORYSynonymforV_$LOG_HISTORYV$MLS_PARAMETERSSynonymforV_$MLS_PARAMETERSV$MTSSynonymforV_$MTSV$NLS_PARAMETERSSynonymforV_$NLS_PARAMETERSV$NLS_VALID_VALUESSynonymforV_$NLS_VALID_VALUESV$OPEN_CURSORSynonymforV_$OPEN_CURSORV$OPTIONSynonymforV_$OPTIONV$PARAMETERSynonymforV_$PARAMETERV$PQ_SESSTATSynonymforV_$PQ_SESSTATV$PQ_SLAVESynonymforV_$PQ_SLAVEV$PQ_SYSSTATSynonymforV_$PQ_SYSSTATV$PROCESSSynonymforV_$PROCESSV$QUEUESynonymforV_$QUEUEV$RECOVERY_LOGSynonymforV_$RECOVERY_LOGV$RECOVER_FILESynonymforV_$RECOVER_FILEV$REQDISTSynonymforV_$REQDISTV$RESOURCESynonymforV_$RESOURCEV$ROLLNAMESynonymforV_$ROLLNAMEV$ROLLSTATSynonymforV_$ROLLSTATV$ROWCACHESynonymforV_$ROWCACHEV$SESSIONSynonymforV_$SESSIONV$SESSION_CURSOR_CACHESynonymforV_$SESSION_CURSOR_CACHEV$SESSION_EVENTSynonymforV_$SESSION_EVENTV$SESSION_WAITSynonymforV_$SESSION_WAITV$SESSTATSynonymforV_$SESSTATV$SESS_IOSynonymforV_$SESS_IOV$SGASynonymforV_$SGAV$SGASTATSynonymforV_$SGASTATV$SHARED_SERVERSynonymforV_$SHARED_SERVERV$SQLAREASynonymforV_$SQLAREAV$STATNAMESynonymforV_$STATNAMEV$SYSSTATSynonymforV_$SYSSTATV$SYSTEM_CURSOR_CACHESynonymforV_$SYSTEM_CURSOR_CACHEV$SYSTEM_EVENTSynonymforV_$SYSTEM_EVENTV$THREADSynonymforV_$THREADV$TIMERSynonymforV_$TIMERV$TRANSACTIONSynonymforV_$TRANSACTIONV$TYPE_SIZESynonymforV_$TYPE_SIZEV$VERSIONSynonymforV_$VERSIONV$WAITSTATSynonymforV_$WAITSTATV$_LOCKSynonymforV_$_LOCK
解决方案提供商开始推动DBaaS浪潮之前,他们应该深入了解究竟什么是DBaaS。
若天明 该用户已被删除
沙发
发表于 2015-1-19 21:50:08 | 只看该作者
至于淘汰的问题,只能说在你的项目周期之内,微软应该都不会倒闭。
老尸 该用户已被删除
板凳
发表于 2015-1-27 22:20:52 | 只看该作者
groupby子句可以将查询结果分组,并返回行的汇总信息Oracle按照groupby子句中指定的表达式的值分组查询结果。
小魔女 该用户已被删除
地板
发表于 2015-2-5 11:21:23 | 只看该作者
我们学到了什么?思考问题的时候从表的角度来思考问
分手快乐 该用户已被删除
5#
发表于 2015-2-11 12:43:47 | 只看该作者
不好!如果出了错;不好调试;不好处理!其实web开发将代码分为3层:web层;业务逻辑层和数据访问层;一般对数据库的操作都在数据访问层来做;这样便于调试和维护!而且将来如果是换了数据库的话;你只需要改数据层的代码;其他层的基本可以不变!要是你在jsp中直接调用sql数据库;那么如果换了数据库呢?岂不都要改?如果报了异常呢?怎么做异常处理?
飘灵儿 该用户已被删除
6#
发表于 2015-3-2 12:22:16 | 只看该作者
Mirror可以算是SQLServer的Dataguard了。但是能不能被大伙用起来就不知道了。
金色的骷髅 该用户已被删除
7#
发表于 2015-3-11 03:30:41 | 只看该作者
呵呵,这就是偶想说的
莫相离 该用户已被删除
8#
发表于 2015-3-17 19:35:09 | 只看该作者
分区表是个亮点!从分区表也能看出微软要做大作强SQLServer的信心。资料很多,这里不详细说。但是重点了解的是:现在的SQLServer2005的表,都是默认为分区表的。因为它要支持滑动窗口的这个特性。这种特性对历史数据和实时数据的处理是很有帮助的。
若相依 该用户已被删除
9#
发表于 2015-3-24 22:27:29 | 只看该作者
其中最有名的应该是row_number了。这个终于解决了用临时表生成序列号的历史,而且SQLServer2005的row_number比Oracle的更先进。因为它把Orderby集成到了一起,不用像Oracle那样还要用子查询进行封装。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-12-29 23:28

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表