Necesito saber que hace este procedimiento Almacenado
Publicado por Roberto (86 intervenciones) el 09/05/2012 18:49:41
Estimados, tengo dudas con comados que trae este P. Almacenado
Por Ej. que significa :
execute immediate with quotes 'grant connect to "' ||
Que esta asgnando en estas lineas?
@login_name || '" identified by "' ||
@new_pswd || '"'
ALTER PROCEDURE "findelsa"."sp_password"(in @caller_pswd char(128),in @new_pswd char(128),in @login_name char(128) default
null)
begin
if @login_name is not null then
call findelsa.sp_checkperms('DBA')
else
set @login_name=current user
end if;
execute immediate with quotes 'grant connect to "' ||
@login_name || '" identified by "' ||
@new_pswd || '"'
end
Aca lo mismo, pondre ? en las lineas porque no se que hacen
declare permission_denied exception for sqlstate value '42501'; ?
select(select if required_auth = 'DBA' then dbaauth ?
else resourceauth ?
endif from SYS.SYSUSERPERMS where
user_name = current user) into has_perm;
signal permission_denied ?
(in required_auth char(10)) ?
signal permission_denied ?
ALTER PROCEDURE "findelsa"."sp_checkperms"(in required_auth char(10))
begin
declare has_perm char(1);
declare permission_denied exception for sqlstate value '42501';
select(select if required_auth = 'DBA' then dbaauth
else resourceauth
endif from SYS.SYSUSERPERMS where
user_name = current user) into has_perm;
if has_perm <> 'Y' then
signal permission_denied
end if
end
De ante mano muchas gracias
Roberto
Por Ej. que significa :
execute immediate with quotes 'grant connect to "' ||
Que esta asgnando en estas lineas?
@login_name || '" identified by "' ||
@new_pswd || '"'
ALTER PROCEDURE "findelsa"."sp_password"(in @caller_pswd char(128),in @new_pswd char(128),in @login_name char(128) default
null)
begin
if @login_name is not null then
call findelsa.sp_checkperms('DBA')
else
set @login_name=current user
end if;
execute immediate with quotes 'grant connect to "' ||
@login_name || '" identified by "' ||
@new_pswd || '"'
end
Aca lo mismo, pondre ? en las lineas porque no se que hacen
declare permission_denied exception for sqlstate value '42501'; ?
select(select if required_auth = 'DBA' then dbaauth ?
else resourceauth ?
endif from SYS.SYSUSERPERMS where
user_name = current user) into has_perm;
signal permission_denied ?
(in required_auth char(10)) ?
signal permission_denied ?
ALTER PROCEDURE "findelsa"."sp_checkperms"(in required_auth char(10))
begin
declare has_perm char(1);
declare permission_denied exception for sqlstate value '42501';
select(select if required_auth = 'DBA' then dbaauth
else resourceauth
endif from SYS.SYSUSERPERMS where
user_name = current user) into has_perm;
if has_perm <> 'Y' then
signal permission_denied
end if
end
De ante mano muchas gracias
Roberto
Valora esta pregunta
0