Sunday, March 11, 2012
Auditing on SQL-server.
I am looking for ways of auditing in SQL-server.
Using Google I am a bit overwhelmed with solutions.
At the moment we are looking at limited auditing, where
the following has to be audited :
user, date_time, some specific database mutations.
Offcourse we want it :
Fast, Good, Cheap.
My thought up to now :
1. Logging of SQLserver (not too suitable for reading).
2. Profiler (not too suitable for continues use and rather limited for
data).
3. Triggers (Expensive in resources ?)
4. Special tools. (This is the part I am overwhelmed with).
Any good pointers ?
(Google search words, specific sites, solutions ?)
Thanks,
Ben BrugmanFound this link :
http://www.akadia.com/services/sqlsrv_table_auditing.html
More suggestions are welcome.
Ben
"ben brugman" <ben@.niethier.nl> wrote in message
news:uLqgP4d5FHA.4076@.tk2msftngp13.phx.gbl...
> Hello Readers,
> I am looking for ways of auditing in SQL-server.
> Using Google I am a bit overwhelmed with solutions.
> At the moment we are looking at limited auditing, where
> the following has to be audited :
> user, date_time, some specific database mutations.
> Offcourse we want it :
> Fast, Good, Cheap.
> My thought up to now :
> 1. Logging of SQLserver (not too suitable for reading).
> 2. Profiler (not too suitable for continues use and rather limited for
> data).
> 3. Triggers (Expensive in resources ?)
> 4. Special tools. (This is the part I am overwhelmed with).
> Any good pointers ?
> (Google search words, specific sites, solutions ?)
> Thanks,
> Ben Brugman
>|||Depends on exactly what you need to audit. Some of the less expensive 3rd
party tools such as
http://www.red-gate.com/products/SQL_Log_Rescue/index.htm
are quick and easy. At those prices you can't develop a comparable auditor
yourself for the price. In SQL 2005 it gets even easier with the new DDL
triggers and information available via triggers. Here are some more
options:
http://www.aspfaq.com/show.asp?id=2496
http://www.aspfaq.com/show.asp?id=2448
Andrew J. Kelly SQL MVP
"ben brugman" <ben@.niethier.nl> wrote in message
news:uLqgP4d5FHA.4076@.tk2msftngp13.phx.gbl...
> Hello Readers,
> I am looking for ways of auditing in SQL-server.
> Using Google I am a bit overwhelmed with solutions.
> At the moment we are looking at limited auditing, where
> the following has to be audited :
> user, date_time, some specific database mutations.
> Offcourse we want it :
> Fast, Good, Cheap.
> My thought up to now :
> 1. Logging of SQLserver (not too suitable for reading).
> 2. Profiler (not too suitable for continues use and rather limited for
> data).
> 3. Triggers (Expensive in resources ?)
> 4. Special tools. (This is the part I am overwhelmed with).
> Any good pointers ?
> (Google search words, specific sites, solutions ?)
> Thanks,
> Ben Brugman
>
Auditing on SQL-server.
I am looking for ways of auditing in SQL-server.
Using Google I am a bit overwhelmed with solutions.
At the moment we are looking at limited auditing, where
the following has to be audited :
user, date_time, some specific database mutations.
Offcourse we want it :
Fast, Good, Cheap.
My thought up to now :
1. Logging of SQLserver (not too suitable for reading).
2. Profiler (not too suitable for continues use and rather limited for
data).
3. Triggers (Expensive in resources ?)
4. Special tools. (This is the part I am overwhelmed with).
Any good pointers ?
(Google search words, specific sites, solutions ?)
Thanks,
Ben Brugman
Found this link :
http://www.akadia.com/services/sqlsr..._auditing.html
More suggestions are welcome.
Ben
"ben brugman" <ben@.niethier.nl> wrote in message
news:uLqgP4d5FHA.4076@.tk2msftngp13.phx.gbl...
> Hello Readers,
> I am looking for ways of auditing in SQL-server.
> Using Google I am a bit overwhelmed with solutions.
> At the moment we are looking at limited auditing, where
> the following has to be audited :
> user, date_time, some specific database mutations.
> Offcourse we want it :
> Fast, Good, Cheap.
> My thought up to now :
> 1. Logging of SQLserver (not too suitable for reading).
> 2. Profiler (not too suitable for continues use and rather limited for
> data).
> 3. Triggers (Expensive in resources ?)
> 4. Special tools. (This is the part I am overwhelmed with).
> Any good pointers ?
> (Google search words, specific sites, solutions ?)
> Thanks,
> Ben Brugman
>
|||Depends on exactly what you need to audit. Some of the less expensive 3rd
party tools such as
http://www.red-gate.com/products/SQL...scue/index.htm
are quick and easy. At those prices you can't develop a comparable auditor
yourself for the price. In SQL 2005 it gets even easier with the new DDL
triggers and information available via triggers. Here are some more
options:
http://www.aspfaq.com/show.asp?id=2496
http://www.aspfaq.com/show.asp?id=2448
Andrew J. Kelly SQL MVP
"ben brugman" <ben@.niethier.nl> wrote in message
news:uLqgP4d5FHA.4076@.tk2msftngp13.phx.gbl...
> Hello Readers,
> I am looking for ways of auditing in SQL-server.
> Using Google I am a bit overwhelmed with solutions.
> At the moment we are looking at limited auditing, where
> the following has to be audited :
> user, date_time, some specific database mutations.
> Offcourse we want it :
> Fast, Good, Cheap.
> My thought up to now :
> 1. Logging of SQLserver (not too suitable for reading).
> 2. Profiler (not too suitable for continues use and rather limited for
> data).
> 3. Triggers (Expensive in resources ?)
> 4. Special tools. (This is the part I am overwhelmed with).
> Any good pointers ?
> (Google search words, specific sites, solutions ?)
> Thanks,
> Ben Brugman
>
Auditing on SQL-server.
I am looking for ways of auditing in SQL-server.
Using Google I am a bit overwhelmed with solutions.
At the moment we are looking at limited auditing, where
the following has to be audited :
user, date_time, some specific database mutations.
Offcourse we want it :
Fast, Good, Cheap.
My thought up to now :
1. Logging of SQLserver (not too suitable for reading).
2. Profiler (not too suitable for continues use and rather limited for
data).
3. Triggers (Expensive in resources ?)
4. Special tools. (This is the part I am overwhelmed with).
Any good pointers ?
(Google search words, specific sites, solutions ?)
Thanks,
Ben BrugmanFound this link :
http://www.akadia.com/services/sqls...e_auditing.html
More suggestions are welcome.
Ben
"ben brugman" <ben@.niethier.nl> wrote in message
news:uLqgP4d5FHA.4076@.tk2msftngp13.phx.gbl...
> Hello Readers,
> I am looking for ways of auditing in SQL-server.
> Using Google I am a bit overwhelmed with solutions.
> At the moment we are looking at limited auditing, where
> the following has to be audited :
> user, date_time, some specific database mutations.
> Offcourse we want it :
> Fast, Good, Cheap.
> My thought up to now :
> 1. Logging of SQLserver (not too suitable for reading).
> 2. Profiler (not too suitable for continues use and rather limited for
> data).
> 3. Triggers (Expensive in resources ?)
> 4. Special tools. (This is the part I am overwhelmed with).
> Any good pointers ?
> (Google search words, specific sites, solutions ?)
> Thanks,
> Ben Brugman
>|||Depends on exactly what you need to audit. Some of the less expensive 3rd
party tools such as
http://www.red-gate.com/products/SQ...escue/index.htm
are quick and easy. At those prices you can't develop a comparable auditor
yourself for the price. In SQL 2005 it gets even easier with the new DDL
triggers and information available via triggers. Here are some more
options:
http://www.aspfaq.com/show.asp?id=2496
http://www.aspfaq.com/show.asp?id=2448
Andrew J. Kelly SQL MVP
"ben brugman" <ben@.niethier.nl> wrote in message
news:uLqgP4d5FHA.4076@.tk2msftngp13.phx.gbl...
> Hello Readers,
> I am looking for ways of auditing in SQL-server.
> Using Google I am a bit overwhelmed with solutions.
> At the moment we are looking at limited auditing, where
> the following has to be audited :
> user, date_time, some specific database mutations.
> Offcourse we want it :
> Fast, Good, Cheap.
> My thought up to now :
> 1. Logging of SQLserver (not too suitable for reading).
> 2. Profiler (not too suitable for continues use and rather limited for
> data).
> 3. Triggers (Expensive in resources ?)
> 4. Special tools. (This is the part I am overwhelmed with).
> Any good pointers ?
> (Google search words, specific sites, solutions ?)
> Thanks,
> Ben Brugman
>
Thursday, March 8, 2012
audit tables, delete triggers, and asp.net
appreciate it.
i have a web app connecting to a sql server using sql server
authentication. let's say, for example, my login/password is
dbUser/dbUser. the web app however, is using windows authentication.
so if I am logged into the network as 'DOMAIN\Eric', when I access my
web app, my web app knows that I am 'DOMAIN\Eric'. but to the sql
server db, I am user 'dbUser'.
now, i for each table i have, i need to implement an audit table to
record all updates, inserts, deletes that occur against it. i was
going to do so with triggers. this is all fine for selects, inserts,
and updates. for each table, i have an updatedby and an updatedate.
for example, let's say i have a table:
create table blah
(
id int,
col1 varchar(10),
updatedby varchar(30),
updatedate datetime
)
and corresponding audit table:
create audit_blah
(
id int,
blah_id int,
blah_col1 varchar(10),
blah_updatedby varchar(1),
blah_updatedate datetime
)
for update and insert triggers, i can know what to insert into the
updatedby column of audit_blah because it's in a corresponding row in
blah. my web app knows what user is accessing the application, and
can insert that name into blah. blah's trigger will then insert that
name into audit_blah.
however, in the case of a delete, i'm not passing in an 'updatedby',
because i'm deleting. in this situation, how can the trigger know
what user is deleting? the db only knows that sql user 'dbUser' is
deleting, but doesn't know that 'dbUser' is deleting on behalf of
'DOMAIN\Eric'. is there any way for my app to inform the trigger to
access my windows identity without having a corresponding row in the
table from which to pull that info?
obviously, i could have each of my app's users log into SQL server
through Windows authentication; then i could just use SYSTEM_USER.
but let's say, for performance's sake, it'd be better for me to use
one sql server login. (i believe one user works better for connection
pooling purposes.) is there a way to get around this?
(i'm hoping a built-in function exists that solves all my problems.)
suggestions? resources?
any help would be great appreciated.
happy turkeys.
EricHi
You may want to do soft deletes instead (possibly with a garbage collection
job!) or do the deletes through a stored procedure and log them differently.
John
"ecastillo" <encee5@.gmail.com> wrote in message
news:a2f0a8ac.0411252044.5dffaa2@.posting.google.co m...
> i'm in a bit of a bind at work. if anyone could help, i'd greatly
> appreciate it.
> i have a web app connecting to a sql server using sql server
> authentication. let's say, for example, my login/password is
> dbUser/dbUser. the web app however, is using windows authentication.
> so if I am logged into the network as 'DOMAIN\Eric', when I access my
> web app, my web app knows that I am 'DOMAIN\Eric'. but to the sql
> server db, I am user 'dbUser'.
> now, i for each table i have, i need to implement an audit table to
> record all updates, inserts, deletes that occur against it. i was
> going to do so with triggers. this is all fine for selects, inserts,
> and updates. for each table, i have an updatedby and an updatedate.
> for example, let's say i have a table:
> create table blah
> (
> id int,
> col1 varchar(10),
> updatedby varchar(30),
> updatedate datetime
> )
> and corresponding audit table:
> create audit_blah
> (
> id int,
> blah_id int,
> blah_col1 varchar(10),
> blah_updatedby varchar(1),
> blah_updatedate datetime
> )
> for update and insert triggers, i can know what to insert into the
> updatedby column of audit_blah because it's in a corresponding row in
> blah. my web app knows what user is accessing the application, and
> can insert that name into blah. blah's trigger will then insert that
> name into audit_blah.
> however, in the case of a delete, i'm not passing in an 'updatedby',
> because i'm deleting. in this situation, how can the trigger know
> what user is deleting? the db only knows that sql user 'dbUser' is
> deleting, but doesn't know that 'dbUser' is deleting on behalf of
> 'DOMAIN\Eric'. is there any way for my app to inform the trigger to
> access my windows identity without having a corresponding row in the
> table from which to pull that info?
> obviously, i could have each of my app's users log into SQL server
> through Windows authentication; then i could just use SYSTEM_USER.
> but let's say, for performance's sake, it'd be better for me to use
> one sql server login. (i believe one user works better for connection
> pooling purposes.) is there a way to get around this?
> (i'm hoping a built-in function exists that solves all my problems.)
> suggestions? resources?
> any help would be great appreciated.
> happy turkeys.
> Eric|||[posted and mailed, please reply in news]
ecastillo (encee5@.gmail.com) writes:
> however, in the case of a delete, i'm not passing in an 'updatedby',
> because i'm deleting. in this situation, how can the trigger know
> what user is deleting? the db only knows that sql user 'dbUser' is
> deleting, but doesn't know that 'dbUser' is deleting on behalf of
> 'DOMAIN\Eric'. is there any way for my app to inform the trigger to
> access my windows identity without having a corresponding row in the
> table from which to pull that info?
You could use SET CONTEXT_INFO. This command is somewhat tricky to use,
but it's workable. This commands sets the column context_info in
sysprocesses. The value is a binary value. Here is an example:
declare @.bin varbinary(30)
select @.bin = convert(varbinary(30), 'DOMAIN\Eric')
set context_info @.bin
go
select convert(varchar(30), context_info)
from master..sysprocesses where spid = @.@.spid
The web server would do the first part, the trigger the second part.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Saturday, February 25, 2012
Attribute Relationships in Project Real
Hi,
I'm just trying to dig a little bit deeper into attribute relationships... The documentation of Project Real is a quite interesting read... So if you have a look at http://www.microsoft.com/technet/prodtechnol/sql/2005/realastd.mspx (the technical drilldown for Analysis Services) or even better http://www.microsoft.com/technet/images/prodtechnol/sql/2005/Images/realastd02_big.gif you find an example how to construct attribute relationships.
But here's my problem: do I have a problem in understanding attribute relationships or doesn't also Microsoft know how to deal with them? Why are Fiscal Year/Qtr/Period listed as attribute relationships for Day? This doesn't make sense to me...
Thomas,
If you know the value of Day (the date) then - by defintion - you will also know the value of Fiscal Year/Qtr/Period, since any given date can only belong to one of these. For instance, with a fiscal year starting july 1 and ending june 30, november 11, 2005 will belong to
Fiscal Year: 2005
Fiscal Quarter: 2
Fiscal Period: 5
Also notice that all the attributes in any dimension will always (directly or indirectly) be related to the key attribute in the dimension (and in this case the key attribute is Day)...
|||Michael,
I aggree 100%... My question is: Why did Microsoft define i.e. the Fiscal Quarter as a direkt attribute relationship to the day? This should be an indirect relationship through Period as with the calendar dimension (through month)... This would make aggregations on the fiscal hirarchy impossible...
Thanks,
|||You are right Thomas... The Fiscal Qtr and Fiscal Year attributes are actually redundantly related to the Day attribute. I do not think it means anything though, since the relationships between Fiscal Year, Fiscal Qtr, Fiscal Period have been specified (Fiscal Year is related to Fiscal Qtr is related to Fiscal Period is related to Day).
Now I wonder, however, how Fiscal Period can be related to Fiscal Week, since knowing a week doesn't automatically mean that you know a month (I am assuming that Fiscal Period is actually just a month).
|||Well, that was something I was wondering about, too! In the document they state that with confidence... However I don't understand that, too! A week can belong to two months, everything else doesn't make much sense... I only could think about something like "week of 01-February", so this week belongs to "February", regardless of January, 31 is part of that week or not...|||Sorry. I left them that way to demonstrate how NOT to specify attribute relationships. The way that the Calendar attributes are setup is the correct way. The guiding best practice that I use is that if an attributes are both directly and indirectly related, then you should drop the direct relationships. Thus for the Fiscal attributes, day should be directly related to period, which is directly related to qtr which is direct related to year. The direct relationships between (day and qtr) and (day and year) should be dropped -- like they are with Calendar.
Hope that helps.
_-_-_ Dave
|||
Dave,
that makes sense... Any comments on the weeks, too?
Thanks,
|||You have to have a direct relationship to weeks because it is the bottom of the natural hierarchy (immeditately above the key attribute).
_-_-_ Dave
|||Well... I disagree. A week can span two months, which is why I think a relationship cannot be defined between Fiscal Period (Month) and Fiscal Week.
Deepak is right. If you look at the dimension, B&N has a very unique way of defining fiscal weeks. It isn't the same as calendar weeks.
_-_-_ Dave
Attribute Relationships in Project Real
Hi,
I'm just trying to dig a little bit deeper into attribute relationships... The documentation of Project Real is a quite interesting read... So if you have a look at http://www.microsoft.com/technet/prodtechnol/sql/2005/realastd.mspx (the technical drilldown for Analysis Services) or even better http://www.microsoft.com/technet/images/prodtechnol/sql/2005/Images/realastd02_big.gif you find an example how to construct attribute relationships.
But here's my problem: do I have a problem in understanding attribute relationships or doesn't also Microsoft know how to deal with them? Why are Fiscal Year/Qtr/Period listed as attribute relationships for Day? This doesn't make sense to me...
Thomas,
If you know the value of Day (the date) then - by defintion - you will also know the value of Fiscal Year/Qtr/Period, since any given date can only belong to one of these. For instance, with a fiscal year starting july 1 and ending june 30, november 11, 2005 will belong to
Fiscal Year: 2005
Fiscal Quarter: 2
Fiscal Period: 5
Also notice that all the attributes in any dimension will always (directly or indirectly) be related to the key attribute in the dimension (and in this case the key attribute is Day)...
|||Michael,
I aggree 100%... My question is: Why did Microsoft define i.e. the Fiscal Quarter as a direkt attribute relationship to the day? This should be an indirect relationship through Period as with the calendar dimension (through month)... This would make aggregations on the fiscal hirarchy impossible...
Thanks,
|||You are right Thomas... The Fiscal Qtr and Fiscal Year attributes are actually redundantly related to the Day attribute. I do not think it means anything though, since the relationships between Fiscal Year, Fiscal Qtr, Fiscal Period have been specified (Fiscal Year is related to Fiscal Qtr is related to Fiscal Period is related to Day).
Now I wonder, however, how Fiscal Period can be related to Fiscal Week, since knowing a week doesn't automatically mean that you know a month (I am assuming that Fiscal Period is actually just a month).
|||Well, that was something I was wondering about, too! In the document they state that with confidence... However I don't understand that, too! A week can belong to two months, everything else doesn't make much sense... I only could think about something like "week of 01-February", so this week belongs to "February", regardless of January, 31 is part of that week or not...|||Sorry. I left them that way to demonstrate how NOT to specify attribute relationships. The way that the Calendar attributes are setup is the correct way. The guiding best practice that I use is that if an attributes are both directly and indirectly related, then you should drop the direct relationships. Thus for the Fiscal attributes, day should be directly related to period, which is directly related to qtr which is direct related to year. The direct relationships between (day and qtr) and (day and year) should be dropped -- like they are with Calendar.
Hope that helps.
_-_-_ Dave
|||
Dave,
that makes sense... Any comments on the weeks, too?
Thanks,
|||You have to have a direct relationship to weeks because it is the bottom of the natural hierarchy (immeditately above the key attribute).
_-_-_ Dave
|||Well... I disagree. A week can span two months, which is why I think a relationship cannot be defined between Fiscal Period (Month) and Fiscal Week.
Deepak is right. If you look at the dimension, B&N has a very unique way of defining fiscal weeks. It isn't the same as calendar weeks.
_-_-_ Dave
Friday, February 24, 2012
Attribute Key Cannot Be Found: Single Underlying Table!
I'm building a cube from a single table. That table is used to build both the attributes and measures. I sometimes get the "attribute key cannot be found" error even though queries prove that the data indeed there. Often all that needs to happen to fix the problem is to simply reprocess the cube without making any changes.
Any ideas as to how I could fix this problem? It causes a problem as the cube is scheduled and that is failing. I can't be rebuilding the cube manually each day.
Hello! Even if you have fact table dimensions this problem can be related to that you must always process the dimensions first and the rest of the cube later. If you use MOLAP for storage the dimensions will be built as separate objects even if you use a single table as source.
If you process the cube and have activated "process related objects" in the advanced settings dialogue you can process the cube and the dimensions will be processed first.
HTH
Thomas Ivarsson
|||Perfect! That you so much for your help, Thomas. That makes good sense. I've set the Integration Service project to Process Related Objects.Thanks Again,
Robin Sarac
edit: Spelling mistakes...
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.
-- 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.
-- 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)
Thursday, February 9, 2012
Attach subscription MDF
Our subscriber crashed and they had a quite a bit of work captured after the
last synch up to the publisher. We salvaged the MDF and LDF.
I have tried attaching this subscriber to a new machine which worked fine,
now I want to synch that data with publisher. Is this possible? I cant
seem to get this to work.
Any ideas?
Thanks in advance
Warren Patterson.
it should work. As long as the agents are in place you should be able to
start them up again. I'd take a backup before you do anything however.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Warren Patterson" <des@.newsgroups.nospam> wrote in message
news:e9jzmMJ9EHA.3756@.TK2MSFTNGP14.phx.gbl...
> Hi,
> Our subscriber crashed and they had a quite a bit of work captured after
the
> last synch up to the publisher. We salvaged the MDF and LDF.
> I have tried attaching this subscriber to a new machine which worked fine,
> now I want to synch that data with publisher. Is this possible? I cant
> seem to get this to work.
> Any ideas?
> Thanks in advance
> Warren Patterson.
>
>
|||Thanks Hilary.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uFh%23UUL9EHA.2452@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> it should work. As long as the agents are in place you should be able to
> start them up again. I'd take a backup before you do anything however.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "Warren Patterson" <des@.newsgroups.nospam> wrote in message
> news:e9jzmMJ9EHA.3756@.TK2MSFTNGP14.phx.gbl...
> the
fine,
>
attach some extra pdf documents ?
bit field value ?
regards
ilkerYou cant add directly instead you can provide a hyperlink where by users will
click and get the PDF.
Amarnath, MCTS
"ilker tiryaki" wrote:
> how do I add some extra pdf documents into my report pages it depends on db
> bit field value ?
> regards
> ilker|||On Mar 12, 3:30 am, ilker tiryaki
<ilkertiry...@.discussions.microsoft.com> wrote:
> how do I add some extra pdf documents into my report pages it depends on db
> bit field value ?
> regards
> ilker
If you are needing to have a portion of the report to export to PDF
based on a bit field in the database, you can either use a subreport
in the report that only returns data for cases of the bit field being
set -or- do the same with a table in the report. I think you should be
able to toggle the visibility based on the dataset that will populate
this extra section. If you are looking to just include external PDF
documents, I believe that Amarnath is correct.
Regards,
Enrique Martinez
Sr. SQL Server Developer