Showing posts with label somebody. Show all posts
Showing posts with label somebody. Show all posts

Thursday, March 8, 2012

audit tool

hello, i listen that exists many tools for register all the changes
made to the tables, for audit purpouses, can somebody recommend to me
what options exists... ? exists free option?but english broken kiks
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133366598.263720.93150@.f14g2000cwb.googlegroups.com...
> hello, i listen that exists many tools for register all the changes
> made to the tables, for audit purpouses, can somebody recommend to me
> what options exists... ? exists free option?
>|||sorry, i don't understand... what i want its a tool that track all the
insert, update, delete made in the tables,... and register them in
other database... this tools exists?|||a tool diferent to sql profiler... more eficient...|||SQL Server does have built-in audit modes (C2 auditing), but I've never
actually turned it on. You might want to read up on that a bit.
I believe Idera's SQL Compliance Manager does this kind of thing, as well.
I'm not aware of any free options.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133366598.263720.93150@.f14g2000cwb.googlegroups.com...
> hello, i listen that exists many tools for register all the changes
> made to the tables, for audit purpouses, can somebody recommend to me
> what options exists... ? exists free option?
>|||thanks, and sorry for my english... i talk spanish... bye|||De nada.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133368401.530605.263290@.g43g2000cwa.googlegroups.com...
> thanks, and sorry for my english... i talk spanish... bye
>|||its better idera than log pi? (www.logpi.com)|||That's not really the same kind of tool. LogPI, Log Explorer, and Log
Rescue can't really report on what happened -- they're used by DBAs after
problems occur to try to undo the damage.
What do you really need to do with a tool? Report for compliance purposes
to management, or fix problems?
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133369158.956440.322830@.g47g2000cwa.googlegroups.com...
> its better idera than log pi? (www.logpi.com)
>|||hongo32 wrote:
> its better idera than log pi? (www.logpi.com)
>
If you're only interested in update, delete, and inserts on user tables
then use triggers to manage the audit trail. However, if you're
interested in schema changes then you cannot create triggers on system
tables and will need to find a different solution.
However, if you're using SQL Server 2005 you can create database
triggers to track these changes for auditing.

audit tool

hello, i listen that exists many tools for register all the changes
made to the tables, for audit purpouses, can somebody recommend to me
what options exists... ? exists free option?
but english broken kiks
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133366598.263720.93150@.f14g2000cwb.googlegro ups.com...
> hello, i listen that exists many tools for register all the changes
> made to the tables, for audit purpouses, can somebody recommend to me
> what options exists... ? exists free option?
>
|||sorry, i don't understand... what i want its a tool that track all the
insert, update, delete made in the tables,... and register them in
other database... this tools exists?
|||a tool diferent to sql profiler... more eficient...
|||SQL Server does have built-in audit modes (C2 auditing), but I've never
actually turned it on. You might want to read up on that a bit.
I believe Idera's SQL Compliance Manager does this kind of thing, as well.
I'm not aware of any free options.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133366598.263720.93150@.f14g2000cwb.googlegro ups.com...
> hello, i listen that exists many tools for register all the changes
> made to the tables, for audit purpouses, can somebody recommend to me
> what options exists... ? exists free option?
>
|||thanks, and sorry for my english... i talk spanish... bye
|||De nada.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133368401.530605.263290@.g43g2000cwa.googlegr oups.com...
> thanks, and sorry for my english... i talk spanish... bye
>
|||its better idera than log pi? (www.logpi.com)
|||That's not really the same kind of tool. LogPI, Log Explorer, and Log
Rescue can't really report on what happened -- they're used by DBAs after
problems occur to try to undo the damage.
What do you really need to do with a tool? Report for compliance purposes
to management, or fix problems?
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133369158.956440.322830@.g47g2000cwa.googlegr oups.com...
> its better idera than log pi? (www.logpi.com)
>
|||hongo32 wrote:
> its better idera than log pi? (www.logpi.com)
>
If you're only interested in update, delete, and inserts on user tables
then use triggers to manage the audit trail. However, if you're
interested in schema changes then you cannot create triggers on system
tables and will need to find a different solution.
However, if you're using SQL Server 2005 you can create database
triggers to track these changes for auditing.

audit tool

hello, i listen that exists many tools for register all the changes
made to the tables, for audit purpouses, can somebody recommend to me
what options exists... ? exists free option?but english broken kiks
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133366598.263720.93150@.f14g2000cwb.googlegroups.com...
> hello, i listen that exists many tools for register all the changes
> made to the tables, for audit purpouses, can somebody recommend to me
> what options exists... ? exists free option?
>|||sorry, i don't understand... what i want its a tool that track all the
insert, update, delete made in the tables,... and register them in
other database... this tools exists?|||a tool diferent to sql profiler... more eficient...|||SQL Server does have built-in audit modes (C2 auditing), but I've never
actually turned it on. You might want to read up on that a bit.
I believe Idera's SQL Compliance Manager does this kind of thing, as well.
I'm not aware of any free options.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133366598.263720.93150@.f14g2000cwb.googlegroups.com...
> hello, i listen that exists many tools for register all the changes
> made to the tables, for audit purpouses, can somebody recommend to me
> what options exists... ? exists free option?
>|||thanks, and sorry for my english... i talk spanish... bye|||De nada.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133368401.530605.263290@.g43g2000cwa.googlegroups.com...
> thanks, and sorry for my english... i talk spanish... bye
>|||its better idera than log pi? (www.logpi.com)|||That's not really the same kind of tool. LogPI, Log Explorer, and Log
Rescue can't really report on what happened -- they're used by DBAs after
problems occur to try to undo the damage.
What do you really need to do with a tool? Report for compliance purposes
to management, or fix problems?
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"hongo32" <hongo32es@.yahoo.com> wrote in message
news:1133369158.956440.322830@.g47g2000cwa.googlegroups.com...
> its better idera than log pi? (www.logpi.com)
>|||hongo32 wrote:
> its better idera than log pi? (www.logpi.com)
>
If you're only interested in update, delete, and inserts on user tables
then use triggers to manage the audit trail. However, if you're
interested in schema changes then you cannot create triggers on system
tables and will need to find a different solution.
However, if you're using SQL Server 2005 you can create database
triggers to track these changes for auditing.|||i'm looking for other solutions... because this solution offer better
performance than a trigger... that i want is an audit tool... i ask for
logPI because someone toll me about it... thanks for your commentaries

Sunday, February 19, 2012

Attempted to divide by zero

Hello.
I'm having a little bit of a problem and i have no clue what's going on.
May be somebody can explain me how the following expression could generate the
"Attempted to divide by zero" error. I would really appreciate good advice.

Briefly about report itself - one dataset, on single table with three groups
this is a thid one. Grouping works just fine, but SUM/SUM in a footer of group #3
gives an error. Datatypes: JTD_Hours is decimal(18,2), JTD_Dollars is money.
None of the fields is NULL, all nulls converted to Zeros on dataset level.
Dataset created as result of stored procedure.

Here it is:
=IIf( Sum(Fields!JTD_Hours.Value,"table1_CostCode") = 0, 0, Sum(Fields!JTD_Dollars.Value,"table1_CostCode")/Sum(Fields!JTD_Hours.Value,"table1_CostCode"))

Thanks,
Konstantin

IIF is a function call which evaluates all arguments before it executes. Hence, given your expression a division by zero is possible.

Try the following expression instead:
=IIf( Sum(Fields!JTD_Hours.Value,"table1_CostCode") = 0, 0, Sum(Fields!JTD_Dollars.Value,"table1_CostCode") / iif(Sum(Fields!JTD_Hours.Value,"table1_CostCode") = 0, 1, Sum(Fields!JTD_Hours.Value,"table1_CostCode")))

In general, you want a pattern like this to avoid division by zero:

=iif(B=0, 0, A / iif(B=0, 1, B))

-- Robert

|||

Robert,
I appreciate your response.
Your tip really helped and now i see why it didn't work.
but i would have to admit that it's kind of wrong way how IIf works but it could be just me.
Anyhow, many thanks for you advice.

Konstantin

P.S.
It seems to me make more sence to create a custom function in a code section something like XdivY(x, y, whenYIsZero) so i can reuse this code over and over again.

|||IIF is a function call like any other function call in the VB runtime library. Function arguments always get evaluated before the function body is executed. That's how all programming environments work. It would be nice to support the IF - ELSE - ENDIF statements, but the VB runtime library has only support for function calls. Given that limitation, adding a custom function like you suggested is a good approach if you need this kind of division throughout the report.

-- Robert|||

The previous posts helped me a lot. I am new to coding and have the same problem but when I am trying to divide the totals on for a group. This is the code that is currently being used.

=Iif(ReportItems!Total_GALLONS1.Value > 0,ReportItems!Total_REVENUE1.Value/ReportItems!Total_GALLONS1.Value, 0)

Any help would be appreciated.

Thanks!

|||

You should do exectly the same as in second post here by Robert Bruckner MSFT

Your statement should be like

=Iif(ReportItems!Total_GALLONS1.Value > 0,ReportItems!Total_REVENUE1.Value/IIF(ReportItems!Total_GALLONS1.Value=0,1,ReportItems!Total_GALLONS1.Value), 0)

Attempted to divide by zero

Hello.
I'm having a little bit of a problem and i have no clue what's going on.
May be somebody can explain me how the following expression could generate the
"Attempted to divide by zero" error. I would really appreciate good advice.

Briefly about report itself - one dataset, on single table with three groups
this is a thid one. Grouping works just fine, but SUM/SUM in a footer of group #3
gives an error. Datatypes: JTD_Hours is decimal(18,2), JTD_Dollars is money.
None of the fields is NULL, all nulls converted to Zeros on dataset level.
Dataset created as result of stored procedure.

Here it is:
=IIf( Sum(Fields!JTD_Hours.Value,"table1_CostCode") = 0, 0, Sum(Fields!JTD_Dollars.Value,"table1_CostCode")/Sum(Fields!JTD_Hours.Value,"table1_CostCode"))

Thanks,
Konstantin

IIF is a function call which evaluates all arguments before it executes. Hence, given your expression a division by zero is possible.

Try the following expression instead:
=IIf( Sum(Fields!JTD_Hours.Value,"table1_CostCode") = 0, 0, Sum(Fields!JTD_Dollars.Value,"table1_CostCode") / iif(Sum(Fields!JTD_Hours.Value,"table1_CostCode") = 0, 1, Sum(Fields!JTD_Hours.Value,"table1_CostCode")))

In general, you want a pattern like this to avoid division by zero:

=iif(B=0, 0, A / iif(B=0, 1, B))

-- Robert

|||

Robert,
I appreciate your response.
Your tip really helped and now i see why it didn't work.
but i would have to admit that it's kind of wrong way how IIf works but it could be just me.
Anyhow, many thanks for you advice.

Konstantin

P.S.
It seems to me make more sence to create a custom function in a code section something like XdivY(x, y, whenYIsZero) so i can reuse this code over and over again.

|||IIF is a function call like any other function call in the VB runtime library. Function arguments always get evaluated before the function body is executed. That's how all programming environments work. It would be nice to support the IF - ELSE - ENDIF statements, but the VB runtime library has only support for function calls. Given that limitation, adding a custom function like you suggested is a good approach if you need this kind of division throughout the report.

-- Robert|||

The previous posts helped me a lot. I am new to coding and have the same problem but when I am trying to divide the totals on for a group. This is the code that is currently being used.

=Iif(ReportItems!Total_GALLONS1.Value > 0,ReportItems!Total_REVENUE1.Value/ReportItems!Total_GALLONS1.Value, 0)

Any help would be appreciated.

Thanks!

|||

You should do exectly the same as in second post here by Robert Bruckner MSFT

Your statement should be like

=Iif(ReportItems!Total_GALLONS1.Value > 0,ReportItems!Total_REVENUE1.Value/IIF(ReportItems!Total_GALLONS1.Value=0,1,ReportItems!Total_GALLONS1.Value), 0)