吉林大学大型数据库设计与实现dba-15.ppt
ManagingUsers
ObjectivesAftercompletingthislesson,youshouldbeabletodothefollowing:CreatenewdatabaseusersAlteranddropexistingdatabaseusersMonitorinformationaboutexistingusers
Account
lockingTablespace
quotasTemporarytablespaceDefaulttablespaceRoleprivilegesResourcelimitsSecuritydomainDirectprivilegesAuthenticationmechanismUsersandSecurity
DatabaseSchemaSchemaObjectsTablesTriggersConstraintsIndexesViewsSequencesStoredprogramunitsSynonymsUser-defineddatatypesDatabaselinksAschemaisanamedcollectionofobjectsAuseriscreated,andacorrespondingschemaiscreatedUsercanbeassociatedonlywithoneschemaUsernameandschemaareoftenusedinterchangeably
ChecklistforCreatingUsersIdentifytablespacesinwhichtheuserneedstostoreobjects.Decideonquotasforeachtablespace.Assignadefaulttablespaceandtemporarytablespace.Createauser.Grantprivilegesandrolestotheuser.
CreatingaNewUser:
DatabaseAuthenticationSettheinitialpassword:CREATEUSERaaronIDENTIFIEDBYsoccerDEFAULTTABLESPACEdataTEMPORARYTABLESPACEtempQUOTA15mONdataPASSWORDEXPIRE;
CreatingaNewUser:
OperatingSystemAuthenticationCREATEUSERaaronIDENTIFIEDEXTERNALLYDEFAULTTABLESPACEUSERSTEMPORARYTABLESPACEtempQUOTA15mONdataPASSWORDEXPIRE;OS_AUTHENT_PREFIXinitializationparameterspecifiestheformatoftheusernamesDefaultstoOPS$
ChangingUserQuotaonTablespaceALTERUSERaaronQUOTA0ONUSERS;
DroppingaUserUsetheCASCADEclausetodropallobjectsintheschemaiftheschemacontainsobjects.UserscurrentlyconnectedtotheOracleservercannotbedropped
DROPUSERaaron;DROPUSERaaronCASCADE;
ObtainingUserInformationInformationaboutuserscanbeobtainedbyqueryingthedatadictionary.DBA_USERSDBA_TS_QUOTAS
SummaryInthislesson,youshouldhavelearnedhowto:CreateusersspecifyingtheappropriatepasswordmechanismControlusageofspacebyusers
Practice15OverviewThispracticecoversthefollowingtopics: