SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Problem 'Enable System Audit' and hyphen in database name

 
Reply to topic    SoftTree Technologies Forum Index » DB Audit, DB Mail, DB Tools View previous topic
View next topic
Problem 'Enable System Audit' and hyphen in database name
Author Message
LarsHes



Joined: 19 Jan 2010
Posts: 2
Country: Denmark

Post Problem 'Enable System Audit' and hyphen in database name Reply with quote
I am evaluating DB Audit on a MS-SQL 2005 server and can not enable system auditing due to improper handling of
hyphen in database name.

I get an error message saying
A database errror occured while your request was being processed. Here are the details:
Incorrect syntax near '-'.

I have narrowed the problem down by use of SQL Profiler to the sequence when DB Audit tries to create the
stored procedure sp_db_audit:
<<<Code>>>
create procedure dbo.sp_db_audit
/* DB Audit Expert 4.2.24.8 */
(
@spid_writer int
)
as
begin
/****************************************************************
* Copyright (c) 2005-2007 SoftTree Technologies, Inc. All rights
* reserved.
...
********************************************/

set nocount on
...

declare settings cursor for
select distinct f.event_id, c.col_id
from lw-lims.db_audit.sys_audit_config f, lw-lims.db_audit.sys_audit_config c
where f.category = 'EVENT' and c.category = 'COLUMN'
order by f.event_id, c.col_id

<<<End>>>

The problem is that database name is not quoted or enclosed in [].

Is there any solution for this problem?

Kind regards

LarsHes
Tue Jan 19, 2010 11:57 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
Hi,

DB Audit currently doesn't support non-standard database names for the audit repository database. Please move the repository to a different database or create a new one, name it like audit or dbaudit. I suggest the latest because it makes the maintenance simpler, you don't need to store audit data along with other unrelated stuff, which makes it easier to backup, archive, purge, monitor, etc...

To move the repository to a different database, try using Tools->Move Local Audit Repository. If that doesn't work because of the non-standard name, please uninstall the settings (Tools->Uninstall) and then re-install them.


PS. You can also change the procedure code, but you will find problems in other areas too.
Tue Jan 19, 2010 2:21 pm View user's profile Send private message
LarsHes



Joined: 19 Jan 2010
Posts: 2
Country: Denmark

Post Reply with quote
SysOp wrote:
Hi,

...

PS. You can also change the procedure code, but you will find problems in other areas too.


Hi SysOp
Thank you for the answer. In order to proceed my evaluation I created a separate audit database.

Just of curiosity: Where do you change the procedure code?

Kind regards
LarsHes
Tue Jan 19, 2010 2:27 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
Hi,

I meant the procedure that you referred to in your message. Theoretically, after the installation you can change it in any SQL editor. I just don't think that would be a good idea.

Were you able to update the repository and get the audit service running?

Best, SysOp
Tue Jan 19, 2010 4:32 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » DB Audit, DB Mail, DB Tools All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.