一.使用scott用户登录的问题 说明:Oracle如果是初次使用用户,scott用户是没有解锁的.所以要先解锁.注:scott是个测试用户. 具体步骤: 1.在Dos命令下输入 sqlplus 可以打开 Oracle 自带的 SQL Plus 并出现登录提示.(sqlplus) 2.必须以管理员的身份登录(sys/system).注意:sys/system的密码是你在注册oracle时设置的口令.(用户名:sys as sysdba) 3.输入该命令并执行 (SQL> alter user s…
DataTable dt= SqlHelper.ExecuteDataTable(System.Data.CommandType.Text, String.Format("select * from Automation_User where userName='{0}' and password='{1}'", userName, password), null); 如果是拼接式sql登录的话很容易进行sql注入 'or'1'='1 所以登录的sql尽量写成参数化, using (S…
Sql for Oracle基本操作关键字 +SQL TOP子句 TOP 子句用于规定要返回的记录的数目 SELECT column_name(s) FROM table_name WHERE ROWNUM <= number +SQL LIKE 操作符 LIKE 操作符用于在 WHERE 子句中搜索列中的指定模式 SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern 提示:"%" 可用于定义通配…
在用PL/SQL Developer连接数据库时出现“ORA-12541:TNS:无监听程序”错误. 1.检查listener.log日志发现下面错误:TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 20-9月 -2008 10:25:26 Copyright (c) 1991, 2005, Oracle. All rights reserved. 系统参数文件为D:/oracle/product/10.2.0/db_…