由买买提看人间百态

topics

全部话题 - 话题: sqlplus
1 2 3 4 下页 末页 (共4页)
B*****g
发帖数: 34098
1
来自主题: Database版 - 比较sqlplus和sql developer
事实胜于雄辩,coolbid必须参加
认为sqlplus好的,请举出10种sqlplus能干而sql developer不能干的,10种sqlplus效
率高而sql developer效率低的。
认为sql developer好的,请举出10种sql developer能干而sqlplus不能干的,10种sql
developer效率高而sqlplus效率低的。
a***n
发帖数: 1616
2
来自主题: Database版 - How to get SQL help in sqlplus?
就象unix shell里的man一样。。。要所有SQL的syntax...
sqlplus help本身那几条命令太不常用了:)
还有,我sqlplus里怎么不能backspace呢,出来的是^[[D:(
我还想sqlplus能上下键浏览命令历史。。。
怎么整?(linux) 谢了。
n****e
发帖数: 1403
3
sqlplus是oracle dba必须会的东东。比如,有时候在server side的unix box要进行一
些操作sqlplus是必须的.而且, sqldeveloper能干的sqlplus一定都可以(无论繁简)
,反之,未必。
c**t
发帖数: 2744
4
来自主题: Database版 - sqlplus vs ODP.Net
execute same select statement in sqlplus is much faster than execute it in O
racle Data Provider for .Net; I know ODP.Net has some overhead; but query i
n sqlplus takes 2 minutes; that in ODP.Net takes for ever (>30 minutes no re
sult). What could be the reason?
c*****d
发帖数: 6045
5
如果是写pl/sql代码,当然是sql developer胜出了
光名字就说明问题了,developer
用sqlplus写200行的pl/sql都会被累死
如果是db administration,毫无疑问是sqlplus

sql
J****u
发帖数: 15
6
来自主题: Database版 - Debugging in SQLPLUS, need help
Hello, all. I need your help. I am running a query using sqlplus and
get error ORA-01722. It means that error happens when it converts
non-numeric characters into numeric format.
I want to know at what point it hits the error so that I can find out
which non-numeric character is causing the problem and fix it.
Do you know any debugging or other methods to figure that out?
Thanks.
John
x********o
发帖数: 31
7
来自主题: Database版 - Debugging in SQLPLUS, need help
it should stop at the error line.
if you can post your SQLplus on BBS, maybe i can help you find the bugs.
Usually, i found the bugs with ZHI Jue.
n********a
发帖数: 68
8
来自主题: Database版 - How to get SQL help in sqlplus?

This
" target="_blank" class="a2">http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90843/toc.htm
and this
" target="_blank" class="a2">http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/toc.htm
SQL> define _editor="emacs"
And then type edit will pop emacs for you to edit last query.
You can set editor to your favorite if it is not emacs, like vi.
sqlplus can only edit previous query, not the whole history.
This is different than linux or MySQL.
a***n
发帖数: 1616
9
来自主题: Database版 - How to get SQL help in sqlplus?

不是这个。
我不是想要sqlplus本身的online help.
我要这样的:比如:
help CREATE DATABASE
help INSERT
help UPDATE
help CREATE TABLE
help SELECT
然后出来的是SQL的格式定义原文(不要简化版,当然有sample更好:P)
//当然我offline的去网上找SQL的语法也能找到一些。。。
//可是没一个是语法的定义,都是一些简单示例的罗列。。。
呵呵,backspace今天突然好了。。。
昨天还不行的。我今天试了几下ctrl-H也是^[[D,然后试ctrl-backspace然后就可以了
现在寡按backspace也成了。。。真是诡异。。。
oh. I see. 我还不如copy/paste呢:)
g****h
发帖数: 30
10
来自主题: Database版 - In SQLPLUS, how to repeat typed command
In SQLPLUS (Oracle+Solaris), how to repeat previously typed commands? Like in
BASH, you can just used up-arrow to do that. I know in Windows+Oracle, you can
do the same thing, but not in Oracle+Solaris.
Is there a config setting I missed?
m**********m
发帖数: 92
11
来自主题: Database版 - In SQLPLUS, how to repeat typed command
use "/"+Enter key to execute the last sql statement again.
You can do it in SQLPlus (Oracle+Solaris).
If you want to edit last sql statement, use "edit", then hit enter.

in
can
s*****c
发帖数: 24
12
来自主题: Database版 - Re: In SQLPLUS, how to repeat typed comm
Use xemacs, "Alt-x, shell" to start a shell, then sqlplus in the shell.
After that, you can repeat any commands, or use prefix match(Alt-P, Meta-P or
ESC-p)

Like
you
S*******e
发帖数: 379
13
来自主题: Database版 - 请教一个sqlplus的问题
sqlplus里怎么显示所有的database instance和一个database instance
的所有的table? 我记得好像是show databases, show tables,但是试了
都不行。很久没用过数据库了,问题比较幼稚,但是网上搜了半天也没找
到答案。多谢。
c**t
发帖数: 2744
14
Wrapped a select statement with a stored procedure, not like SQL Server, in
sqlplus, can't simplely: execute sp_Test('param1') to list all records, has
to use cursor. Any sample to list the selections?
h*****6
发帖数: 866
15
为啥sqlplus 比 oracle sql developer 强大,强大在哪?谢谢。
c*****d
发帖数: 6045
16
sqlplus强大在它不是图形界面
h*****6
发帖数: 866
17
功能上哪?对于较长的stored procedure(more than 2000 lines plsql code), sql
developer debug更强大一些吧。
sqlplus 和 sqldeveloper 比, 啥功能让人们说它强大?谢谢。
z***y
发帖数: 7151
18
来自主题: Database版 - 比较sqlplus和sql developer
sqlplus秒杀sql developer
不解释。
c*****d
发帖数: 6045
19
来自主题: Database版 - 比较sqlplus和sql developer
sqlplus好 -- dba不解释
sql developer好 -- dev不解释
p*********d
发帖数: 136
20
来自主题: Database版 - 比较sqlplus和sql developer
SqlPlus
10. can generate formatted report
9. can produce interactive script
8. can spool result to file continuously
7. can execute large-size script
6. can use different editor in addition the embedded editor
5. can run from server and have better performance
4. can be used in Linux/Unix environment
3. can be used in scheduled/cron job
2. can be launched in micro-second
1. can make DBAs happier
c**k
发帖数: 1228
21
来自主题: Database版 - 比较sqlplus和sql developer
现学现卖,sqlplus可以批处理,脚本编程,占内纯少。
y****9
发帖数: 144
22
来自主题: Database版 - 比较sqlplus和sql developer
Almost never used SQl Developer for daily DBA work, remembered there were
two occasions that I have to use SQL developer because I don't have other
tools TOAD etc.
1. Format a query
when doing a SQL tuning, we select sql_text from v$sql or copy/paste from
AWR, the sql text may be in one line. It is good to have formatted or
nicely indented SQL text. SQL developer can do that. of couse some other
tools also can.
2.Run sql scripts that have special characters
when running soem code release scri... 阅读全帖
v*****r
发帖数: 1119
23
来自主题: Linux版 - sqlplus formatting ugly?
set linesize 80
用来做 text reporting tool, 没见过比 sqlplus 更 flexible,强大的。
v*****r
发帖数: 1119
24
来自主题: Linux版 - sqlplus formatting ugly?
You need to take a look of this chapter on sqlplus formatting:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/
X****r
发帖数: 3557
25
来自主题: Programming版 - sqlplus -s 中的 -s是什么意思?
-s or -silent -- start sqlplus in silent mode.
n********a
发帖数: 68
26
啦?
sqlplus)?
sqlplus is just another client, nothing different than JDBC, ODBC, Pro C, and
the list goes on and on.
Your worry that Oracle cannot servive sqlplus stuffed with tons of
non-reusable SQL is warranted. There are several points to consider here:
1. sqlplus as you said, is an interactive client. A human being will type in
SQLs. Now, how many SQLs can you type in an hour? How long will it take you
to type hundreds of SQL statements? The point is that you are unlikely to
be able to gener
c*****d
发帖数: 6045
27
来自主题: Database版 - Oracle database link problem
我的意思是在你学校的机器上用sqlplus测试一下
$> sqlplus /nolog
sqlplus> conn scott/tiger@Oracle10g

1521)
w*********y
发帖数: 28
28
多谢各位大侠的指教,你们提出的方法我也都试过了!比如在SQLPLUS下执行我要执行的S
QL语句。
十分怪异的是,我打印出我要执行的语句,copy到SQLPLUS, 在SQLPLUS下执行完全正确
!!!我想补充的是,如果建立table时,没有REFERENCES,就可以正常插入;有了REFER
ENCES,就出现deadlock的问题。
因此合理解释是:我要执行的SQL语句无误,也没有constraint的问题。 出现问题只可能

1. Oracle JDBC的bug。
2. 系统没有给我足够的权限!---但怎么知道系统给了我什么权限呢?
这次出现的deadlock的问题真的不能catch到,实在太古怪了,我周围没有一个人能解释
。多谢各位了!

the

。用catch也找不到error,用PreparedStatement也是同样的问题,用新的Connection,St
it
h****3
发帖数: 339
29
来自主题: DataSciences版 - oracle数据导入/导出(转载)
Oracle数据导入导出imp/exp
功能:Oracle数据导入导出imp/exp就相当与oracle数据还原与备份。
大多情况都可以用Oracle数据导入导出完成数据的备份和还原(不会造成数据的丢失)。
Oracle有个好处,虽然你的电脑不是服务器,但是你装了oracle客户端,并建立了连接
(通过Net Configuration Assistant添加正确的服务命名,其实你可以想成是客户端
与服务器端 修了条路,然后数据就可以被拉过来了)
这样你可以把数据导出到本地,虽然可能服务器离你很远。
你同样可以把dmp文件从本地导入到远处的数据库服务器中。
利用这个功能你可以构建俩个相同的数据库,一个用来测试,一个用来正式使用。
执行环境:可以在SQLPLUS.EXE或者DOS(命令行)中执行,
DOS中可以执行时由于 在oracle 8i 中 安装目录$ora10gBIN被设置为全局路径,
该目录下有EXP.EXE与IMP.EXE文件被用来执行导入导出。
oracle用java编写,我想SQLPLUS.EXE、EXP.EXE、IMP.EXE这俩个文件是被包装后的类
文件。
SQLP... 阅读全帖
h****r
发帖数: 2056
30
来自主题: Database版 - How to know which database I am connected?
using sqlplus for oracle, is there anyway to know which
database I
am connecting to?
Another thing is how to let sqlplus to connect to the
database I
want to?
thanks a lot.
m********h
发帖数: 2
31
来自主题: Database版 - oracle connection problem
i have a sqlplus connect error.
whenever i try to connect via sqlplus i get following error
message after entering user and password:
ORA-07217: sltln: environment variable cannot be evaluated.
i have found at technet.oracle.com that i have to set a
variable
"ORA-07217 sltln: environment variable cannot be evaluated.
Cause: GETENV call returned a null pointer.
Action: Set the environment variable and try again."
but i do not know which one.
x****g
发帖数: 6597
32
来自主题: Database版 - ora-12560: TNS: Protocol adaptor error
My Oracle have a trouble in this week.
c:\svrmgrl
ora-12560:TNS: Protocol adaptor error
c:\sqlplus scott/t***[email protected]
no error
however
c:\sqlplus scott/tiger
ora-12560:TNS: Protocol adaptor error
I wonder why.
Thanks
l***s
发帖数: 28
33
来自主题: Database版 - How to creat user in Oracle?
I recently start learning the Oracle 9i. I installed the Oracle
in Linux under user Oracle. So when I login as Oracle, I type
sqlplus
Then it asks me user and password. I am confused about this. Since
I have not been able to open the Oracle database yet, how can I
have a user and password for the database? I must be able to login
in as an administrator and for the first time I should have a
default password. Is this right? I learnt that I can prompt to
sqlplus without login. But can I do any adm
s***m
发帖数: 28
34
来自主题: Database版 - editting .sql file problem
You need to define your default editor in sqlplus environment. If you define
default editor as below, it is valid for current session only. You can set it
to default globally in a file called login.sql or glogin.sql belong to Oracle
installation. Add
define _editor=vi
in this file. Next time when you type edit in sqlplus, vi will be your editor.
s*****c
发帖数: 24
35
来自主题: Database版 - oracle forget password/username

try: sqlplus "/ as sysdba" or sqlplus SYSTEM/MANGER.
a***n
发帖数: 1616
36

顺便问句, 既然如此, 那我sqlplus里多运行得几条不同的语句, 它oracle不得死翘翘啦?
那交互式DB终端还能用嘛?
I'm thinking that pool caching is only for programming interface?
not for internal client (e.g. the built-in database query terminal: sqlplus)?
h****r
发帖数: 2056
37
来自主题: Database版 - oracle db connection through firewall
Try to use SQLPLUS to connect a oracle database server behind firewall.
$sqlplus
scott/tiger@"(description=(address_list=(address=(protocol=tcp)(port=1521)(hos
t=FireWallHostName))(address=(protocol=tcp)(port=1521)(host=192.168.1.35)))(co
nnect_data=(INSTANCE_NAME=oradb))(source_route=yes))"
Got error message as follow,
c*****d
发帖数: 6045
38
来自主题: Database版 - Oracle database link problem
你的结果说明你学校的机器1521端口没问题
service_name是Oracle10g.my.univ.edu
然后在你家里的机器tnsnames.ora上添加
Oracle10g =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle10g.my.univ.edu)(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = Oracle10g.my.univ.edu)
)
)
然后做同样的测试
$> sqlplus /nolog
sqlplus> conn scott/tiger@Oracle10g
e***e
发帖数: 168
39
Hi under sqlplus shell, if i want to frequently insert a long command while
tuning queries, is there any way I can press a few keys to insert the
command that is preprepared.
For example, I need to frequently insert:
sqlplus> alter session set events '10053 trace name context forever';
anyone knows some tips to avoid typing?
e***e
发帖数: 168
40
Hi I use screen to manage my shell consoles.
Now, I start sqlplus (oracle command line interface),
but i cannot have history of the sql commands within sqlplus.
Can screen provide such buffering?
Thanks!
y****9
发帖数: 144
41
如果要看-下有没有Oracle instance 在*nix 下运行。我一般:
ps -ef | grep pmon
其他db我不熟,但准会有其特殊的process name.所以原理是一样的。
连接到数据库,需要特定的client software。 如Oracle的sqlplus
So you can type “ which sqlplus" to see if it is in your path as you
already know.

linux
w*********r
发帖数: 2095
42
来自主题: Database版 - SQL Developer ORA-01017 错误
Thank you for the reply.
When I start up sqlplus, I
1) su - oracle,
2) input the password when asked
3) Oracle $: sqlplus /nolog,
4) conn / as sysdba
5) startup.
I tried to use the Oracle account username and password and they do not work
either.
YW
发帖数: 46
43
来自主题: Database版 - Sql developer connection issue
Really appreciate if someone can help me with my questions.
1. I have Oracle version 11.2.0.2.0 installed into linux server, There is
an instance running before I created second instance. I connected it using
SQL developer for development purpose. Everything was working properly until
recently. I found I can’t connect it with SQL developer anymore (the
other instance can connect without problem).
When I test the connection, it gave me error as below:
Status: Failure - Test failed:Listener re... 阅读全帖
z**b
发帖数: 293
44
来自主题: Database版 - client无法连接虚拟机数据库
参数如下:
虚拟机:VMware workstation
eth1 IP:192.168.213.135
hostname: localhost
Listener 启动正常
service_name=orcl
虚拟机内执行:
[oracle@localhost]$sqlplus hr/[email protected]/orcl
连接成功。
windows CMD
ping 192.168.213.135 正常
ping localhost 不通
输入:
c:\>sqlplus hr/[email protected]/orcl
结果无法连接。这是为什么?
c*****d
发帖数: 6045
45
来自主题: Database版 - 【已解决】oracle db link
碰到这么一个db link的问题
我有2个db server,比如说是db_a, db_b
然后我在db_a的user_a里创建了一个db_link_a_to_b
create database link db_link_a_to_b
connect to "user_b"
identified by "password_b"
using 'tns_a_to_b'
然后在db_a上创建了tns_a_to_b
tnsping tns_a_to_b成功
SQL> select * from dual@db_link_a_to_b
成功
现在我的laptop上用sqlplus连接db_a
tns_laptop_to_a
sqlplus user_a/password_a@tns_laptop_to_a
SQL> select * from dual@db_link_a_to_b
出错
ERROR at line 1:
ORA-12154: TNS:could not resolve the connect identifier specified
这个是啥情况?
不需要在laptop上创建t... 阅读全帖
m****d
发帖数: 372
46
来自主题: Database版 - 【已解决】oracle db link
如果db_a没有设置shared server,那应该是TNS_ADMIN的设置问题.listner启动时的TNS
_ADMIN与当前不同。
登陆到db_a server,
sqlplus user/pwd
select * from dual@db_link -> OK
sqlplus user/pwd@db_a
select * from dual@db_link -> get error.
你可以用下面的方法验证一下上面两种情况下TNS_ADMIN返回值是否一样。
SQL> var tmp_str varchar2(255);
SQL> exec dbms_system.get_env('TNS_ADMIN',:tmp_str);
SQL> print tmp_str
我遇到过shared server的问题,前段时间想去弄明白怎么回事的,但一直没空。
a****b
发帖数: 489
47
来自主题: Database版 - 很弱的Oracle问题
大家在写Oracle程序的时候,用图形界面吗?还是就是用Sqlplus写/看程序呢?如果单
纯用sqlplus怎么能随时知道都有神马table和column可用呢
s*******1
发帖数: 92
48
来自主题: Database版 - 问一个store procedure 问题
My script is used to drop a database link from another schema. It works good.
---------------------------------------------------------
connect deploy/deploy@qa
CREATE OR REPLACE PROCEDURE misc.drop_db_link AS
BEGIN
EXECUTE IMMEDIATE 'drop database link link_name';
END drop_db_link;
/
BEGIN
misc.drop_db_link;
END;
/
BEGIN
EXECUTE IMMEDIATE 'drop procedure misc.drop_db_link';
END;
/
--------------------------------------------------------------
But, I want to make it cleaner. So I moved... 阅读全帖
e***e
发帖数: 168
49
Hi I use screen to manage my shell consoles.
Now, I start sqlplus (oracle command line interface),
but i cannot have history of the sql commands within sqlplus.
Can screen provide such buffering?
Thanks!
v*****r
发帖数: 1119
50
1. 简单的 query, 直接在 query 里dynamic赋值
sqlplus -silent id/password@oracel_instance < select 'foo='id from table;
...
EOF
2.复杂的 Query ,re-direct here document output to a temporary file and awk
the temporary file
sqlplus -silent id/password@oracel_instance < tempfile
select column1,column2...,columnN from table;
...
EOF
awk .... tempfile

printf(
1 2 3 4 下页 末页 (共4页)