Showing posts with label particular. Show all posts
Showing posts with label particular. Show all posts

Tuesday, March 27, 2012

configuration management and version history SQL 2005

I have a Database on SQL 2005.I want to trace what all changes were made in
this database on a particular date. A kind of report that will highlight all
changes made to the DB on that date. How do I acheive that ? Please advice.
NAT (NAT@.discussions.microsoft.com) writes:
> I have a Database on SQL 2005.I want to trace what all changes were made
> in this database on a particular date. A kind of report that will
> highlight all changes made to the DB on that date. How do I acheive that
> ? Please advice.
What changes? Data? Metadata?
The default traces captures some of the metadata changes (I can't vouch
for that it captures it all). You can access this information by right-
clicking the database, select Reports and then Schema Changes History.
If the server has been restarted since that particular date, this is not
like to work out.
If you are looking for changes in data, a log reader is your sole
alternative. And only if you run with full recovery and still have
the transaction log around. Log readers are third-party tools and some
vendors are Lumigent, Log PI and ApexSQL.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Are you looking for a change control tool? If so then Embarcedaro's Change
Manager is very good
Sincerely,
John K
Knowledgy Consulting
http://knowledgy.org
Atlanta's Business Intelligence and Data Warehouse Experts
"NAT" <NAT@.discussions.microsoft.com> wrote in message
news:60C27EC6-F62F-4328-87BC-FA6BBCCC25E2@.microsoft.com...
>I have a Database on SQL 2005.I want to trace what all changes were made in
> this database on a particular date. A kind of report that will highlight
> all
> changes made to the DB on that date. How do I acheive that ? Please
> advice.

Tuesday, March 20, 2012

conditionally execute a subreport

I have a report that contains several subreports, one of which is meant to be
displayed only when the subject of the report has a particular job title. The
data source for this subreport is a stored procedure, and in that procedure I
examine the job title and execute the code only for the specified job title,
but SQL Server goes ahead and opens all of the tables anyway, increasing
overhead on a report that already takes several hours to run.
A better solution would be to conditionally execute the subreport. Is there
a way to do that?
thanks, bethMy understanding of Reporting Services is that it is not meant to work that
way. This is not a client program; it is a server platform. There is
therefore no event-driven programming paradigm like you get in Access. It is
by design.
If you want to do the kind of thing you are talking about, you will need to
change your design. You can design two separate reports, or you can write
your own client program to conditionally load reports.
There is a sample demo of how to integrate reports in your application on
http://www.microsoft.com/sql/reporting. It shows how to use a browser control
in a Windows application.
sorry if this is not the answer you wanted.
Charles Kangai, MCT, MCDBA
"beth" wrote:
> I have a report that contains several subreports, one of which is meant to be
> displayed only when the subject of the report has a particular job title. The
> data source for this subreport is a stored procedure, and in that procedure I
> examine the job title and execute the code only for the specified job title,
> but SQL Server goes ahead and opens all of the tables anyway, increasing
> overhead on a report that already takes several hours to run.
> A better solution would be to conditionally execute the subreport. Is there
> a way to do that?
> thanks, beth|||Charles,
I will persue the alternatives you suggested - thank you.
I don't understand your point about client versus server platforms.
If I can conditionally toggle visibility of an object, why could I not toggle
say, an enable/disable property, of a subreport? If this is by design though,
I guess that's that.
I could try placing another stored procedure up front that examines the job
title, that will then conditionally execute the stored procedure that opens
all the
tables and collects the data; using this method, I could at least stop SQL
Server from opening tables it is not going to use. Not sure that will work
though.
thank you for your reply Charles...beth
"Charles Kangai" wrote:
> My understanding of Reporting Services is that it is not meant to work that
> way. This is not a client program; it is a server platform. There is
> therefore no event-driven programming paradigm like you get in Access. It is
> by design.
> If you want to do the kind of thing you are talking about, you will need to
> change your design. You can design two separate reports, or you can write
> your own client program to conditionally load reports.
> There is a sample demo of how to integrate reports in your application on
> http://www.microsoft.com/sql/reporting. It shows how to use a browser control
> in a Windows application.
> sorry if this is not the answer you wanted.
> Charles Kangai, MCT, MCDBA

Sunday, March 11, 2012

conditional split problem

I have been transfering data from text file to sql databases.

I have a conditional split where i check to if the address has changed for a particular person.If yes i direct to update else i direct to default output which means no change.

when i connect error output of conditional split to a database or union all couple of rows are directed to error output.But i dont understand the reason.How would i be able to know why they r directed to error.

Please let me know.

When the rows are sent to the error output they should have two new columns (ErrorCode and ErrorColumn) added to them. To determine the cause of the error, I would start by looking at these values, and then researching the code(s) that they contain.|||

This is a way of doing what Matthew suggested:

By default every error output in your dataflow will add a couple of columns: ErrorNumber and error column. The you can use script task to get the description of the error. Jamie has an explanation of that on his blog:

http://blogs.conchango.com/jamiethomson/archive/2005/08/08/1969.aspx

Conditional Select Statement

Hello dbForumers,

Yet another puzzling question. I remember I saw somewhere a particular syntax to select a column based on a conditional predicate w/o using a user defined function. What I want to accomplish is this : SELECT (if column colA is empty then colB else colA) as colC from SomeTable. Possible ? Not possible? Have I hallucinated ?

Thank You!possible.
select (case colA when ='' then colB else colA end) as colC

Originally posted by Rollmops
Hello dbForumers,

Yet another puzzling question. I remember I saw somewhere a particular syntax to select a column based on a conditional predicate w/o using a user defined function. What I want to accomplish is this : SELECT (if column colA is empty then colB else colA) as colC from SomeTable. Possible ? Not possible? Have I hallucinated ?

Thank You!|||Yay, right on target.

But now I have some difficulties testing the NULL state... the syntax: ...(CASE VTE1 WHEN NULL THEN ACHN ELSE VTE1 END) AS COND_ACHN... won't throw any errors but wont work as excepted since it always sends the ELSE case no matter what...|||select isnull(vte1,achn) as COND_ACHN
or

select (CASE WHEN VTE1 is NULL THEN ACHN ELSE VTE1 END) AS COND_ACHN

Originally posted by Rollmops
Yay, right on target.

But now I have some difficulties testing the NULL state... the syntax: ...(CASE VTE1 WHEN NULL THEN ACHN ELSE VTE1 END) AS COND_ACHN... won't throw any errors but wont work as excepted since it always sends the ELSE case no matter what...|||Yay, right on target.

But now I have some difficulties testing the NULL state... the syntax: ...(CASE VTE1 WHEN NULL THEN ACHN ELSE VTE1 END) AS COND_ACHN... won't throw any errors but wont work as excepted since it always sends the ELSE case no matter what...|||To determine if an expression is NULL, use IS NULL or IS NOT NULL rather than comparison operators (such as = or !=).
follow the code of my previous message.It should work for u.

Originally posted by Rollmops
Yay, right on target.

But now I have some difficulties testing the NULL state... the syntax: ...(CASE VTE1 WHEN NULL THEN ACHN ELSE VTE1 END) AS COND_ACHN... won't throw any errors but wont work as excepted since it always sends the ELSE case no matter what...|||I just had to remove the 'VTE1' in ...(CASE VTE1... for the predicate to work accordingly =) anyways thanks a lot it works just fine now =)

Wednesday, March 7, 2012

Conditional Formatting Question

I have a column that contains either a test score or the state abbreviation where the student passed a particular test. I want the text to be red between 100-159, green greater than or equal to 160 and black otherwise.

This is what I've tried to take care of the scores:

=IIf(Fields!Score.Value <= 159 and Fields!Score.Value > 100,"Red", "Green")

Two issues:
I want all other scores (< 100) to be Black and
I'm not sure how to deal with the state abbreviations. I'm assuming this is why I receive this error:

[rsRuntimeErrorInExpression] The Color expression for the textbox ‘Score’ contains an error: Input string was not in a correct format.
Preview complete -- 0 errors, 1 warnings

All data is stored as varchar.

Hello,

Yes, the reason you get that warning is because your field is stored as varchar. I think this will do what you want, you can add additional conditions for different colors.

=Switch(

IsNumeric(Fields!Score.Value) and cInt(Fields!Score.Value) >= 160, "Green",

IsNumeric(Fields!Score.Value) and cInt(Fields!Score.Value) > 100, "Red",

1=1, "Black"

)

Jarret

|||Thanks. That did it.

Conditional Formatting on a table

Hi all,

Any ideas how to apply conditional formatting depending on the value of a particular cell in a table. Basically i want to say that if a value is less than 0, then that figure should have a red background, if the figure is = 0, then leave it white, and then if the figure is more than 0, then put a green background on it. Any ideas how to do this??

Miles

Here is an article that may help you outhttp://blogs.msdn.com/swisowaty/attachment/661446.ashx

About half way into the article it talks about conditional formating with colors.

Saturday, February 25, 2012

Conditional fields based on export type

I need to be able to suppress the printing of a particular value when exporting, but not when displaying on a web viewer on-line. I can place an IIF() condition around the field to do this, but do not know how to obtain a parameter/value/function which would recognize that the viewer has selected an export (To .PDF for example).

I would prefer there be a direct parameter I can read from the RDL language, however recognizing the selection while setting up the viewer to be displayed in the code-behind and setting an external parameter is also an option.

Any help would be appreciated.

Jerry

Hi Jerry

I do not know if it is possible for PDF. I know you can limit what fields are exported for CSV and XML.
To do this open the properties box on the field you do not wish to export and click on the data output tab.
Then change the Output radio box from 'Auto' to 'No'

Cheers
Mark
|||

What I really need is the ability to disable the creation of the hyperlink when the report is exported.

I see now that the pageload method is not even fired at the time the choice to export is made. Therefore I will need to determine what program is being run upon this selection and be able to set the parameters of that program. As I see now this just may not exist.

Friday, February 24, 2012

Conditiional DTS package start

Let's imagine that we have "conditional" start of DTS package (for
this post I will call it DoIt)
DTS package DoIt must be started when particular event occur.
Event is: we have an empty folder on the disk. When an outside program
send a file (for example message.txt) in that folder - it is a signal
that DTS package DoIt can be started.
So, we must permanently check is the message.txt file exist in that
folder. Also, when DTS package is started we must exclude possibility
that DTS package DoIt start once or more again (because message.txt
file is there).
Can anybody help me with this problem. Is it possible to write a
program that:
- permanently check is the message.txt exist in a folder
- start DTS package DoIt when the message.txt exist
- rename a message.txt file -> message.old
... or someone have a better idea?
Thanks for your answers...> Can anybody help me with this problem. Is it possible to write a
> program that:
> - permanently check is the message.txt exist in a folder
> - start DTS package DoIt when the message.txt exist
> - rename a message.txt file -> message.old
You can create a scheduled job with ActiveX script task, and then in
VBScript use FileSystemObject to check the folder for the file. Then you run
the package with DTSRun and finally rename or move the file with
FileSystemObject again. I have an example how to use FileSystemObject in
VBScript at
http://solidqualitylearning.com/blo...12/19/225.aspx. You
can schedule this job on every hour, for example, if this is enough.
More advanced solution can be written in .NET using the FileSystemWatcher
Class.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Dear Dejan,
I also have idea (with some others) that solution with VBS will
probably give me a solution. Unfortunately, my knowledge about VBS is
very limited.
The employers who know about VBS are leaving my company. No time for
learning for me. And now I need a quick solution.
I know that is unusual to ask you this, but when I saw your code I
hope that VBS that I need is not big problem for you. But it is for
me.
Is it possible to send me VBS that solve my problem?
I will understand if you have no time or think that my wish is unfair.
Thank you for your post and any new.
Best regards.