June 23, 2010 at 12:02 pm
That would be a good idea. Can you give me some of the output fields you'd like to be included / shown?
June 23, 2010 at 12:08 pm
I had a friend look at and he suggested the following.
Replace
,REVERSE (SUBSTRING (REVERSE (CONVERT (VARCHAR (15), CONVERT (MONEY, @@TOTAL_READ), 1)), 4, 15)) AS reads
,REVERSE (SUBSTRING (REVERSE (CONVERT (VARCHAR (15), CONVERT (MONEY, @@TOTAL_WRITE), 1)), 4, 15)) AS writes
with
,Left(CONVERT(VARCHAR,cast(@@TOTAL_READ as money), 1), len(CONVERT(VARCHAR,cast(@@TOTAL_READ as money), 1))-3) AS reads
,Left(CONVERT(VARCHAR,cast(@@TOTAL_WRITE as money), 1), len(CONVERT(VARCHAR,cast(@@TOTAL_WRITE as money), 1))-3) AS writes
I'm not that great at coding.. It worked with your and his suggestion.
Hope this helps.
Thank you
JM
June 23, 2010 at 12:20 pm
Great! Glad it worked. It's probably easier to just change the VARCHAR value, but whatever works best for you. 🙂
June 23, 2010 at 3:54 pm
Something like this (I got from somewhere on this website):
Maybe you can think of something alittle different, but you get the idea.
I want to have parts Server level security and database level security.
Let me know what you come up with.
/***Listing Permissions
A quick and easy script you can use to see what permissions are assigned at the server level
is the following. It uses the sys.server_permissions catalog view joined against
the sys.server_principals catalog view to pull back all the server-level permissions
belonging to SQL Server logins, Windows user logins, and Windows group logins:*/
SELECT
[srvprin].[name] [server_principal],
[srvprin].[type_desc] [principal_type],
[srvperm].[permission_name],
[srvperm].[state_desc]
FROM [sys].[server_permissions] srvperm
INNER JOIN [sys].[server_principals] srvprin
ON [srvperm].[grantee_principal_id] = [srvprin].[principal_id]
WHERE [srvprin].[type] IN ('S', 'U', 'G')
ORDER BY [server_principal], [permission_name];
June 24, 2010 at 6:06 am
Perfect. I like the idea a lot. I've added it to the list and will re-post the script when it's done.
June 25, 2010 at 2:29 am
Sean
Sorry it took a while to get back to you. I was running the report on SQL 2000 - I didn't realise that it it was only written for 2005. Does it work on 2008?
You are a genius! This will be a great help to me and many others I'm sure.
Thanks
George25
June 26, 2010 at 6:16 am
I believe it should run on 2008, though I don't have a box to test it against. If you do, please let me know if it runs as expected. Thanks!
June 28, 2010 at 9:17 am
Sean Smith-776614 (6/26/2010)
I believe it should run on 2008, though I don't have a box to test it against. If you do, please let me know if it runs as expected. Thanks!
It does work on 2008. I've had if running for a few days now with no issues.
June 28, 2010 at 9:20 am
Fantastic! Thanks for letting me know. 🙂
June 30, 2010 at 3:51 pm
After executing the Sp this is what i get:
Mail queued.
Am i missing something?
June 30, 2010 at 4:01 pm
After executing this SP this is what i get:
Mail queued.
Am i missing something?
June 30, 2010 at 4:02 pm
Yes. This is good.
If you have the SP still open....scroll down to where it says:
SET @vRecipients = 'amc1234@stategov.com'
Replace it with your email address & Save.
Then go to Master database, Programmability, Stored Procedure....
find the SP 'usp_SSAJ_SQL_Server_System_Report ' you just created....
Right Click on it and choose 'Execute Stored Procedure'.
In a few seconds you will get an email with SQL Server System Report of the server you put this SP on.
Let me know if it's working for you.
June 30, 2010 at 4:05 pm
Oops, just look for...
"SET @vRecipients = "
and put YOUR email address here betwen the single quotes. Now follow the rest.
June 30, 2010 at 4:14 pm
I followed your instructions ,but i got no email.
June 30, 2010 at 4:58 pm
I was running on 2008.Would that mather?
Viewing 15 posts - 31 through 45 (of 189 total)
You must be logged in to reply to this topic. Login to reply