Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Wednesday, March 28, 2012

How to create or learn AdventureWorks Data Warehouse

Would like to learn how to create Data Warehouse. "AdventureWorks Data
Warehouse" sample is great sample. but it seems like that there is no
source/book to show that how to generate it from "AdventureWorks OLTP".
I would like to want to know the "PROCESS" or 'WHY ->>>> design these fact
or dim tables" and "Business Logic" behind.
I know that there are many sources to show the process from 'AdventureWorks
Data Warehouse " to "AdventureWorks AS or Cube", BUT there is few source to
show the process from "AdventureWorks OLTP" database to "'AdventureWorks
Data Warehouse".
Any advices'frankie lo wrote:

> Would like to learn how to create Data Warehouse. "AdventureWorks Data
> Warehouse" sample is great sample. but it seems like that there is no
> source/book to show that how to generate it from "AdventureWorks OLTP".
> I would like to want to know the "PROCESS" or 'WHY ->>>> design these fact
> or dim tables" and "Business Logic" behind.
> I know that there are many sources to show the process from 'AdventureWork
s
> Data Warehouse " to "AdventureWorks AS or Cube", BUT there is few source t
o
> show the process from "AdventureWorks OLTP" database to "'AdventureWorks
> Data Warehouse".
> Any advices'
you can find a good start from here
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqltut9/html/db55e226-601a-4026-8651-5
73195555a59.htm
Regards
Amish Shah|||Hi amish,
It is 'SQL Server 2005 Analysis Services Tutorial", it assumes that
"'Adventure Works Data Warehouse" was well-developed and then to start to
create cube by AS.
What I am looking for is how to create fact/dim tables in ''Adventure Works
Data Warehouse".
"amish" <shahamishm@.gmail.com> wrote in message
news:1160391925.433024.115200@.i3g2000cwc.googlegroups.com...
> frankie lo wrote:
>
> you can find a good start from here
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqltut9/html/db55e226-601a-4026-8651
-573195555a59.htm
> Regards
> Amish Shah
>

How to create or learn AdventureWorks Data Warehouse

Would like to learn how to create Data Warehouse. "AdventureWorks Data
Warehouse" sample is great sample. but it seems like that there is no
source/book to show that how to generate it from "AdventureWorks OLTP".
I would like to want to know the "PROCESS" or 'WHY ->>>> design these fact
or dim tables" and "Business Logic" behind.
I know that there are many sources to show the process from 'AdventureWorks
Data Warehouse " to "AdventureWorks AS or Cube", BUT there is few source to
show the process from "AdventureWorks OLTP" database to "'AdventureWorks
Data Warehouse".
Any advices?
frankie lo wrote:

> Would like to learn how to create Data Warehouse. "AdventureWorks Data
> Warehouse" sample is great sample. but it seems like that there is no
> source/book to show that how to generate it from "AdventureWorks OLTP".
> I would like to want to know the "PROCESS" or 'WHY ->>>> design these fact
> or dim tables" and "Business Logic" behind.
> I know that there are many sources to show the process from 'AdventureWorks
> Data Warehouse " to "AdventureWorks AS or Cube", BUT there is few source to
> show the process from "AdventureWorks OLTP" database to "'AdventureWorks
> Data Warehouse".
> Any advices?
you can find a good start from here
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqltut9/html/db55e226-601a-4026-8651-573195555a59.htm
Regards
Amish Shah
|||Hi amish,
It is 'SQL Server 2005 Analysis Services Tutorial", it assumes that
"'Adventure Works Data Warehouse" was well-developed and then to start to
create cube by AS.
What I am looking for is how to create fact/dim tables in ''Adventure Works
Data Warehouse".
"amish" <shahamishm@.gmail.com> wrote in message
news:1160391925.433024.115200@.i3g2000cwc.googlegro ups.com...
> frankie lo wrote:
> you can find a good start from here
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqltut9/html/db55e226-601a-4026-8651-573195555a59.htm
> Regards
> Amish Shah
>
sql

Wednesday, March 21, 2012

How to create a torn page.

I want to write a magazine article about torn pages. Is there an easy way to create a torn page? Or does anybody have a backup of a sample database such as AdventureWorks that has a torn page?

I suppose you have to simulate a disk failure at the right moment. I don't think it is very easy to simulate tbh.

But do keep us informed if you find a way to do so.

|||

To simulate a torn page, you'll have to "corrupt" a database page on disk.

This can be done with a hex editor, or other tool.

Our pages are 8K in size, so 16 sectors of 512bytes.

We have 2 kinds of validation: checksum or torn page.

For the torn page, you'll want to corrupt bytes at 0 mod 512 in sectors 1..15 of a page. You could write 0x00 at offset 512, and 0xFF at offset 1024, for example.

Checksums are more robust, so you should be able to change any bit on the page to cause the corruption to be detected.

In order for this corruption to cause any problem, you'd have to pick a page that actually holds data, and then cause the engine to try to read that page.

Hope that gives you some ideas.

|||

Aah, think out of the box :-)

Great tip.

How to create a stored procedure to query the data mining model?

How to create a stored procedure to query the data mining model?

Where can I find some sample code?

Thanks.

Joe.

Details on how to create a stored procedure can be found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/SQLDMPrgrm.asp whitetaper

In the "Extending the Functionality of SQL Server Data Mining" section there are multiple examples of stored procedures. One of them, ExecuteContentQuery, shows exactly how to execute a (content) query over a mining model. The content query can be replaced with any other DMX query returning flattened results

Hope this helps

|||Thanks Bogdan

How to create a stored procedure to query the data mining model?

How to create a stored procedure to query the data mining model?

Where can I find some sample code?

Thanks.

Joe.

Details on how to create a stored procedure can be found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/SQLDMPrgrm.asp whitetaper

In the "Extending the Functionality of SQL Server Data Mining" section there are multiple examples of stored procedures. One of them, ExecuteContentQuery, shows exactly how to execute a (content) query over a mining model. The content query can be replaced with any other DMX query returning flattened results

Hope this helps

|||Thanks Bogdan

How to create a select statement with an increasement variable?

Example:

Select icount + 1 as icount from table

or

Select counter() as icount from table

The above is wrong ...just a sample to show what I am trying to accomplish.

Is there a function in SQL statement? Thanks.No, this unfortunately is not possible.

The solution I've seen to this is to create either a #Temp table (or better, a table variable) with an Identity column and the other columns you need, and then INSERT your resultset into it. This will give you the incrementing column you are looking for.

Alternately, add this counter in the front end (on your ASP.NET page).

Terri|||The reason I can't add the counter in the front end because I am doing paging.

Thanks for your help. I think I will create #temp table to solve my problem.sql

Monday, March 19, 2012

How to create a select statement with an increasement variable?

Example:

Select icount + 1 as icount from table

or

Select counter() as icount from table

The above is wrong ...just a sample to show what I am trying to accomplish.

Is there a function in SQL statement? Thanks.No, this unfortunately is not possible.

The solution I've seen to this is to create either a #Temp table (or better, a table variable) with an Identity column and the other columns you need, and then INSERT your resultset into it. This will give you the incrementing column you are looking for.

Alternately, add this counter in the front end (on your ASP.NET page).

Terri|||The reason I can't add the counter in the front end because I am doing paging.

Thanks for your help. I think I will create #temp table to solve my problem.

Wednesday, March 7, 2012

How to Count the Items In Dataregion With out writing Query

Hi Group,
How to Count the items
Sample:
ID TestColumn
1 Coding
2 Design
3 Coding
4 Coding
5 Requirement
6 Coding
My Output Should be
Requirements Count Design Count Coding Count
1 1 4If you make a group on the Testcolumn, you may use one of the Count()
functions to count the rows...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Manoj.Pasumarthi" <ManojPasumarthi@.discussions.microsoft.com> wrote in
message news:19D19F77-093A-4A54-BC72-4520693088F1@.microsoft.com...
> Hi Group,
> How to Count the items
> Sample:
> ID TestColumn
> 1 Coding
> 2 Design
> 3 Coding
> 4 Coding
> 5 Requirement
> 6 Coding
> My Output Should be
> Requirements Count Design Count Coding Count
> 1 1 4|||You might also consider these expressions:
=Sum(iif(Fields!TestColumn.Value = "Coding", 1, 0))
=Sum(iif(Fields!TestColumn.Value = "Design", 1, 0))
=Sum(iif(Fields!TestColumn.Value = "Requirement", 1, 0))
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:OmdPRQTrEHA.1952@.TK2MSFTNGP12.phx.gbl...
> If you make a group on the Testcolumn, you may use one of the Count()
> functions to count the rows...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Manoj.Pasumarthi" <ManojPasumarthi@.discussions.microsoft.com> wrote in
> message news:19D19F77-093A-4A54-BC72-4520693088F1@.microsoft.com...
> > Hi Group,
> >
> > How to Count the items
> >
> > Sample:
> > ID TestColumn
> > 1 Coding
> > 2 Design
> > 3 Coding
> > 4 Coding
> > 5 Requirement
> > 6 Coding
> >
> > My Output Should be
> > Requirements Count Design Count Coding Count
> > 1 1 4
>