0

レポートを実行して、すべてのユーザーのパスワードが30日ごとに期限切れになるように設定されていることを確認したいのですが、有効期限の間隔がsysloginsに保存されていないようです。

4

3 に答える 3

2

次の手順でレポートを取得できます。

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

探しているレコード(この場合はsp_addlogin、sp_modifylogin)で操作するシステムプロシージャ(sybsystemprocsデータベースに格納されている)のソースコードを確認することをお勧めします。

于 2010-01-15T12:27:12.510 に答える
0

sp_configureを使用して、すべてのユーザーのパスワードの有効期限を設定できます

sp_configure "systemwide password expiration", 30
go

すべてのユーザーのパスワードが30日後に期限切れになるように設定されます。ただし、この値をレポート用に読み取ることができるかどうかはわかりません。デフォルトは0です。

于 2009-07-22T08:22:46.607 に答える
0

試す

exec sp_displaylogin

そのユーザーとしてログインしている個々のユーザーの設定のパーマを取得します。

于 2009-08-03T20:05:52.437 に答える