本文地址:
https://blog.csdn.net/shanglianlm/article/details/74201123
ORA-00001: 违反唯一约束条件 主键重复。
ORA-00900: 无效 SQL 语句 错误原因:错误换行,错误使用其他数据库或者windows命令
例: SQL> shutdown immediate;
shutdown immediate
ORA-00900: 无效 SQL 语句
------解决方法------------------------------------------------
plsql没有此命令 应该是在sqlplus里面执行该命令
--------------------------------------------------------------
ORA-00901: 无效 CREATE 命令 一般创建表时出现,仔细检查建表语句格式
ORA-00902: 无效数据类型 出现oracle不支持的数据类型
ORA-00903: 表名无效 错误原因:使用oracle内部的表如user,建表时表名上有单引号或者双引号,动态SQL用绑定变量不能传参做表名等
ORA-00904: 无效的标识符 引用不存在的列
ORA-00905: 缺少关键字 注意关键字间的空格
ORA-00906: 缺少左括号
ORA-00907: 缺少右括号
ORA-00908: 缺少 NULL 关键字
ORA-00909: 参数个数无效 错误原因:别名使用数字
ORA-00910: 指定的长度对于数据类型而言过长
ORA-00911: 无效字符 错误原因:中英文字符
ORA-00913: 值过多 插入时,值个数大于参数个数
ORA-00914: 缺少 ADD 关键字
ORA-00917: 缺少逗号 可能由于缺少其他符号引起,不一定要锁定逗号
ORA-00918: 未明确定义列 列名同时存在于两个表中,建议多表操作时加表名前缀
ORA-00919: 无效函数 使用rank() over (order by XXX desc) 而不是rank()
ORA-00920: 无效的关系运算符 关系运算符两边不一致。
ORA-00921: 未预期的 SQL 命令结尾 oracle使用单引号而不是双引号界定字符串
ORA-00922: 缺少或无效选项 一般是语句的语法有问题。比如命名不对,关键字写错等等
ORA-00923: 未找到预期 FROM 关键字
ORA-00924: 缺少 BY 关键字
ORA-00925: 缺失 INTO 关键字
ORA-00926: 缺少 VALUES 关键字
ORA-00927: 缺少等号
ORA-00928: 缺少 SELECT 关键字
ORA-00929: 缺少句号
ORA-00930: 缺少星号
ORA-00931: 缺少标识
ORA-00932: 不一致的数据类型: 要求数据类型和得到的数据类型不一致
ORA-00933: SQL 命令未正确结束 sql语句有格式问题
ORA-00934: 此处不允许使用分组函数 存储过程中select出的count(1),sum(sl)需要into一个变量中
ORA-00935: 分组函数的嵌套太深 having子句定义过深。
注意:sql中子嵌套最好不要超过三层,效率低。
ORA-00936: 缺少表达式 关注关键字拼写和逗号问题、
ORA-00937: 非单组分组函数 使用avg,min,max,sum,count,rank()等函数时,可能需要group by语句
ORA-00938: 函数没有足够的参数 关注to_char,to_date等函数的参数是否存在,尤其出现字符的时候
ORA-00939: 函数的参数过多 关注使用的函数是否包含太多参数或者语法格式有误
ORA-00940: 无效的 ALTER 命令
ORA-00942: 表或视图不存在 oracle大小写敏感,此外oracle支持""语法。
ORA-00943: 群集不存在 可能是创建的DATAFILE过小,改大一点
ORA-00946: 缺少 TO 关键字
ORA-00947: 没有足够的值 两种情况下出现:
1)insert into table_name values (1,2,3); 表四个字段,缺省表字段时,默认为所有
2)insert into table_name1() select * from table_name2 表1 2字段不同
ORA-00950: 无效 DROP 选项 漏掉中间的table,sequence,index,constraint等关键字
ORA-00952: 缺少 GROUP 关键字
ORA-00953: 缺少或无效索引名
ORA-00954: 缺少 IDENTIFIED 关键字
ORA-00955: 名称已由现有对象使用 先执行select a.OBJECT_type,a.* from all_objects a where upper(a.OBJECT_NAME) =‘table_name’;如果有视图或者过程存在,删除;再以管理员登录数据库执行 alter system flush shared_pool;退出。
ORA-00957: 列名重复
ORA-00958: 缺少 CHECK 关键字
ORA-00959: 表空间’‘不存在 大小写和双引号问题
ORA-00960: 选择列表中的命名含糊 两表中相同字段未加表名前缀
ORA-00961: 错误的日期/间隔值
ORA-00962: group-by / order-by 表达式过多
ORA-00963: 不支持的间隔类型 关键字问题
ORA-00964: 表名不在 FROM 列表中
ORA-00965: 列别名中不允许’*’
ORA-00966: 缺少 TABLE 关键字
ORA-00967: 缺少 WHERE 关键字
ORA-00968: 缺少 INDEX 关键字
ORA-00969: 缺少 ON 关键字
ORA-00970: 缺少 WITH 关键字
ORA-00971: 缺少 SET 关键字
ORA-00972: 标识过长 Oracle规定名称最长30个字符
注意:Oracle规定名称最长30个字符
ORA-00973: 无效的行数估计
ORA-00974: 无效 PCTFREE 值 (百分比)
ORA-00975: 不允许日期 + 日期
ORA-00976: 此处不允许为 LEVEL, PRIOR 或 ROWNUM
ORA-00978: 嵌套分组函数没有 GROUT BY
ORA-00979: 不是 GROUP BY 表达式
ORA-00980: 同义词转换不再有效 同义词创建时,不会去检测内容的准确性,即如果表不存在,也可以创建该表的同义词
ORA-00982: 缺少加号
ORA-00984: 列在此处不允许 建表或者修改表时出现
ORA-00985: 无效的程序名
ORA-00986: 缺少或无效组名
ORA-00987: 缺少或无效用户名
ORA-00988: 缺少或无效口令
ORA-00989: 给出的用户名口令过多
ORA-00990: 缺少或无效权限 说明:例如GRANT ALTER TABLE TO drm_mdm;这样赋权限就会报错,因为没有alter table的系统权限,只有alter any table
ORA-00992: REVOKE 命令格式无效
ORA-00993: 缺少 GRANT 关键字
ORA-00994: 缺少 OPTION 关键字
ORA-00995: 缺少或无效同义词标识
ORA-00996: 连接运算符是 || 而不是 |
ORA-00997: 非法使用 LONG 数据类型 long数据类型一个表只能有一个,且该列不能GROUP BY,order by。
ORA-00998: 必须使用列别名命名此表达式
ORA-00999: 无效的视图名
ORA-01810:格式代码出现两次 一般是日期被格式化两次。
ORA-01861:文字与格式字符串不匹配 这个错误一般出现在时间字段上,即你插入的时间格式和数据库现有的时间格式不一致
本文地址:ORA-00001: 违反唯一约束条件 主键重复。ORA-00900: 无效 SQL 语句 错误原因:错误换行,错误使用其他数据库或者windows命令 例: SQL> shutdown immediate; shutdown immediate ORA-00900: 无效 SQL 语句 ——解决方法———————————————— plsql没有此命令 应该是在sqlplus里
Usage:
ora
[-u user] [-i instance#] []
General
-u user/pass use USER/PASS to log in
-i instance# append # to
ORACLE
_SID
-sid set
ORACLE
_SID to sid
-top # limit some large queries to on # rows
- repeat
Repeat an coomand time. Sleep between two calls
Command are:
- execute: cursors currently being executed
- longops: run progression monitor
- sessions: currently open sessions
- stack get process stack using
ora
debug
- cursors [all] : [all] parsed cursors
- sharing : print why cursors are not shared
- events [px]: events that someone is waiting for
- events [read_by_other_session]
events that someone is read by other session
- ash
[duration]
[-f ] active session history for specified period
e.g. 'ash 30' to display from [now - 30min] to [now]
e.g. 'ash 30 10 -f foo.txt' to display a 10 minutes period from [now - 30min] and store the result in file foo.txt
- ash_wait_graph
[duration]
[-f ] PQ event wait graph using ASH data
Arguments are the same as for ash except that the output must be shown with the mxgraph tool
- ash_
sql
Show all ash rows group by sampli_time and event for the specified
sql
_id
- [-u ] degree degree of objects for a given user
- [-u ] colstats stats for each table, column
- [-u ] tabstats stats for each table
- params []: view all parameters, even hidden ones
- snap: view all snapshots status
- bc: view contents of buffer cache
- temp: view used space in temp tbs
- asm: Show asm space/free space
- space []: view used/free space in a given tbs
- binds : display bind capture information for specified cursor
- fulltext : display the entire
SQL
text of the specified statement
- last_
sql
_hash []: hash value of the last styatement executed by the specified sid. If no sid speficied,
return the last hash_value of user sessions
- openv
[]: display optimizer env parameters for specified cursor
- plan []: get explain plan of a particular cursor
- pxplan : get explain plan of a particular cursor and all connected cursor slave
SQL
- wplan []: get explain plan with work area information
- pxwplan : get explain plan with work area information of a particular cursor and all connected cursor slave
SQL
- eplan []: get explain plan with execution statistics
- pxeplan : get explain plan with execution statistics of a particular cursor and all connected cursor slave
SQL
- gplan : get graphical explain plan of a particular cursor using dot specification
- webplan get graphical explain plan of a particular
[/] cursor using gdl specification
[]: optional: child_number, default is zero.
optional: dec
ora
te to print further node information. default is 0,
1 => print further node information such as cost, filter_predicates etc.
2 => in addition to the above, print row vector information
sample usage:
#
ora
webplan 4019453623
print more information (dec
ora
te 1)
#
ora
webplan 4019453623/1 1
more information, overload! (dec
ora
te 2)
#
ora
webplan 4019453623/1 2
using
sql
_id along with child number instead of hash value
#
ora
webplan aca4xvmz0rzup/3 1
- hash_to_
sql
id : get the
sql
_id of the cursor given its hash value
-
sql
id_to_hash : get the hash value of the cursor given its
(unquoted)
sql
_id
- exptbs: generate export tablespace script
- imptbs: generate import tablespace script
- smm [limited]:
SQL
memory manager stats for active workareas
- onepass: Run an
ora
wplan on all one-pass cursors
- mpass: Run an
ora
wplan on all multi-pass cursors
- pga: tell how much pga memory is used
- pga_detail |
-mem : Gives details on how PGA memory is consumed by a process (given its os PID) or
by the set of precesses consuming more than MB of PGA memory (-mem option)
- pgasnap [] Snapshot the pga advice stats
- pgaadv [-s []]
[-o graphfile]
[-m min_size]: generate a graph from v and display it or store it in a file if the -o option is used.
-s [] to diff with a previous snapshot (see pgasnap cmd)
-o [graphfile] to store the result in a file instead of displaying it
-m [min_size] only consider workareas with a minimum size
- pgaadvhist [-f
[]] display the advice history for all factors or for factor between f_min and f_max
- sga: tell how much sga memory is used
- sga_stats: tell how sga is dynamically used
- sort_usage: tell how temp tablespace is used in detail
- sgasnap [] Snapshot the sga advice stats
- sgaadv [-s []]
[-o graphfile] generate a graph from v and v and store it in a file if the -o option is used.
-s [] to diff with a previous snapshot (see sgasnap cmd)
-o [graphfile] to store the result in a file instead of displaying it
- process []: display process info with pga memory
- version: display
Oracle
version number
- cur_mem [ ] display the memory used for a given or all cursors
- shared_mem [ ] detailed dump of cursor shared mem allocations
- runtime_mem [ ] detailed dump of cursor runtime memory allocations
- all_mem [ ] do all of the memory dumps
- pstack |all
[] run pstack on specified process (or all if 'all' specified) and store
files in specified dir ( when not specified)
- idxdesc [username]
list all indexes for a given user or for a given user and table
- segsize [username]
list size of all objects(segments) for given user for a given user and object
- tempu list temp
ora
ry ts usage of all users or for a given user
-
sql
stats [ ] list
sql
execution stats (like buffer_gets, phy. reads etc) for a given
sql
_id/hash_value of statement
- optstats [username] list optimizer stats for all tables stored
in dictionary for a given user or for a given user and table
- userVs list all user Views (user_tables, user_indexes etc)
- fixedVs list all V$ Views
- fixedXs list all X$ Views
- px_processes list all px processes (QC and slaves)
- cursor_summary summarize stats about (un)pinned cursors
- rowcache summarizes row cache statistics
- monitor_list lists all the statements that have been monitored
- monitor [xml]: wraps dbms_
sql
tune.report_
sql
_monitor().
Directly passe the arguments to the PL/
SQL
procedure. Args are:
sql
_id, session_id, session_serial,
sql
_exec_start,
sql
_exec_id, inst_id,
instance_id_filter, parallel_filter, report_level, type.
Examples:
- monitor xml shows XML report
- monitor show last monitored stmt
- monitor
sql
_id=>'8vz99cy9bydv8', session_id=>105 will
show monitor info for
sql
_id 8vz99cy9bydv8 and session_id 105
Use simply
ora
monitor 8vz99cy9bydv8 to display monitoring information for
sql
_id 8vz99cy9bydv8.
Syntax for parallel filters is:
[qc][servers([,] [,] )]
Use /*+ monitor */ to force monitoring.
- monitor_old [ash_all] []
[qc| [ []]]
Old version of
SQL
monitoring, use a
SQL
query versus the report_
sql
_monitor()
package. Display monitoring info for the LAST execution of the specified cursor.
Cursor response time needs to be at least 5s for monitoring to start (use the
monitor hint to force monitoring). Without any parameter, will display monitoring info
for the last cursor that was monitored
- ash_all will aggregate ash data over all executions of the cursor (useful for short
queries that are executed many times).
If parallel:
- qc to see only data for qc
- slave_grp# to see only data for one parallelizer
- slave_grp# + slave_set# to see only data for one slave set of one parallelizer,
- slave_grp# + slave_set# + slave# to see data only for the specified slave
-
sql
_task [progress | interrupt | history |
report ]
progress: progress monitoring for executing
sql
tasks
interrupt: interrupt an executing
sql
task
history: print a history of last n executions
report: get a
sql
tune report
-
sql
_use_temp_segment Find Who And What
SQL
Is Using Temp Segments.
- sh Run a shell command. E.g.
ora
repeat 5 10 sh 'ps -edf | grep DESC'
- awr_dbid Show AWR dbid
- awr_dbtime [dbid] Show AWR dbtime
- awr_dbtime [dbid] [inst] Show AWR dbtime
- awr_dbtime_order [dbid] Show AWR dbtime order by desc
- awr_
sql
_elaps_time [dbid]
Show AWR
SQL
elapsed time
- awr_
sql
_elaps_time [dbid] [inst]
Show AWR
SQL
elapsed time
- awr_
sql
_elaps_time_order [dbid]
Show AWR
SQL
elapsed time order by desc
- awr_logical_reads_order [dbid]
- awr_logical_reads [dbid] Show AWR logical reads M
Show AWR logical reads M order by desc
- awr_physical_reads [dbid] Show AWR physical reads M
- awr_physical_reads_order [dbid]
Show AWR physical reads M order by desc
- awr_db_cpu_per [dbid] [inst]
Show AWR db_cpu_time cpu percent
- awr_user_cpu_per [dbid] [inst]
Show AWR
oracle
user_time cpu percent including backgroud process
- awr_
sql
sql
_id [dbid] Show AWR
sql
_id executions, per elapsed time.
- awr_fulltext
sql
_id [dbid] Show AWR
sql
fulltext
- awr_plan
sql
_id plan_hash [dbid]
Show AWR
sql
plan, if plan_hash is null, show all plans.
- awr_binds
sql
_id end_snap_id [dbid]
Show AWR bind values in end_snap_id.
- tab_frag owner [frag_percent]
Show table fragment.
- index_frag owner [frag_percent]
Show index fragment.
- rman_fullrestore_scripts dest_dbfile_dir
Generate rman full database restore scripts
- top_buffers_gets Top 10 by buffer gets > 10000
- top_physical_reads Top 10 by Physical Reads (disk_reads > 1000)
- top_executions Top 10 by Executions > 100
- top_parse_calls Top 10 by Parse Calls > 1000
- top_sharable_memory Top 10 by Sharable Memory > 1M
- top_version_count Top 10 by Version Count > 20
- top_cpu_usage Top 10 by CPU usage (cpu_time)
- top_running_time Top 10 by Running Time (first_load_time desc)
- create_tbs path size Create test database's tablespace script
- create_tbs path size [dbid]Create dbid's test database's tablespace script
- hold_txlock Show sessions holding a TX lock
- wait_txlock Show sessions waiting a TX lock
- rowid Display rowid's file_id, file_name, block info, object info, extent_id
Memory: The detailed memory dumps need to have events set to work.
The events bellow can be added to the init.
ora
file
event="10277 trace name context forever, level 10" # mutable mem
event="10235 trace name context forever, level 4" # shared mem
- Set environment variable
ORA
_USE_HASH to 1 to get
SQL
hash values instead of
SQL
ids
- Set environment variable DBUSER to change default connect string which is "/ as sysdba"
- Set environment variable
ORA
_TMP to the default temp directory (default if /tmp when not set)
今天在使用select* 查询数据是出现了
ORA
-00904: "xxxx": 无效的标识符 的错误。
最后的
解决
方案:
sql
="select * from table where uname="&uname 改成了
sql
="select * from table where uname='"&uname&"' "
问题
解决
。
转载于:https://ww...
pl/
sql
对
Oracle
数据库进行操作时报错
ORA
-
00903
:invalid table name表名无效 该如何处理
在使用pl/
sql
对
Oracle
数据库进行操作时,想查询一张表的所有内容,表名是user,想查询的话可以这样操作。
展开Tables选项,在想要查询的表上点击鼠标右键,选择Query data选项,右侧出现的窗口中,会出现默认查询这个表的数据代码
但此时发现,弹出报错对话框"
ORA
-
00903
:invalid table name",意思是这个表名无效,于是我想到应该是user是系统
问:什么是NULL?
答:在我们不知道具体有什么数据的时候,也即未知,可以用NULL,我们称它为空,
ORACLE
中,含有空值的表列长度为零。
ORACLE
允许任何一种数据类型的字段为空,除了以下两种情况:
1、主键字段(
tomcat错误日志断断续续报
ORA
-
00903
:invalidtablename,并无具体
SQL
与表名,需要排查哪段代码写入了无效表名,
可以通过
ORACLE
提供的errorstack追踪报错
SQL
。
由于生产数据无法取出,以下皆为测试环境测试还原生产错误。
errorstack简介
设置errorstack,在发生特定的
ORA
错误时会记录发生问题的会话,语句以及各个进程的trace文件,
在alert日志中有记录错误记录的trace文件位置,也可以给单独会话开启errorstac...
深度学习论文: Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions及其PyTorch实现
大大小小袁:
深度学习论文: Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions及其PyTorch实现
大大小小袁:
深度学习论文: Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions及其PyTorch实现
EstrellaXT:
深度学习论文: Generalized Focal Loss V2及其PyTorch实现
18881: