Showing posts with label tab. Show all posts
Showing posts with label tab. Show all posts

Saturday, February 25, 2012

accidentally deleted BUILTIN\Administrators group in Security tab

How can I recreate the BUILTIN\Administrators group that I had deleted
accidentally? My Slqserver 2K is in mixed mode.
Thanks
BillU don't have to as long as sql service and sql agent accounts have appropriate rights however you can do this fform EM --> logins and just add the user Builtin\Administrators

accidentally deleted BUILTIN\Administrators group in Security tab

How can I recreate the BUILTIN\Administrators group that I had deleted
accidentally? My Slqserver 2K is in mixed mode.
Thanks
BillU don't have to as long as sql service and sql agent accounts have appropria
te rights however you can do this fform EM --> logins and just add the user
Builtin\Administrators

Sunday, February 12, 2012

Accessing Query analyzer Messages programmatically

I would like to access the results posted to the Messages tab of Query Analyzer via code. I had assumed this was possible using ADO, but I am not having any luck.

Here is the example that I would like to use:

-- This T-SQL returns a simple report
DECLARE @.Foo Datetime

SELECT @.Foo = GetDate()

Print @.Foo
Print ''
Print 'Another line of text'
Print ''
Print 'End of report'

When I try opening this as an ADODB recordset, the recordset come back closed.

I'm scratching my head trying to think of other ways to do this, and I keep coming up blank.

Any ideas?see ADODB.Connection.Errors collection

?ADODB.Connection.Errors.Item(0).Description