문제

모든 사용자의 비밀번호가 30 일마다 만료되도록 보고서를 실행하고 싶지만 만료 간격이 syslogins에 저장되지 않은 것 같습니다.

도움이 되었습니까?

해결책

다음과 같이 보고서를받을 수 있습니다.

use sybsystemprocs
go
----------------------------------------------------------------------------
print 'sp__helpexpire'
----------------------------------------------------------------------------
if exists (select 1 from sysobjects where  type = "P" and  name = "sp__helpexpire")
        drop proc sp__helpexpire
go
create procedure sp__helpexpire
as
begin
  set nocount on
  declare @swexpire int
  select @swexpire=value from master.dbo.sysconfigures
    where name = 'systemwide password expiration'
  print "Serverwide password expire: %1!" ,@swexpire
  print ""
  print "Logins:"
  print "=============================================================="
  select l.name login , case a.int_value
      when null then @swexpire
      else a.int_value end "expire in days"
    from master.dbo.syslogins l , master.dbo.sysattributes a
    where l.suid *= a.object
      and a.object_type='PS'
      and a.attribute=0
      and object_cinfo='login'
  print ""
  print "Roles:"
  print "=============================================================="
  select r.name "role name", case a.int_value
      when null then @swexpire
      else a.int_value end "expire in days"
    from master.dbo.syssrvroles r , master.dbo.sysattributes a
    where r.srid *= a.object
      and a.object_type='PS'
      and a.attribute=0
      and object_cinfo='role'
end
go

해당 시스템 절차의 소스 코드 (SYBSYSTEMPROCS 데이터베이스에 저장)를 확인하는 것이 항상 좋은 생각입니다.

다른 팁

sp_configure를 사용하여 모든 사용자 비밀번호 만료 날짜를 설정할 수 있습니다.

sp_configure "systemwide password expiration", 30
go

30 일 후에 모든 사용자 비밀번호가 만료되도록 설정합니다. 이 값을 보고서에 대해 읽을 수 있는지 확실하지 않습니다. 기본값은 0입니다.

노력하다

exec sp_displaylogin

개별 사용자의 설정에 대한 PERM을 얻으려면 해당 사용자로 로그인했습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top