Get the App
SLTechnology News&Howtos  ›  Database  › 

Sync logins from ASE 12.5.4 to

Shulou Source: shulou.com Published: 2022-06-01 21:56:50 10月22日 Update

[1] on ASE 12.5.4

Select * into tempdb..loginaa16 from master..logins

Go

Then,use DBAartisan migrate tempdb..loginaa16 to HKCORP's tempdb

[2] on ASE 15.5

Insert into master..syslogins and update sa and probe's password.

Sp_configure 'allow updates',1

Go

Delete from master..syslogins where name not in ('sa','probe')

Go

Insert into master..syslogins (suid,status,accdate,totcpu,totio,spacelimit,timelimit,resultlimit,dbname,name,password,language,pwdate,audflags,fullname,srvname,logincount,procid,lastlogindate,crdate,locksuid,lockreason,lockdate)

Select suid,status,accdate,totcpu,totio,spacelimit,timelimit,resultlimit,dbname,name,password,language,pwdate,audflags,fullname,srvname,logincount,procid,null,null,null,null,null from tempdb..loginaa16 a where not exists (select 1 from master..syslogins b where a.name=b.name)

Go

Update master..syslogins set password= (select password from tempdb..loginaa16 b where b.nameplate floor probey) where name='probe'

Go

Update master..syslogins set password= (select password from tempdb..loginaa16 b where b.nameplate examples sa') where name='sa'

Go

Drop table tempdb..loginaa16

Go

Sp_configure 'allow updates',0

Go

Tags: Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Tech Info macOS vpn Microsoft