您的位置:首页 > 其它

ORA-00988: missing or invalid password(s)

2016-03-17 22:22 363 查看
创建账号或修改账号密码时有可能会遇到ORA-00988:missingorinvalidpassword(s),那么什么情况下会遇到这种错误呢?一般是因为密码的设置不符合命名规范:1:密码是关键字,但是没有用双引号包裹起来。2:密码以数字开头,但是没有用双引号包裹起来3:密码包含特殊字符,并且没有用双引号包裹起来。官方文档关于passwor的介绍如下:TheBYpasswordclauseletsyoucreatesalocaluserandindicatesthattheusermustspecifypasswordtologontothedatabase.Passwordscancontainonlysingle-bytecharactersfromyourdatabasecharactersetregardlessofwhetherthecharactersetalsocontainsmultibytecharacters.Passwordsmustfollowtherulesdescribedinthesection"SchemaObjectNamingRules",unlessyouareusingtheOracleDatabasepasswordcomplexityverificationroutine.Thatroutinerequiresamorecomplexcombinationofcharactersthanthenormalnamingrulespermit.YouimplementthisroutinewiththeUTLPWDMG.SQLscript,whichisfurtherdescribedinOracleDatabaseSecurityGuide.而SchemaObjectNamingRules就包含下面这些规则。MoreusernamesthanpasswordswerespecifiedinaGRANTstatement.AvalidpasswordmustbespecifiedforeachusernamelistedintheGRANTstatement.ThiserrorindicatesthatyouareviolatingtheobjectnamesandqualifiersforOracle.Thefollowingrulesapplywhennamingobjects:1)Namesmustbefrom1-30characterslongwiththeexceptions:-Namesofdatabasearelimitedto8characters.-Namesofdatabaselinkscanbeaslongas128characters.2)Namescannotcontainquotationmarks.3)Namesarenotcase-sensitive.(注意,这条只适用于ORACLE10g)4)Anamemustbeginwithandcontainanalphanumericcharacterfromyourdatabasecharactersetunlesssurroundedbydoublequotationmarks.5)Oraclestronglydiscouragesusing$and#.下面我们通过几个案例来了解一下上面的内容吧1:密码是关键字,但是没有用双引号。

SQL>createusertestidentifiedbytable;
createusertestidentifiedbytable
*
ERRORatline1:
ORA-00988:missingorinvalidpassword(s)
SQL>createusertestidentifiedby'table';
createusertestidentifiedby'table'
*
ERRORatline1:
ORA-00988:missingorinvalidpassword(s)
SQL>createusertestidentifiedby"table";
Usercreated.




2:密码以数字开头,但是没有使用双引号

SQL>createusertestidentifiedby123456;
createusertestidentifiedby123456
*
ERRORatline1:
ORA-00988:missingorinvalidpassword(s)
SQL>createusertestidentifiedby'123456';
createusertestidentifiedby'123456'
*
ERRORatline1:
ORA-00988:missingorinvalidpassword(s)
SQL>createusertestidentifiedby"123456";
Usercreated.




3:密码包含特殊字符,并且没有用双引号。

SQL>dropusertest;
Userdropped.
SQL>createusertestidentifiedbyk*123$6;
createusertestidentifiedbyk*123$6
*
ERRORatline1:
ORA-00922:missingorinvalidoption
SQL>createusertestidentifiedby'k*123$6';
createusertestidentifiedby'k*123$6'
*
ERRORatline1:
ORA-00988:missingorinvalidpassword(s)
SQL>createusertestidentifiedby"k*123$6";
Usercreated.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: