Showing posts with label views. Show all posts
Showing posts with label views. Show all posts

Thursday, March 22, 2012

Adventureworks 2005

I am running sqlserver2005(ctp) and trying to get the sample database adventureworks loaded so that I have some examples of proc, views, etc.

I finally found the database and downloaded it but when I try to attach I get the following message:

"The database 'AdventureWorks' cannot be opened because it is version 611. This server supports version 603 and earlier. A downgrade path is not supported. Sould not open new database 'AdventureWorks'. CREATE DATABASE is aborted. "

I have MS SQL Server management Studio version 9.00.116.00
MS Analysis Services Client Tools 2000.090.1116.00
MS Data Access Components 2000.086.1830.00(srv03_sp1_rtm.050324-1447)
MS MSXML 2.6.3.0.4.0.6.0
MS IE 6.0.3790.1830
MS .NET Framework 2.0.50215.44
Operating System 5.2.3790

I believe all of this is up to date. Can someone tell me if I need an upgrade (and where that would be) or if there is a version of the AdventureWorks I can use with my current configuration(and where that would be)?

dfw

I think when you install the CTP, there should me a menu item that prompts you to install the sample databases and other tutorials. Did you check that out? If you are using the September CTP, its there in the Readme notes on how to do this.|||Many, many thanks.
I should have realized the files would be on the install disk. I check and there they are!

dfw

Monday, March 19, 2012

Advantage of using Catalog views

Hi,

Can anyone tell the advantage of using the new catalog views over the traditional system tables which were given as compatiblity views in sql server 2005

The compatibility views will not be upgraded to support newer metadata information (post-2000), also because some of the limits such as user numbers have increased the old views will error or return NULLs if the value ranges for the old system tables are exceeded (see - http://msdn2.microsoft.com/en-us/library/ms187376.aspx).

Basically you are locked into a view of the database that does not allow for all the features in SQL Server 2005 if you use the compatibility views.

|||

for all new feature SQL Server 2005 , you have use Catalog views or DMVs. Compatibility views are only for backward compatibility , which will be removed in the next version. All the new development work should not use Compatibility views.

Madhu

Friday, February 24, 2012

ADO.NET DATAVIEWS VERSUS SQL ENGINE

Hi All,

Any suggestions / views / help on below question would be welcomed.

I am building an asp.net 2.0 application with sql 2005 express as back end. My back end has 3 major tables which are:

tblArticles - saves basic info on articles posted by user (like articleid, title, short desc, rating, views, etc)

tblCategories - saves various categories and their hierarchies (id, parented, name, etc)

tblArticleCategories - saves info on which articles fall in which categories (like articleid, categoryid)

as of now, i am caching all rows from the first 2 tables, but i am in a bit of doubt for caching the third table (tblArticleCategories), although data in this table wont change very often and also this table will just have 2 columns and not many rows as well and this is a good target for caching,

but the reason I am in a bit of doubt to cache this table is, when my website visitor clicks on any category link in the category tree view, I need to use an inner join across all these 3 tables to locate and return all articles found in that particular category.

But I can do the same thing without hitting the database as I already have 2 of the required 3 tables in my cache, I can simply add the third table to my cache and then using the dataview objects rowfilter property on these 3 cached tables, I can very well get the appropriate results.

But I wonder which of the 2 methods would you prefer and suggest, I mean do you feel that just to save hits against the database, I am going to far and doing a lot of crap using the dataview (which might not be as efficient as sql engine) or you feel that the inefficiency of the dataview will still win compared to the cost of hitting the database for this

Thanks in advance, bye take care

Raj Chaudhari, Mumbai, India (MCAD.NET)

www.xtremebiz.biz

i would cache smaller objects that are the result of a more specific query.

let the db do its joins and return from the db only articles for a specific category.
cache this data.

when other categories are selected, hit the db, and cache that data too as a seperate object.

the result is that you dont need to perform rowfiltering on every page hit and you will only have articles in cache for categories that have been selected

|||If you are using SQL Express or SQL Server 2005 as the back end, it sounds like you are doing a lot of manual work that you really don't need to. Just use the SQLDatasource object, put your query in the select query text property, set the caching to true, and set the cache dependancy property to the appropriate value "tblArticles,tblCategories,tblArticleCategories" for the query that access all 3 tables. If you have performance problems after that, address them at the time. Heck, remember prior to ASP.NET 2.0 *most* applications did no caching of database queries at all and ran just fine.