向各位师兄、学姐求助:
CREATE OR REPLACE Procedure pzprofileAs
Cursor get_data Is
select 用户名 from 上机人员表;
username get_date%用户名;
Begin
open get_data;
loop
fetch 用户名 into username;
alter user username profile james; End Loop;
exception
when others then
close get_data;
End;
编译的时候,提示有误:PROCEDURE ZLHIS.PZPROFILE 编译错误错误:PLS-00103: 出现符号 "ALTER"在需要下列之一时:
begin case declare end
exit for goto if loop mod null pragma raise return select
update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
行:12
文本:alter user username profile james;
还请各位指点,现行谢过了 (~ o ~)
CREATE OR REPLACE Procedure pzprofileAs
Cursor get_data Is
select 用户名 from 上机人员表;
username get_date%用户名;
Begin
open get_data;
loop
fetch 用户名 into username;
alter user username profile james; End Loop;
exception
when others then
close get_data;
End;
编译的时候,提示有误:PROCEDURE ZLHIS.PZPROFILE 编译错误错误:PLS-00103: 出现符号 "ALTER"在需要下列之一时:
begin case declare end
exit for goto if loop mod null pragma raise return select
update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
行:12
文本:alter user username profile james;
还请各位指点,现行谢过了 (~ o ~)
解决方案 »
- oracle11g有Memo字段类型吗
- ORACLE 连接 提示 包校验和失败
- java.sql.SQLException: Io 异常: Size Data Unit (SDU) mismatch
- 用ORACLE触发器实现将服务器1上的表1一旦操作,同时更新服务器2上的表2,需要怎么样配置ORACLE
- 有点难度的问题:如何将为空的汇总结果显示为0
- 用plsql编辑表数据的时候,弹出一个对话框,提示dynamic table 什么的错误???在线等...
- 求助一条sql查询语句
- ORACLE+IIS做WEB服务,产生大量连接日志的问题(100分)
- 这样的问题该如何写sql语句
- 帮个忙小弟刚参加工作,难混啊!怎么调用oracle中存储过程包中的存储过程
- sqlplus登录是报错,ORA-12570: TNS: 包阅读程序失败
- OEM配置问题
alter user username profile james;
--改为下面试下
execute immediate 'alter user '||username||' profile james;';
我刚才改了下,现在是这样子的:CREATE OR REPLACE Procedure pzprofileAs
Cursor get_data Is
select 用户名 from 上机人员表;
username varchar2(222);
Begin
open get_data;
loop
fetch get_data into username ;
execute immediate 'alter user '||username||' profile lianjie;'; End Loop;
exception
when others then
close get_data;
End;
编译没有问题了,把过程调用出来执行了一哈,没有出现效果。
在医院上班,服务器太久了,还要一段时间才能更换,oracle数据库,老是提示ora-012518,我想把所有的用户都限制哈登陆的数量,就是sessions_per_user,用户很多,一个一个去设置的话太慢了
--看不出来什么问题唉,你看下有没有修改成功,如果成功,则你更新过的用户返回lianjie
select profile from dba_users where username='用户名';
嗯 ` 查了下dba_users 表里面的profile 都是默认的配置文件 default,没有修改成功,能不能麻烦老师再帮我看看额