设置service_names如果超过255个字符,就会报错ORA-32021: parameter value longer than 255 characters,
1 2 3 4 5 6 7 8 |
SQL> ALTER SYSTEM SET SERVICE_NAMES='oracleblog.org, jimmy.oracleblog.org, jimmy.he.oracleblog.org, hejianmin.oracleblog.org, he.jian.min.oracleblog.org, jimmy_he_oracleblog.org, jimmy_he_he.jian_min.oracleblog.org, jian_min_he.jimmy.oracleblog.org, jimmy.he.he_jianmin.oracleblog.org, jimmyhe_hejianmin.oracleblog.org, jimmy.he.he.jianmin.oracleblog.org' scope=both; ALTER SYSTEM SET SERVICE_NAMES='oracleblog.org, jimmy.oracleblog.org, jimmy.he.oracleblog.org, hejianmin.oracleblog.org, he.jian.min.oracleblog.org, jimmy_he_oracleblog.org, jimmy_he_he.jian_min.oracleblog.org, jian_min_he.jimmy.oracleblog.org, jimmy.he.he_jianmin.oracleblog.org, jimmyhe_hejianmin.oracleblog.org, jimmy.he.he.jianmin.oracleblog.org' scope=both * ERROR at line 1: ORA-32021: parameter value longer than 255 characters SQL> |
虽然可以通过dbms_service包来创建和修改service,使其超过255个字符,但是用这个包创建的service重启后,这些service需要dbms_service.start_service逐个拉起来,需要手工操作或者写logon trigger。
其实可以用’xxx’,’yyy’,’zzz’来替换’xxx,yyy,zzz’:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
SQL> ALTER SYSTEM SET SERVICE_NAMES='oracleblog.org', 'jimmy.oracleblog.org', 'jimmy.he.oracleblog.org', 'hejianmin.oracleblog.org', 'he.jian.min.oracleblog.org', 'jimmy_he_oracleblog.org', 'jimmy_he_he.jian_min.oracleblog.org', 'jian_min_he.jimmy.oracleblog.org', 'jimmy.he.he_jianmin.oracleblog.org', 'jimmyhe_hejianmin.oracleblog.org', 'jimmy.he.he.jianmin.oracleblog.org' scope=both; System altered. SQL> SQL> show parameter service_names NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string oracleblog.org, jimmy.oraclebl og.org, jimmy.he.oracleblog.or g, hejianmin.oracleblog.org, h e.jian.min.oracleblog.org, jim my_he_oracleblog.org, jimmy_he _he.jian_min.oracleblog.org, j ian_min_he.jimmy.oracleblog.or g, jimmy.he.he_jianmin.oracleb log.org, jimmyhe_hejianmin.ora cleblog.org, jimmy.he.he.jianm in.oracleblog.org SQL> SQL> SQL> SQL> |