谨慎修改Oracle数据库字符集(UTF8<->ZHS16GBK)
| Hostname | IP | Linux Version | Oracle Database | SID |
| ogg | 192.168.1.20 | RHEL 5.7 | 11.2.0.1 | ogg |
SQL> set line pages
SQL> col value for a40
SQL> select * from nls_database_parameters; PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS16GBK
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.2.0.1. rows selected. SQL> select userenv('language') from dual; USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK
SQL> col file_name for a60
SQL> col tablespace_name for a30
SQL> select file_name,tablespace_name,bytes// from dba_data_files; FILE_NAME TABLESPACE_NAME BYTES//
------------------------------------------------------------ ------------------------------ ---------------
/u01/app/oracle/oradata/ogg/system01.dbf SYSTEM
/u01/app/oracle/oradata/ogg/sysaux01.dbf SYSAUX
/u01/app/oracle/oradata/ogg/undotbs01.dbf UNDOTBS1
/u01/app/oracle/oradata/ogg/zlm01.dbf ZLM SQL> create user zlm identified by zlm default tablespace zlm; User created. SQL> grant dba to zlm; Grant succeeded.
SQL> conn zlm/zlm
Connected.
SQL> create table zlm.test_charset(
id number,
name varchar2(),
primary key(id)
); Table created. SQL> insert into zlm.test_charset(id,name) values(,'黎明'); row created. SQL> commit; Commit complete. SQL> select * from test_charset; ID NAME
---------- ----------
黎明 SQL> select length('黎'),length('明') from dual; LENGTH('黎') LENGTH('明')
------------ ------------ SQL> select lengthb('黎'),lengthb('明') from dual; LENGTHB('黎') LENGTHB('明')
------------- ------------- //ZHS16GBK character set occupies 2 byte to store one Chinese character here.
//Be aware of the difference of length() function between MySQL and Oracle.
//In MySQL,length() returns bytes instead of characters.
SQL> select *from dba_directories; OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS ORACLE_OCM_CONFIG_DIR
/u01/app/oracle/product/11.2./db_1/ccr/state SYS DATA_PUMP_DIR
/u01/app/oracle/admin/ogg/dpdump/ SYS XMLDIR
/u01/app/oracle/product/11.2./db_1/rdbms/xml SQL> create directory datapump as '/u01/'; Directory created. SQL> grant read,write on directory datapump to zlm;
grant read,write on directory datapump to zlm
*
ERROR at line :
ORA-: you may not GRANT/REVOKE privileges to/from yourself SQL> conn / as sysdba
Connected.
SQL> grant read,write on directory datapump to zlm; Grant succeeded. SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option
[oracle@ogg ~]$ expdp zlm/zlm directory=datapump dumpfile=zlm_datapump_`date +%Y%m%d`.dmp logfile=zlm_datapump_`date +%Y%m%d`.log schemas=zlm Export: Release 11.2.0.1. - Production on Wed Jul :: Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option
Starting "ZLM"."SYS_EXPORT_SCHEMA_01": zlm/******** directory=datapump dumpfile=zlm_datapump_20180711.dmp logfile=zlm_datapump_20180711.log schemas=zlm
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
. . exported "ZLM"."TEST_CHARSET" 5.414 KB 1 rows
Master table "ZLM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for ZLM.SYS_EXPORT_SCHEMA_01 is:
/u01/zlm_datapump_20180711.dmp
Job "ZLM"."SYS_EXPORT_SCHEMA_01" successfully completed at 12:51:31 [oracle@ogg ~]$ cd /u01
[oracle@ogg u01]$ ls -l
total 200
drwxrwxr-x 4 oracle oinstall 4096 May 19 2017 app
drwxrwxr-x 3 oracle oinstall 4096 Mar 29 15:40 arch
drwxrwxr-x 14 oracle oinstall 4096 Feb 7 17:01 ogg
-rw-r----- 1 oracle oinstall 184320 Jul 11 12:51 zlm_datapump_20180711.dmp
-rw-r--r-- 1 oracle oinstall 1500 Jul 11 12:51 zlm_datapump_20180711.log
[oracle@ogg u01]$
SQL> alter database character set utf8;
alter database character set utf8
*
ERROR at line :
ORA-: new character set must be a superset of old character set //Notice!This means that UTF8 is not the superset of ZHS16GBK. SQL> alter database character set internal_use utf8;
alter database character set internal_use utf8
*
ERROR at line :
ORA-: operation requires database is in RESTRICTED mode SQL> shutdown immediate
ORA-: insufficient privileges
SQL> conn / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount exclusive;
ORACLE instance started. Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted.
SQL> alter system enable restricted session; System altered. SQL> alter database open; Database altered. SQL> alter database character set internal_use utf8;
alter database character set internal_use utf8
*
ERROR at line :
ORA-: operation cannot execute when other sessions are active //Exit the other sessions who are active. SQL> alter database character set internal_use utf8; Database altered. SQL>
SQL> set line pages
SQL> col value for a40
SQL> select * from nls_database_parameters; PARAMETER VALUE
------------------------------------------------------------ ----------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.2.0.1. rows selected. SQL> select userenv('language') from dual; USERENV('LANGUAGE')
--------------------------------------------------------------------------------------------------------
AMERICAN_AMERICA.UTF8 SQL>
SQL> conn zlm/zlm
Connected.
SQL> select * from test_charset; ID NAME
---------- --------------------
?? //My client character set of Xshell is still GBK now,change it to utf8 and check again. SQL> select * from test_charset; ID NAME
---------- --------------------
?£¿ //The NLS_LANG variable is still GBK,modify the oracle profile to correct the character set to UTF8. SQL> !
[oracle@ogg u01]$ cat ~/.bash_profile|grep NLS_LANG
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
[oracle@ogg u01]$ vi ~/.bash_profile
[oracle@ogg u01]$ cat ~/.bash_profile|grep NLS_LANG
export NLS_LANG=AMERICAN_AMERICA.UTF8
[oracle@ogg u01]$ . ~/.bash_profile
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.UTF8
[oracle@ogg u01]$ sqlplus zlm/zlm SQL*Plus: Release 11.2.0.1. Production on Wed Jul :: Copyright (c) , , Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option SQL> select * from test_charset; ID NAME
---------- ----------
hķ //It's still messy code here after i've unified the character set with server,client,NLS_LANG.
SQL> show user;
USER is "ZLM"
SQL> conn / as sysdba
Connected.
SQL> drop user zlm cascade;
drop user zlm cascade
*
ERROR at line :
ORA-: cannot drop a user that is currently connected SQL> select sid,serial#,status from v$session where username='ZLM'; SID SERIAL# STATUS
---------- ---------- --------
INACTIVE SQL> alter system kill session '1,7'; System altered. SQL> select sid,serial#,status from v$session where username='ZLM'; SID SERIAL# STATUS
---------- ---------- --------
KILLED SQL> drop user zlm cascade; User dropped. SQL> alter user system identified by 'Passw0rd';
alter user system identified by 'Passw0rd'
*
ERROR at line :
ORA-: missing or invalid password(s) SQL> alter user system identified by Passw0rd; User altered. SQL> !
[oracle@ogg u01]$ ls -l
total
drwxrwxr-x oracle oinstall May app
drwxrwxr-x oracle oinstall Jul : arch
drwxrwxr-x oracle oinstall Feb : ogg
-rw-r----- oracle oinstall Jul : zlm_datapump_20180711.dmp
-rw-r--r-- oracle oinstall Jul : zlm_datapump_20180711.log
[oracle@ogg u01]$ impdp system/Passw0rd directory=datapump dumpfile=zlm_datapump_20180711.dmp Import: Release 11.2.0.1. - Production on Wed Jul :: Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** directory=datapump dumpfile=zlm_datapump_20180711.dmp
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "ZLM"."TEST_CHARSET" 5.414 KB 1 rows
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 15:32:56 [oracle@ogg u01]$
[oracle@ogg u01]$ exit
exit SQL> conn zlm/zlm
ERROR:
ORA-: your session has been killed Connected.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option
[oracle@ogg u01]$ sqlplus zlm/zlm SQL*Plus: Release 11.2.0.1. Production on Wed Jul :: Copyright (c) , , Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option SQL> select * from test_charset; ID NAME
---------- --------------------
hķ SQL> select userenv('language') from dual; USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.UTF8 SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.ZHS16GBK //The NLS_LANG is not equal with the character set in database.
[oracle@ogg u01]$ sed -i 's/ZHS16GBK/UTF8/g' ~/.bash_profile
[oracle@ogg u01]$ cat ~/.bash_profile|grep NLS_LANG
export NLS_LANG=AMERICAN_AMERICA.UTF8
[oracle@ogg u01]$ . ~/.bash_profile
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.UTF8
[oracle@ogg u01]$ sqlplus zlm/zlm SQL*Plus: Release 11.2.0.1. Production on Wed Jul :: Copyright (c) , , Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option SQL> select * from test_charset; ID NAME
---------- ----------
黎明 SQL> select length('黎'),length('明') from dual; LENGTH('黎') LENGTH('明')
------------ ------------ SQL> select lengthb('黎'),lengthb('明') from dual; LENGTHB('黎') LENGTHB('明')
------------- ------------- SQL> //The character set of database has been changed to UTF8 now and the data is either equal with the orgiginal data.
SQL> insert into test_charset values(,'上海');
row created.
SQL> commit;
Commit complete.
SQL> select * from test_charset;
ID NAME
---------- ----------
黎明
上海
SQL> select length('上'),length('海') from dual;
LENGTH('上') LENGTH('海')
------------ ------------
SQL> select lengthb('上'),lengthb('海') from dual;
LENGTHB('上') LENGTHB('海')
------------- -------------
SQL> alter database character set ZHS16GBK;
alter database character set ZHS16GBK
*
ERROR at line :
ORA-: new character set must be a superset of old character set
SQL> alter database character set internal_use ZHS16GBK;
alter database character set internal_use ZHS16GBK
*
ERROR at line :
ORA-: operation requires database is in RESTRICTED mode
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup restrict
ORACLE instance started.
Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted.
Database opened.
SQL> alter database character set internal_use ZHS16GBK;
Database altered.
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK
SQL>
SQL> !
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.UTF8
[oracle@ogg u01]$ sed -i 's/UTF8/ZHS16GBK/g' ~/.bash_profile
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.UTF8
[oracle@ogg u01]$ . ~/.bash_profile
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.ZHS16GBK
[oracle@ogg u01]$ exit
exit SQL> select * from test_charset;
select * from test_charset
*
ERROR at line :
ORA-: table or view does not exist SQL> conn zlm/zlm
Connected.
SQL> select * from test_charset; ID NAME
---------- ------------------------------
姒涘孩妲
娑撳﹥鎹 SQL> //It's messy code now only if you've exported the data with datapump before you change the character set.Unfortunetely,I didn't to that this time.The characters in the test table test_charset has been destroyed.Can it come back again then?
SQL> alter database character set utf8;
alter database character set utf8
*
ERROR at line :
ORA-: new character set must be a superset of old character set SQL> alter database character set internal_use utf8;
alter database character set internal_use utf8
*
ERROR at line :
ORA-: operation requires connection as SYS //It needs sys role privilege to finish the work. SQL> show user;
USER is "ZLM"
SQL> conn / as sysdba
Connected.
SQL> alter database character set internal_use utf8; Database altered. SQL> select * from zlm.test_charset; ID NAME
---------- ----------
榛庢槑
涓婃捣 SQL> select userenv('language') from dual; USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.UTF8 //Character set of database server is UTF8 now. SQL> !
[oracle@ogg u01]$ echo $NLS_LANG
AMERICAN_AMERICA.UTF8 //NLS_LANG is UTF8,too.
[oracle@ogg u01]$ //Character set of client tool has been changed to UTF8 as well.But the data cannot show the correct characters anymore.Have they been really destroyed?
[oracle@ogg ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1. Production on Wed Jul :: Copyright (c) , , Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option SQL> create user aaron8219 identified by aaron8219; User created. SQL> grant session,connect to aaron8219;
grant session,connect to aaron8219
*
ERROR at line :
ORA-: role 'SESSION' does not exist SQL> grant connect,resource to aaron8219; Grant succeeded. SQL> conn aaron8219/aaron8219
ERROR:
ORA-: ORACLE only available to users with RESTRICTED SESSION privilege Warning: You are no longer connected to ORACLE.
SQL>
Supplemented on July 12
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------------------------------
AMERICAN_AMERICA.UTF8
SQL> select * from zlm.test_charset;
ID NAME
---------- --------------------
hķ
ʏº£
SQL> !
[oracle@ogg ~]$ echo $NLS_LANG
AMERICAN_AMERICA.ZHS16GBK
[oracle@ogg ~]$ sed -i 's/ZHS16GBK/UTF8/g' .bash_profile
[oracle@ogg ~]$ cat .bash_profile|grep NLS
export NLS_LANG=AMERICAN_AMERICA.UTF8
[oracle@ogg ~]$ . .bash_profile
[oracle@ogg ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1. Production on Thu Jul ::
Copyright (c) , , Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1. - 64bit Production
With the Partitioning option
SQL> select * from zlm.test_charset;
ID NAME
---------- ----------
黎明
上海
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.UTF8
SQL> select lengthb('上'),lengthb('海') from dual;
LENGTHB('上') LENGTHB('海')
------------- -------------
//Change the character set of client tool to utf8,then the messy code came back again.
SQL> select * from zlm.test_charset;
ID NAME
---------- ----------
榛庢槑
涓婃捣
SQL>
//Actually,the reason why messy code occurs yesterday is due to the discordance between the character set of database,NLS_LANG,client tool.
//Although it proves that the data haven't been destroyed but there's a risk of mismatch of data if you change character set without backing up your whole data.
- "internal_use" can help you to change character set without the constraint of subset to superset.
- Only sys privilege users can login instance while database is running in restrict mode.
- Be aware of ZHS16GBK is not subset of UTF8.It may baffle us most people.
- It's not recommeded to change character set in oracle database which contains Chinese characters.
- Don't forget to backup your data(logically) with datapump before you change the character set.
- Make your character set equal in client tool,NLS_LANG,db server anytime.This is the most important thing to keep in mind.
谨慎修改Oracle数据库字符集(UTF8<->ZHS16GBK)的更多相关文章
- Linux下修改Oracle数据库字符集命令
常见情形:从服务器备份Oracle数据库后再到本地机器上还原Oracle数据库的时候经常会碰见数据库字符编码不一致的情况,可以用以下命令来修改本地的Oracle数据库字符编码,然后顺利还原Oracle ...
- oracle_修改Oracle数据库字符集 AL32UTF8;
修改数据库字符集 以支持维文等 utf8 停掉库 进入装载模式 ALTER SYSTEM ENABLE RESTRICTED SESSION; ALTER SYSTEM SET JOB_QUEUE_ ...
- 修改Oracle数据库的字符集为UTF-8
1.改客户端字符集:通过WINDOWS的运行菜单运行Regedit,修改注册表 Start -> Run -> Rededit <-| Under registry Editor - ...
- 修改oracle数据库的编码为utf-8
1.查看数据库字符集 ? 数据库服务器字符集select * from nls_database_parameters,其来源于props$,是表示数据库的字符集. 客户端字符集环境select * ...
- oracle数据库字符集的修改
本文摘自:http://blog.csdn.net/nsj820/article/details/65711051.改客户端字符集:通过WINDOWS的运行菜单运行Regedit,修改注册表 Star ...
- linux下oracle数据库字符集修改
linux下oracle数据库字符集修改 0.RHEL6.7.oracle11gr2 1.登录oracle.在安装oracle的用户下进入数据库. $ sqlplus / as sysdba 2.查询 ...
- Oracle数据库字符集问题解析
Oracle数据库字符集问题解析 经常看到一些朋友问ORACLE字符集方面的问题,我想以迭代的方式来介绍一下.第一次迭代:掌握字符集方面的基本概念.有些朋友可能会认为这是多此一举,但实际上正是由于对相 ...
- Oracle数据库字符集问题
Oracle数据库的字符集问题,也涉及作为服务器操作系统的CentOS或者Windows的字符集与Oracle字符集之间的关联关系Oracle的字符集,这个问题的提出是因为两个原因:一是遇到一个DMP ...
- 选择ORACLE数据库字符集
如何选择数据库的字符集是一个有争议的话题,字符集本身涉及的范围很广,它与应用程序.客户的本地环境.操作系统.服务器等关系很密切,因此要做出合适的 选择,需要明白这些因素之间的关系.另外对字符集的基本概 ...
随机推荐
- jQuery filter() , end()
1. jquery filter(condition) : 过滤指定对象中符合条件的元素: 2. jquery end() : 回到原来的操作对象 3. example : <body& ...
- 比较全的css重设
一.最简化的CSS Reset(重设) : * { padding:; margin:; } 这是最普遍最简单的CSS重设,将所有元素的padding和margin值都设为0,可以避免一些浏览器在理解 ...
- 提高 GitHub 网页访问速度 以及 Git Clone 速度 的小技巧
参考: http://www.cnblogs.com/mico-liu/p/9303817.html https://blog.csdn.net/qq756684177/article/details ...
- gitlab 创建ssh步骤
1.使用gitlab首先要创建ssh的公钥和私钥.创建ssh的步骤和命令如下: 打开git bash,我的是windows,切换到.ssh文件夹下.如果没有则创建.ssh(默认是没有这个文件夹的).检 ...
- ORACLE 角色授权
直接例子: 1.CREATE USER 用户名 identified by 密码 default tablespace 表空间名;GRANT CONNECT TO 用户名; GRANT RESOURC ...
- SQL Server ->> SQL Server 2016重要功能改进之 -- INSERT SELECT时并发插入数据
SQL Server 2016对INSERT INTO XXXX SELECT语句进行了优化,在某些情况下可以触发数据的并行插入,但是要求兼容模式是130(SQL Server 2016)以及在插入的 ...
- js 浅拷贝有大用
如题 像浅拷贝.深拷贝这类的知识点我们应该都明白是怎么回事,大部分都是在面试的时候会被问到.大多让你实现一个深拷贝.现实中我们都用比较暴力直接的手段 JSON stringify. 一句话就搞定,管他 ...
- 这么多小程序,会微信小程序就够了
随着小程序的普及以及小程序体验的逐步升级,现在小程序的地位已经凸现出来.各大平台纷纷推出自己的小程序平台. 最早的是微信小程序,支付宝小程序,快应用,百度小程序去年上来,18年底头条程序也发布. 那么 ...
- 网站渗透常用到的Python小脚本
0×00渗透的很多时候,找到的工具并不适用,自己码代码才是王道,下面三个程序都是渗透时在网络上找不到合适工具,自己辛苦开发的,短小使用,求欣赏,求好评. 0×01记录root密码小工具 root.py ...
- 不规矩的xml与JAVA对象互相转换的小技巧-使用Marshaller
摘要:将XML文档与JAVA对象互转是很常见的需求,如果XML定义很规整这很好实现.然而在现实中“不规矩”的XML可能更常见,Marshaller便无能为力了吗?下面是一个小技巧,调整一下思维便能重用 ...