Monday, March 12, 2012
login auditing not writing to log
I have turned on the login auditing in the server properties to log
both failed and successfull logins. I logged out and logged back in to
test the feature. However, the system did not write the login details
to the sql server log. Do I have to bounce the sqlserver?
Are DDL triggers the only way to turn on database auditing in SQL
Server 2005?
Regards
JaideepYes, you need to bounce the SQL2000/2005 instance.
Linchi
"jai" wrote:
> Hello,
> I have turned on the login auditing in the server properties to log
> both failed and successfull logins. I logged out and logged back in to
> test the feature. However, the system did not write the login details
> to the sql server log. Do I have to bounce the sqlserver?
> Are DDL triggers the only way to turn on database auditing in SQL
> Server 2005?
> Regards
> Jaideep
>|||Hello Jai,
For SQL 2000 or SQL 2005 after doing the change you need to stop and start
SQL Server service.
DDL trigger can be used to audit the schema changes. Say you can audit
alter, drop or create statements
into a table or fire an action you could use DDL triggers.
Thanks
Hari
"jai" <dbasybase@.gmail.com> wrote in message
news:1169496539.784616.88210@.m58g2000cwm.googlegroups.com...
> Hello,
> I have turned on the login auditing in the server properties to log
> both failed and successfull logins. I logged out and logged back in to
> test the feature. However, the system did not write the login details
> to the sql server log. Do I have to bounce the sqlserver?
> Are DDL triggers the only way to turn on database auditing in SQL
> Server 2005?
> Regards
> Jaideep
>
login auditing not writing to log
I have turned on the login auditing in the server properties to log
both failed and successfull logins. I logged out and logged back in to
test the feature. However, the system did not write the login details
to the sql server log. Do I have to bounce the sqlserver?
Are DDL triggers the only way to turn on database auditing in SQL
Server 2005?
Regards
JaideepHello Jai,
For SQL 2000 or SQL 2005 after doing the change you need to stop and start
SQL Server service.
DDL trigger can be used to audit the schema changes. Say you can audit
alter, drop or create statements
into a table or fire an action you could use DDL triggers.
Thanks
Hari
"jai" <dbasybase@.gmail.com> wrote in message
news:1169496539.784616.88210@.m58g2000cwm.googlegroups.com...
> Hello,
> I have turned on the login auditing in the server properties to log
> both failed and successfull logins. I logged out and logged back in to
> test the feature. However, the system did not write the login details
> to the sql server log. Do I have to bounce the sqlserver?
> Are DDL triggers the only way to turn on database auditing in SQL
> Server 2005?
> Regards
> Jaideep
>
login auditing not writing to log
I have turned on the login auditing in the server properties to log
both failed and successfull logins. I logged out and logged back in to
test the feature. However, the system did not write the login details
to the sql server log. Do I have to bounce the sqlserver?
Are DDL triggers the only way to turn on database auditing in SQL
Server 2005?
Regards
Jaideep
Yes, you need to bounce the SQL2000/2005 instance.
Linchi
"jai" wrote:
> Hello,
> I have turned on the login auditing in the server properties to log
> both failed and successfull logins. I logged out and logged back in to
> test the feature. However, the system did not write the login details
> to the sql server log. Do I have to bounce the sqlserver?
> Are DDL triggers the only way to turn on database auditing in SQL
> Server 2005?
> Regards
> Jaideep
>
|||Hello Jai,
For SQL 2000 or SQL 2005 after doing the change you need to stop and start
SQL Server service.
DDL trigger can be used to audit the schema changes. Say you can audit
alter, drop or create statements
into a table or fire an action you could use DDL triggers.
Thanks
Hari
"jai" <dbasybase@.gmail.com> wrote in message
news:1169496539.784616.88210@.m58g2000cwm.googlegro ups.com...
> Hello,
> I have turned on the login auditing in the server properties to log
> both failed and successfull logins. I logged out and logged back in to
> test the feature. However, the system did not write the login details
> to the sql server log. Do I have to bounce the sqlserver?
> Are DDL triggers the only way to turn on database auditing in SQL
> Server 2005?
> Regards
> Jaideep
>
login and web admin tool
I've been trying to get my website back up and running, I lost the db and will have to reconstruct that but in the meantime I would like to get the website back in operation right now I have the following problems.
I receive an error message when trying to create a new user in the web admin tool. see 1A
or I receive another error message saying that the administrator is not authorized to sign onto the db
and I seem to have the authorization settings incorrect for the hashed password settings I had...
Ive looked back through my notes and the last time this happened I created a new database with the web admin tool but my settings are such that this still doesn't eliminate the error messages. Right now the website is in a cannot find server mode.
Thanks for your help.
Debbie
1A Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String methodName, Object[] parameters, Type[] paramTypes) at System.Web.Administration.WebAdminMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Still having a problem. does anyone answer these forums? Since Microsoft is not offering support on VWD 2005 and it sends you to these forums for answers don't you think that they should staff the forums? for at least a modicum of support. Who - ever heard of a product being released without a repair system in place? HELP REQUESTED.
Here are a few suggestions to start:
http://www.aquesthosting.com/HowTo/Sql2005/SQLError26.aspx
Buck Woody
Friday, March 9, 2012
login and web admin tool
I've been trying to get my website back up and running, I lost the db and will have to reconstruct that but in the meantime I would like to get the website back in operation right now I have the following problems.
I receive an error message when trying to create a new user in the web admin tool. see 1A
or I receive another error message saying that the administrator is not authorized to sign onto the db
and I seem to have the authorization settings incorrect for the hashed password settings I had...
Ive looked back through my notes and the last time this happened I created a new database with the web admin tool but my settings are such that this still doesn't eliminate the error messages. Right now the website is in a cannot find server mode.
Thanks for your help.
Debbie
1A Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String methodName, Object[] parameters, Type[] paramTypes) at System.Web.Administration.WebAdminMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Still having a problem. does anyone answer these forums? Since Microsoft is not offering support on VWD 2005 and it sends you to these forums for answers don't you think that they should staff the forums? for at least a modicum of support. Who - ever heard of a product being released without a repair system in place? HELP REQUESTED.
Here are a few suggestions to start:
http://www.aquesthosting.com/HowTo/Sql2005/SQLError26.aspx
Buck Woody
Login and User Problems
I have a SQL Server 7.0 Desktop installed in my computer. When i restore a
back up
from a SQL SERVER 7.0 Standart it, restore all tables from the database but
not logins.
When I create the logins in the Standart Edition, I created it one for each
user and sing it
by database default my database.
this users appear in the tree view, in the Database User folder.
When i restore the database all there are not users, asingned in the databas
e...
only, Roles and, in this ones, a Public one, that contain all users that i c
reated.
I can't delete this users, and i can't create a new one with the same name,
because an Error
come's up..
Error 15023: User or role 'REMI'alredy esists in the current database
now i don't know what to do..
any help it will be apreciated..
RemiI am not sure if I understand everything, but let me try. Logins are in
master database, so it is normal they are not restored with a user database.
You can script them on the source and implement the script on the
destination server. I guess we are talking about SQL logins. You cn map them
to db users with sp_change_users_login system SP - check it in Books OnLine.
HTH,
Dejan Sarka, SQL Server MVP
Please reply only to the newsgroups.|||Thank you that resolve the problem...
Remi
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> escribi
en el mensaje news:e3MIR0$2DHA.3196@.TK2MSFTNGP11.phx.gbl...
quote:
> I am not sure if I understand everything, but let me try. Logins are in
> master database, so it is normal they are not restored with a user
database.
quote:
> You can script them on the source and implement the script on the
> destination server. I guess we are talking about SQL logins. You cn map
them
quote:
> to db users with sp_change_users_login system SP - check it in Books
OnLine.
quote:
> HTH,
> --
> Dejan Sarka, SQL Server MVP
> Please reply only to the newsgroups.
>
Wednesday, March 7, 2012
Logical filenames when restoring to a new database?
2000 server. I need the older version to recover some records. One
thing that confuses me is the logical file names.
Basically I'm following an example from the help files which I have
included at the end of this message. Using the restore I'm bother by
the fact that I can't change the logical file names. The database
MyNwind2_Test will have the same logical filenames as the orginal. Is
there a way to change the logical filenames? Can two databases in the
same sql instance have the same logical filenames?
Thank You,
Randy K
wawork@.hotmail.com
USE master
GO
-- First determine the number and names of the files in the backup.
-- MyNwind_2 is the name of the backup device.
RESTORE FILELISTONLY
FROM MyNwind_2
-- Restore the files for MyNwind2_Test.
RESTORE DATABASE MyNwind2_Test
FROM MyNwind_2
WITH RECOVERY,
MOVE 'MyNwind2_data' TO 'D:\MyData\MyNwind2_Test_data.mdf',
MOVE 'MyNwind2_log' TO 'D:\MyData\MyNwind2_Test_log.ldf'Yes 2 databases can have the same logical filenames with no problems.
However to change them you can use ALTER DATABASE dbname MODIFY FILE (NAME =logical_file_name, NEWNAME = new_logical_name...) See BOL for details
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Randy K" <wawork@.hotmail.com> wrote in message
news:3fbd470e.23662406@.msnews.microsoft.com...
We need to restore an older copy of a database back on to the same SQL
2000 server. I need the older version to recover some records. One
thing that confuses me is the logical file names.
Basically I'm following an example from the help files which I have
included at the end of this message. Using the restore I'm bother by
the fact that I can't change the logical file names. The database
MyNwind2_Test will have the same logical filenames as the orginal. Is
there a way to change the logical filenames? Can two databases in the
same sql instance have the same logical filenames?
Thank You,
Randy K
wawork@.hotmail.com
USE master
GO
-- First determine the number and names of the files in the backup.
-- MyNwind_2 is the name of the backup device.
RESTORE FILELISTONLY
FROM MyNwind_2
-- Restore the files for MyNwind2_Test.
RESTORE DATABASE MyNwind2_Test
FROM MyNwind_2
WITH RECOVERY,
MOVE 'MyNwind2_data' TO 'D:\MyData\MyNwind2_Test_data.mdf',
MOVE 'MyNwind2_log' TO 'D:\MyData\MyNwind2_Test_log.ldf'
logical device already exists?
When I tried to create a new backup device called 'master', I got the error:
Error 15026: Logical device 'master' already exists.
But I've checked several times and don't see master.BAK already exist in e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for other system default databases, like msdb, model, etc.
Anybody know what might be the problem?
Bing
When you create a backup device you are associating a logical name to a
physical file name. In SQL Server there is more than one type of device.
If you look in BOL under sysdevices you can find out about all the different
devices. Anyway "master" already is a device that is associated with the
actual master database. If you want to create a logical backup device to
refer to your master database backup, call it "master_bak", or something.
Hope this helps you understand what a device is. If you really want to see
all the devices you already have assigned you can run the following command
from QA:
select * from master.dbo.sysdevices
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"bing" <bing@.discussions.microsoft.com> wrote in message
news:9AC7B842-64A8-4790-8C39-87957075EE39@.microsoft.com...
> I want to back the master db to the disk file
e:\data\MSSQL\BACKUP\master.BAK.
> When I tried to create a new backup device called 'master', I got the
error:
> Error 15026: Logical device 'master' already exists.
> But I've checked several times and don't see master.BAK already exist in
e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for
other system default databases, like msdb, model, etc.
> Anybody know what might be the problem?
> Bing
|||Hi,
It seems there is an entry in master..sysdevices table.
Execute the below procedure from Query ANalyzer and ensure that you do not
have the same file.
sp_helpdevice
To double check the same by querying :-
select * from master..sysdevices
If you have an entry then you can drop the device by using the below command
(Execute the comand if you need)
sp_dropdevice 'device_name'
Thanks
Hari
MCDBA
Thanks
Hari
MCDBA
"bing" <bing@.discussions.microsoft.com> wrote in message
news:9AC7B842-64A8-4790-8C39-87957075EE39@.microsoft.com...
> I want to back the master db to the disk file
e:\data\MSSQL\BACKUP\master.BAK.
> When I tried to create a new backup device called 'master', I got the
error:
> Error 15026: Logical device 'master' already exists.
> But I've checked several times and don't see master.BAK already exist in
e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for
other system default databases, like msdb, model, etc.
> Anybody know what might be the problem?
> Bing
|||Thanks all for the information. Very helpful.
Bing
"Hari Prasad" wrote:
> Hi,
> It seems there is an entry in master..sysdevices table.
> Execute the below procedure from Query ANalyzer and ensure that you do not
> have the same file.
> sp_helpdevice
> To double check the same by querying :-
> select * from master..sysdevices
> If you have an entry then you can drop the device by using the below command
> (Execute the comand if you need)
> sp_dropdevice 'device_name'
> Thanks
> Hari
> MCDBA
>
> Thanks
> Hari
> MCDBA
>
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:9AC7B842-64A8-4790-8C39-87957075EE39@.microsoft.com...
> e:\data\MSSQL\BACKUP\master.BAK.
> error:
> e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for
> other system default databases, like msdb, model, etc.
>
>
logical device already exists?
K.
When I tried to create a new backup device called 'master', I got the error:
Error 15026: Logical device 'master' already exists.
But I've checked several times and don't see master.BAK already exist in e:\
data\MSSQL\BACKUP. I had no problem creating the backup devices for other
system default databases, like msdb, model, etc.
Anybody know what might be the problem?
BingWhen you create a backup device you are associating a logical name to a
physical file name. In SQL Server there is more than one type of device.
If you look in BOL under sysdevices you can find out about all the different
devices. Anyway "master" already is a device that is associated with the
actual master database. If you want to create a logical backup device to
refer to your master database backup, call it "master_bak", or something.
Hope this helps you understand what a device is. If you really want to see
all the devices you already have assigned you can run the following command
from QA:
select * from master.dbo.sysdevices
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"bing" <bing@.discussions.microsoft.com> wrote in message
news:9AC7B842-64A8-4790-8C39-87957075EE39@.microsoft.com...
> I want to back the master db to the disk file
e:\data\MSSQL\BACKUP\master.BAK.
> When I tried to create a new backup device called 'master', I got the
error:
> Error 15026: Logical device 'master' already exists.
> But I've checked several times and don't see master.BAK already exist in
e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for
other system default databases, like msdb, model, etc.
> Anybody know what might be the problem?
> Bing|||Hi,
It seems there is an entry in master..sysdevices table.
Execute the below procedure from Query ANalyzer and ensure that you do not
have the same file.
sp_helpdevice
To double check the same by querying :-
select * from master..sysdevices
If you have an entry then you can drop the device by using the below command
(Execute the comand if you need)
sp_dropdevice 'device_name'
Thanks
Hari
MCDBA
Thanks
Hari
MCDBA
"bing" <bing@.discussions.microsoft.com> wrote in message
news:9AC7B842-64A8-4790-8C39-87957075EE39@.microsoft.com...
> I want to back the master db to the disk file
e:\data\MSSQL\BACKUP\master.BAK.
> When I tried to create a new backup device called 'master', I got the
error:
> Error 15026: Logical device 'master' already exists.
> But I've checked several times and don't see master.BAK already exist in
e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for
other system default databases, like msdb, model, etc.
> Anybody know what might be the problem?
> Bing|||Thanks all for the information. Very helpful.
Bing
"Hari Prasad" wrote:
> Hi,
> It seems there is an entry in master..sysdevices table.
> Execute the below procedure from Query ANalyzer and ensure that you do not
> have the same file.
> sp_helpdevice
> To double check the same by querying :-
> select * from master..sysdevices
> If you have an entry then you can drop the device by using the below comma
nd
> (Execute the comand if you need)
> sp_dropdevice 'device_name'
> Thanks
> Hari
> MCDBA
>
> Thanks
> Hari
> MCDBA
>
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:9AC7B842-64A8-4790-8C39-87957075EE39@.microsoft.com...
> e:\data\MSSQL\BACKUP\master.BAK.
> error:
> e:\data\MSSQL\BACKUP. I had no problem creating the backup devices for
> other system default databases, like msdb, model, etc.
>
>
Monday, February 20, 2012
Logging output in a transaction
The App. is doing a Try-Catch block so using something like isql.exe will not do the trick otherwise that is the route we would go.
I tried logging everyting to a table but those inserts get rolled back with XACT_ABORT. What about the xp proc that logs it to the event log? Thought of that but that would make a real mess of the event log with all of our status messages.
Now we are considering using xp_cmdshell that calls a batch file to output our status text, is this my best option? I would prefer to capture all of the print statements so if anyone knows how to do this that would be preferable!
Thanks!:bump:
wrong forum? Should I try in an App Dev forum, perhaps?