Query ConnectMember.txt Automatic by TheGhost
*** Goggle Traslator ***
Good Friends, as I have time without contributing anything here I leave something useful to all managers Mu
Query to pass is a Vip accounts of the Archive Database Automatically ConnectMember.txt
The idea is to create a job (work) of Running SQL and make it every so often, you will choose the programming
The query does is delete the file and create a new one ConnectMember.txt from querying the database MEMB_Info Checking account IDs of the users and adding them to a VIP ConnectMember.txt file again, so is avoided work be editing this manually, the query uses SCFIsVip Column reference since it is the one currently being used in most of the servers
No more to say I leave here:
SQL 2000
Quote:
DECLARE @cmd varchar(200)
exec master..xp_cmdshell 'del C:\MuServer\Data\ConnectMember.txt'
select @cmd = 'osql -dMuOnline -U(user) -P(Password) -h-1 -Q" SET NOCOUNT ON select CHAR(34)+memb___id+CHAR(34) from MEMB_INFO where SCFIsVip=1 SET NOCOUNT OFF" -o "C:\MuServer\Data\ConnectMember.txt" '
exec master..xp_cmdshell @cmd
SQL 2008
Quote:
DECLARE @cmd varchar(200)
exec master..xp_cmdshell 'del C:\MuServer\Data\ConnectMember.txt'
select @cmd = 'sqlcmd -dMuOnline -h-1 -Q" SET NOCOUNT ON select CHAR(34)+memb___id+CHAR(34) from MEMB_INFO where SCFIsVip=1 SET NOCOUNT OFF" -o "C:\MuServer\Data\ConnectMember.txt" -W'
exec master..xp_cmdshell @cmd
Greetings!
Credits:
TheGhost (pquintal in RZ) -- CP Team Development Group