Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Sunday, March 25, 2012

Best Project Template & "The View of the event class could not be materialized"

Can someone explain this statement to me. "The View of the event class could not be materialized". I get it when I try to do a build of my Instance.

Also, yesterday I used CopySample to prepare an instance for my project. I'm not sure if this is the right way to go.

Is there a better template to use or process to follow to create a complete project (including Visual Studio Build Scripts, etc...)

Thanks

...Ray

Ray,
"The View of the event class could not be materialized" is a runtime error, not a build-time error. Are you sure you saw this while building your instance?

Here's what the error means:
Before SQL-NS executes the rules in your application (match rules or chronicle rules) it first builds views of the events and subscriptions tables. These views provide the input data for the rules: they contain only the events and subscriptions against which the rule should operate in any given firing. The error means that something when wrong during the process of setting up these views. Usually the rest of the error message provides more detail on the problem. If you could include the complete message, we'd be able to diagnose the problem better. The most common cause of this is a timeout, which can happen if the event batch is huge.

Also, please tell us what version of SQL-NS you're using - is it SQL 2000 (NS2.0) or SQL 2005? If 2005, which build are you using?

Regarding your question about the best template, you can certainly use the ones provided with the samples. However, this does involve starting from a pre-existing application and changing/removing things to make it do what you want. In my book (http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/) I describe how to set up a "minimal" instance and application (with just the elements required to get it to build) and then add the code you want piece by piece. The book's CD-ROM provides all the necessary files and instructions on setting this up.

Hope this helps.
-shyam

Thursday, March 8, 2012

Best Practice Analyzer

I just installed the product, and noticed in the instructions to print it states go to
compliance reports, view reports, and click the print reports button.
I only have a "Copy Report" "Remove Report" "Previous Report" "Next Report" button.
Build:1.0.59.0
Hi Robert
It is a doc bug. :-( Sorry about it. You'll have to copy from BPA and paste
into word/excel/etc to print or use reporting services to generate reports
which can also be exported to multiple formats - and print of course.
- Christian
___________________________
Christian Kleinerman
Program Manager, SQL Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Robert Salazar" <Robert Salazar@.discussions.microsoft.com> wrote in message
news:5575B090-38F2-453D-AD3B-F4EB9294C5FC@.microsoft.com...
> I just installed the product, and noticed in the instructions to print it
states go to
> compliance reports, view reports, and click the print reports button.
> I only have a "Copy Report" "Remove Report" "Previous Report" "Next
Report" button.
>
> Build:1.0.59.0
>
|||Do I have to install MS Reporting Services on a IIs machine? Is there a way to install on it on my local PC and use the report options with the BPA.
Thanks
"Christian Kleinerman [MS]" wrote:

> Hi Robert
> It is a doc bug. :-( Sorry about it. You'll have to copy from BPA and paste
> into word/excel/etc to print or use reporting services to generate reports
> which can also be exported to multiple formats - and print of course.
> - Christian
> --
> ___________________________
> Christian Kleinerman
> Program Manager, SQL Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Robert Salazar" <Robert Salazar@.discussions.microsoft.com> wrote in message
> news:5575B090-38F2-453D-AD3B-F4EB9294C5FC@.microsoft.com...
> states go to
> Report" button.
>
>
|||You do need to install Reporting Services (RS). You could use a server with
IIS or your local PC (which likely has IIS too). The question becomes more
of a licensing issue. You can install RS free of charge in the same machine
where you have your SQL Server. In a different machine, I believe it
requires a new license.
- Christian
___________________________
Christian Kleinerman
Program Manager, SQL Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"robert_at_cbb" <robertatcbb@.discussions.microsoft.com> wrote in message
news:413B4B6F-2EA1-4DE5-AD6E-AE100EF294F3@.microsoft.com...
> Do I have to install MS Reporting Services on a IIs machine? Is there a
way to install on it on my local PC and use the report options with the BPA.[vbcol=seagreen]
> Thanks
> "Christian Kleinerman [MS]" wrote:
paste[vbcol=seagreen]
reports[vbcol=seagreen]
rights.[vbcol=seagreen]
message[vbcol=seagreen]
it[vbcol=seagreen]

Wednesday, March 7, 2012

Best method to identify broken view is schemabind?

I am looking for the best way to know if table changes are going to break a view. Is the best way to do this by using the schemabinding option when creating the view? What are the disadvantages of using schemabinding for a view?

Are there other methods to evaluate views as broken? Can you run a sp_ proc or a custom SQL procedure to validate all views?

Thanks.

Schemabinding is the best way to prevent broken views. It will make sure that dependency information is always up to date.

One method I have used is to write a simple query like:

select 'select ''' + name + '''; select top 1 * from ' + name + ';' + char(13) + char(10) + 'G0'

from sys.views

and then just run the output. Broken views will cause errors that should be easy enough to follow...

Friday, February 24, 2012

best approach

I have two tables with same datatypes. I need to view all the rows
from both tables and check to see if they exist in a third table while
viewing the data. My plan thus far is to use a union query and a
function that returns a bit showing if they are in third table. Should
I use this approach (shown below) or should this be a join query
between the union portion and third table with consideration to speed
and viability?
select chemical, fncExist(cid) as exist
from table1
union all
select chemical, fncExist(cid) as exist
from table2
where:
CREATE FUNCTION dbo.fncExist
(
@.cid int
)
RETURNS bit
AS
BEGIN
declare @.exist int
declare @.bln bit
select @.exist =Count(id) from table3 where vid = @.cid
if @.exist>0
begin
@.bln=1
end
else
begin
@.bln=0
end
RETURN @.bln
ENDUsing a scalar function like this can really bring performance down to
snail-on-glue speed.
Try something like this:
select <column list>
,exist
= case when <third table>.<unique key> is null
then 0
else 1
end
from (
select chemical
,cid
from table1
union all
select chemical
,cid
from table2
) Both
left join <third table>
on <third table>.cid = Both.cid
ML
http://milambda.blogspot.com/|||Thanks thats what I needed to know.

Benefits of using SQL over XML

Hi,

I have a question relating to XML and SQL. My company currently runs a website which allows its clients to log in, view their accounts and transaction history online. The website is totally read only with the exception of changing passwords.

The data is taken from our back office system overnight which runs an oracle 8i database (we cannot like our website to the database due to the agreement we have in place with our software supplier). The data is written to a CSV file which is then converted into XML. The XML file is saved to the webserver and is referenced by the website.

The structure of the website has a relationship where the Client has a Manager who can see their clients accounts, a Branch level that can see all of their Managers and the underlying clients and then finally a company level that sees everything.

We are finding that using XML is causing a real issue in performance and I was wondering if migrating the website to SQL server would improve the performance of the queries etc .

Any advice would be gratefully recieved

Lee

It really depends on two things: The application and the version of SQL Server you are using. For certain input/retrieval methods, XML can actually be faster than using direct database calls. SQL Server 2005 has native XML features, which you can read more about here:

http://www.sqlsummit.com/People/MRys.htm

Buck

|||

The thing is that our website is taking considerably longer to return results using XML. Our software provider can provide a website which uses Oracle and an example website using test data seems to query and return the data back in far less time then ours using XML. But this site is a lot more costly option and does not provide all the functionalty we require. The main reason for the performance increase is that we want to be able to use the website internally for our branches and front office staff, so performance is key it will have about 20 - 30 users. We are planning to do this because we are unable to restrict access to parts of our back office system from the front office staff. The problem with the performance of the website currently means that the staff will have to deal with a sluggish system.

Our website designer has said that he would have to rewrite the website to change it from XML to SQL, would XQuery be a simpler solution. We are within reason happy to purchase whatever software is required to make this work.

|||

Again, it all depends on how the application is coded. Simply changing from XML to an RDBMS query doesn't guarentee that one will be faster than the other. In other words, you can code an application to be faster in either case.

If performance is key, then for large data sets a database platform might be the way to go. If you need to share data between multiple systems, then XML might be the way to go. It all depends on your needs, but in either case you'll want to evaluate your code to ensure that it is as optimal as possible for your situation.