DatabaseProcApplicationCreatedLinks
sybsystemprocssp_set_password_rep  14 déc. 14Defects Propagation Dependencies

1     
2     
3     /*
4     ** WARNING: This system procedure is an un-reserved system procedure
5     ** reserved for the exclusive use of Replication Server.  Do *NOT* use this
6     ** system procedure to change a password.  Use the system procedure
7     ** 'sp_password()' instead.
8     **
9     ** This system procedure is a wrapper for the built-in 'set_enc_password()'
10    ** and must have the same call signature as the system procedure
11    ** 'sp_set_password()'.
12    */
13    
14    /*
15    ** Generated by spgenmsgs.pl on Thu Feb  2 00:39:20 2006 
16    */
17    /*
18    ** raiserror Messages for set_password_rep [Total 2]
19    **
20    ** 17260, "Can't run %1! from within a transaction."
21    ** 17756, "The execution of the stored procedure '%1!' in database '%2!' was aborted because there was an error in writing the replication log record."
22    */
23    /*
24    ** sp_getmessage Messages for set_password_rep [Total 0]
25    */
26    /*
27    ** End spgenmsgs.pl output.
28    */
29    
30    create or replace procedure sp_set_password_rep
31        @caller_password varchar(255) = NULL, /* the current password of caller */
32        @new_password varbinary(256) = NULL, /* the new password of the target acct*/
33        /* a length of 256 is required to test if
34        ** user entered a passwd > 255 chars.
35        */
36        @loginame varchar(255) = NULL, /* user to change password on */
37        @immediate int = 0 /* if not 0, change the password in
38    					** all running processes for loginame.
39    					*/
40    as
41    
42        declare @retcode int
43    
44        /*
45        ** Do not allow this system procedure to be run from within a transaction
46        ** to avoid creating a multi-database transaction where the 'master'
47        ** database is not the co-ordinating database.
48        */
49        if @@trancount > 0
50        begin
51            raiserror 17260, "sp_set_password_rep"
52            return (1)
53        end
54        set chained off
55        set transaction isolation level 1
56    
57        select @retcode = set_enc_password(@new_password, @loginame)
58        if (@retcode = 0)
59            return (1)
60    
61        /*
62        ** If the 'master' database is marked for replication, the T-SQL built-in
63        ** 'logexec()' will log for replication the execution instance of this
64        ** system procedure.  Otherwise, the T-SQL built-in 'logexec()' is a no-op.
65        */
66        if (logexec(1) != 1)
67        begin
68            raiserror 17756, "sp_set_password_rep", "master"
69            return (1)
70        end
71    
72        return (0)
73    


exec sp_procxmode 'sp_set_password_rep', 'AnyMode'
go

Grant Execute on sp_set_password_rep to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_set_password_rep  
 MUCO 3 Useless Code Useless Brackets 52
 MUCO 3 Useless Code Useless Brackets 58
 MUCO 3 Useless Code Useless Brackets 59
 MUCO 3 Useless Code Useless Brackets 66
 MUCO 3 Useless Code Useless Brackets 69
 MUCO 3 Useless Code Useless Brackets 72
 QISO 3 Set isolation level 55
 MTR1 2 Metrics: Comments Ratio Comments: 66% 30
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 3 = 4dec - 3exi + 2 30
 MTR3 2 Metrics: Query Complexity Complexity: 17 30

DEPENDENCIES