I have created stored procedure for checking the cpu usage and connection string.
----check the number of users---
EXEC sp_who2 'Active'
-----check the number of connection----
DB_NAME(dbid) as DBName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
dbid > 0
for above script I have created one job which will run every 1 hr and that information will be stored into the txt files through
But the problem is the all the information is stored in one file.
actually what I want, for today when job will be started it will create one txt file and all the data will be stored in the same file and tomorrow again the job will start the samething happen.
So everyday I want to create new txt files and when the job will start the data will be stored in that file.
Is there any script or anyother solution, please share with me.