Showing posts with label design. Show all posts
Showing posts with label design. Show all posts

Wednesday, March 28, 2012

One Database vs. Multiple Databases

I need to design a system which represents multiple "projects" in SQL
Server. Each project has the same data model, but is independent of all
others. My inclination is to use one database to store all projects.
Looking at the numbers involved, however, I wonder if I would get
better performance by storing each project in its own database.

Suppose I have 50 projects, each with two users and 10,000 rows; it
seems to me I'd rather have 50 x 2 users working in a table with 10,000
rows than 1 x 100 users working in a table with 500,000 rows.

On the other hand, the single database approach seems more elegant from
a design perspective. I wouldn't be creating multiple copies of an
identical data model, and I wouldn't be creating new databases as a
business procedure, every time a new project is required.

Here are my questions:
1. For the scenario described above, am I correct to assume I will get
better performance by using multiple databases, or does SQL Server have
some clever way of achieving the same performance in a single database?
2. Is the multiple database approach common? If anyone has tried it,
please tell me about how it works in practice.

-TCTC wrote:
> I need to design a system which represents multiple "projects" in SQL
> Server. Each project has the same data model, but is independent of all
> others. My inclination is to use one database to store all projects.
> Looking at the numbers involved, however, I wonder if I would get
> better performance by storing each project in its own database.
> Suppose I have 50 projects, each with two users and 10,000 rows; it
> seems to me I'd rather have 50 x 2 users working in a table with 10,000
> rows than 1 x 100 users working in a table with 500,000 rows.
> On the other hand, the single database approach seems more elegant from
> a design perspective. I wouldn't be creating multiple copies of an
> identical data model, and I wouldn't be creating new databases as a
> business procedure, every time a new project is required.
> Here are my questions:
> 1. For the scenario described above, am I correct to assume I will get
> better performance by using multiple databases, or does SQL Server have
> some clever way of achieving the same performance in a single database?
> 2. Is the multiple database approach common? If anyone has tried it,
> please tell me about how it works in practice.
>
> -TC

1. Not unless your implementation is very bad indeed. 100 users and
500,000 rows is a small database by most standards.

2. Sometimes. Partitioning a database can make sense for administrative
and support reasons or as part of a solution where data is distributed
over multiple servers. But without other changes, partitioning a
database isn't likely to achieve much if anything in terms of
performance. Given the potential complexity of supporting that kind of
solution there are certainly much easier and more effective ways to
optimise performance.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--|||TC wrote:
> I need to design a system which represents multiple "projects" in SQL
> Server. Each project has the same data model, but is independent of all
> others. My inclination is to use one database to store all projects.
> Looking at the numbers involved, however, I wonder if I would get
> better performance by storing each project in its own database.
> Suppose I have 50 projects, each with two users and 10,000 rows; it
> seems to me I'd rather have 50 x 2 users working in a table with 10,000
> rows than 1 x 100 users working in a table with 500,000 rows.
> On the other hand, the single database approach seems more elegant from
> a design perspective. I wouldn't be creating multiple copies of an
> identical data model, and I wouldn't be creating new databases as a
> business procedure, every time a new project is required.
> Here are my questions:
> 1. For the scenario described above, am I correct to assume I will get
> better performance by using multiple databases, or does SQL Server have
> some clever way of achieving the same performance in a single database?
> 2. Is the multiple database approach common? If anyone has tried it,
> please tell me about how it works in practice.
>
> -TC

I would go with 1 database per projet (so multiple databases):
- if your data model change, you will be able to migrate only projets
that you want, when you want.
- easier to separate projet, restart a projet, etc if you need.
- backup/restaure projet independantly
- Give acces to a particular projet to a user is easier.|||I would go the other way - one database for all. It will more scalable
and flexible. The amount of data is not too much, the speed is not an
issue as long as it is properly indexed.

I actually did a data conversion merging several hundreds of databases
(Also called project) into one.|||TC (golemdanube@.yahoo.com) writes:
> I need to design a system which represents multiple "projects" in SQL
> Server. Each project has the same data model, but is independent of all
> others. My inclination is to use one database to store all projects.
> Looking at the numbers involved, however, I wonder if I would get
> better performance by storing each project in its own database.
> Suppose I have 50 projects, each with two users and 10,000 rows; it
> seems to me I'd rather have 50 x 2 users working in a table with 10,000
> rows than 1 x 100 users working in a table with 500,000 rows.
> On the other hand, the single database approach seems more elegant from
> a design perspective. I wouldn't be creating multiple copies of an
> identical data model, and I wouldn't be creating new databases as a
> business procedure, every time a new project is required.
> Here are my questions:
> 1. For the scenario described above, am I correct to assume I will get
> better performance by using multiple databases, or does SQL Server have
> some clever way of achieving the same performance in a single database?
> 2. Is the multiple database approach common? If anyone has tried it,
> please tell me about how it works in practice.

Whether to use one or many databases has nothing to do with performance
whatsoever. If performance is the only motive for you to consider
separate databases, just forget about it given the volumes you indicated.

There may be other reasons for using separate databases. One project
says "oops, we deleted our data". With a separate database, a restore
is a quick thing. Or some projects may start to call for diverging
requirements, so that they no longer fit into the same model. There
can also be security considerations.

But all of that business requirements that are unknown to me. Since
maintaining 50 databases with the same model requires more overhead,
a single database with a good data model is a good way to start.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"TC" <golemdanube@.yahoo.com> wrote in message
news:1150833955.445569.42840@.h76g2000cwa.googlegro ups.com...
> I need to design a system which represents multiple "projects" in SQL
> Server. Each project has the same data model, but is independent of all
> others. My inclination is to use one database to store all projects.
> Looking at the numbers involved, however, I wonder if I would get
> better performance by storing each project in its own database.
> Suppose I have 50 projects, each with two users and 10,000 rows; it
> seems to me I'd rather have 50 x 2 users working in a table with 10,000
> rows than 1 x 100 users working in a table with 500,000 rows.

This is a small database by today's standards.

In general a single database will probably give you better performance since
only one copy of query plans will be cached, as opposed to 50 (assuming you
use stored procs, etc.).

disk I/O will probably be less as SQL can do a better job of reading in
batches of rows.

So performance-wise, single probably wins out.

In terms of maintenance, etc, a single one is generally better. Assume you
develop an updated version of a stored proc, or need to change a table.
Would you rather do it once or 50 times?

> On the other hand, the single database approach seems more elegant from
> a design perspective. I wouldn't be creating multiple copies of an
> identical data model, and I wouldn't be creating new databases as a
> business procedure, every time a new project is required.
> Here are my questions:
> 1. For the scenario described above, am I correct to assume I will get
> better performance by using multiple databases, or does SQL Server have
> some clever way of achieving the same performance in a single database?
> 2. Is the multiple database approach common? If anyone has tried it,
> please tell me about how it works in practice.
>
> -TC|||TC wrote:
> I need to design a system which represents multiple "projects" in SQL
> Server. Each project has the same data model, but is independent of all
> others.

Others have addressed, both pro and con using a single or multiple
databases and my response would be that the consideration is one
of maintenance and security: Two issues you have not discussed.

But what I would like to add to this discussion is based on your
first two sentences.

From what you've written I can't see how you can justify, except
for security purposes, more than one set of tables with the same
data model. I think Date and Codd said something about it so you
might want to read what they wrote. But based solely on the above
sentences ... the correct solution is to add a column to your
tables named PROJECT_ID.
--
Daniel A. Morgan
University of Washington
damorgan@.x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org|||As everybody has mentioned, 500k records and 100 users is small by any
definition. But regardless, performance should not be a consideration
until it forces itself to become so.

Think about your idea from a maintenance perspective. At some point
you'll need to add a column to one of those tables, or even make a
simple stored procedure change. Imagine the pain this will cause you
down the road, trying to synchronize changes in all those databases.
Multiply every small hassle you'll ever come across in the future by
the number of "Projects" in your universe. Yikes!

Stick to one database per Application and you'll live a long and
healthy life.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

--
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/|||I recently recommended a multiple database solution, since my
assessment of the client's needs and data were that they needed the
flexibility of separate databases per data set. Also, my deadline for
completion was very short, and this product was not considered to be
used for longer than the near future.

Each external client's (about 20 clients) data set is different - even
the same client data set could vary - and the process was to massage
each set of data via stored procedures. I Initially opted for one
database per client, to allow for reuse of lookup data (holidays,
fiscal periods, accounts, etc.), but later realized that what I was
designing, an Excel workbook to analyze accounting data, would be
easier to modify if I kept everything the same and simply modified the
connection string.

Ultimately, the choice of multiple servers keeps the stored procs for
the XLW, and the XLW itself, the same, while the only modification
occurs in the stored procedures for building the data, since the data
requirements could vary wildly. The multiple database approach also
allows for multiple data sets to be massaged at the same time -
building the final data set could take several days, so some problems
in concurrency could develop - and with varying procedures for such the
independence was a benefit, albeit creating a lot of redundancy.

Given enough time to design a solution that preserved security - no
client specific information, nor information useful for hacking the
server data could be local, other than the connection string - and ran
as a single database, I could certainly design a solution for them.

James Igoe

james.igoe@.gmail.com || http://code.comparative-advantage.com

Jason Kester wrote:
> As everybody has mentioned, 500k records and 100 users is small by any
> definition. But regardless, performance should not be a consideration
> until it forces itself to become so.
> Think about your idea from a maintenance perspective. At some point
> you'll need to add a column to one of those tables, or even make a
> simple stored procedure change. Imagine the pain this will cause you
> down the road, trying to synchronize changes in all those databases.
> Multiply every small hassle you'll ever come across in the future by
> the number of "Projects" in your universe. Yikes!
> Stick to one database per Application and you'll live a long and
> healthy life.
> Jason Kester
> Expat Software Consulting Services
> http://www.expatsoftware.com/
> --
> Get your own Travel Blog, with itinerary maps and photos!
> http://www.blogabond.com/|||I want to thank everyone for their thoughtful responses. You've helped
me get perspective on this issue.

-TC

One database or Many database?

Hello All,
I am trying to design a database just like "NorthWind", but the difference
is this database will handle a lot of companies. The first thing I cannot
decide is, use one database to control all companies or each company has one
database.
The relative questions are:
1. Which one has better performance;
2. How many databases SQL server can have;
Any help will be appreciated.
MikeThe answer to 1 is, it depends on the application. The answer to 2 is,
as many as you have room for. I'd recommend getting a good book on
relational database design, like Mike Hernandez' "Database Design for
Mere Mortals", Microsoft Press. There aren't any cut-and-dried answers
to these kind of questions without understanding your specs.
-- Mary
MCW Technologies
http://www.mcwtech.com
On Mon, 15 Dec 2003 15:51:54 -0500, "Mike Lincoln"
<mlincoln001@.hotmail.com> wrote:
>Hello All,
>I am trying to design a database just like "NorthWind", but the difference
>is this database will handle a lot of companies. The first thing I cannot
>decide is, use one database to control all companies or each company has one
>database.
>The relative questions are:
>1. Which one has better performance;
>2. How many databases SQL server can have;
>Any help will be appreciated.
>Mike
>|||> 1. Which one has better performance;
Like just about any other computing task with multiple paths, it depends.
> 2. How many databases SQL server can have;
32,767
http://www.aspfaq.com/2345
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Thank you, Guys. It helped a lot. I will think about this and post a
detailed project description later. Have a nice day and merry Cristmas.
Mike
"Mike Lincoln" <mlincoln001@.hotmail.com> wrote in message
news:uWA0b30wDHA.2396@.TK2MSFTNGP09.phx.gbl...
> Hello All,
> I am trying to design a database just like "NorthWind", but the difference
> is this database will handle a lot of companies. The first thing I cannot
> decide is, use one database to control all companies or each company has
one
> database.
> The relative questions are:
> 1. Which one has better performance;
> 2. How many databases SQL server can have;
> Any help will be appreciated.
> Mike
>|||One of the things no one mentioned was security... If you put all companies
information into a single database you must rely on views and Sps
(probably ) for security... It is more likely that one company might be
able to see another company's data...
When each company's information is stored in a different database, standard
sql security can assist to ensure data is secure...
Also consider backup/restore needs. With all data in a single database, if
one company needs to restore, then all companies will be restored...
--
Wayne Snyder MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
(Please respond only to the newsgroups.)
I support the Professional Association for SQL Server
(www.sqlpass.org)
"Mike Lincoln" <mlincoln001@.hotmail.com> wrote in message
news:uWA0b30wDHA.2396@.TK2MSFTNGP09.phx.gbl...
> Hello All,
> I am trying to design a database just like "NorthWind", but the difference
> is this database will handle a lot of companies. The first thing I cannot
> decide is, use one database to control all companies or each company has
one
> database.
> The relative questions are:
> 1. Which one has better performance;
> 2. How many databases SQL server can have;
> Any help will be appreciated.
> Mike
>sql

One Cube or Many ?

Hi People,

I try to figure out the best way for cubes design...

whether it's to build one big cube for the entire organization or one cube for each business area...

Is there any article (or any other source of information) for the subject ?

Thanks!

Perhaps you should try to read this...

http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/olapdbpssas2005.mspx#ELGAC

|||

Microsoft advice you to aviod to many fact tables /measure groups in one cube. You can read more in the performance guide pointed to at the top of this message group.

Another problem is that security can be harder to manage with one big cube, because of the number of roles.

Building one cube for each business area sounds like a good idea.

HTH

Thomas Ivasson

|||

O.K

Thank's a lot.

sql

Friday, March 23, 2012

OLTP vs Reporting Database vs OLAP Database

Dear All,
I have a fundamental questions regarding my design of my SQL Server
Database.
Current SQL Server 2000 Design Setting (in one server)
-1 Database for OLTP
-1 Database for OLAP -> Generating Cubes
Planned SQL Server 2000 Design Setting (in two servers):
-1 Database for OLTP -> at Server A
-1 Database for Reporting Purposes -> at Server B
-1 Database for OLAP -> at Server B
My Question -> Is it necessary to separate reporting database and OLAP
database?
Any sugestion please.
Thanks
Robert Lie
Depends on the oad on the reporting server. I would install it on th same
machine with gernerating the cubes in a time where Reports are not often
queried. If the workloads gonna to heavy you even have the possibility to
scale it out.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Robert Lie" <robert.lie24@.gmail.com> schrieb im Newsbeitrag
news:ulBjQ7gSFHA.3096@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie
|||Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
>
Whether you use 2 dbs for reporting or one depends on the reporting needs...
The one database for Reporting Purposes , when it is independent like you
have it might be called an ODS (Operational Data Store) . ODS look very much
like their OLTP counterparts, offload OLTP reporting from the OLTP database,
and are a location to aggregate OLTP information from across the many
locations in the enterprise to a single global report location. The data in
these databases is generally for a shorter specific period ( like quarterly
for instance.)
The OLAP database is intended for aggregated reporting, across longer
historical periods. The schema will have been changed to reflect OLAP
sensibilities as well..
hope this helps.
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:ulBjQ7gSFHA.3096@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie

OLTP vs Reporting Database vs OLAP Database

Dear All,
I have a fundamental questions regarding my design of my SQL Server
Database.
Current SQL Server 2000 Design Setting (in one server)
-1 Database for OLTP
-1 Database for OLAP -> Generating Cubes
Planned SQL Server 2000 Design Setting (in two servers):
-1 Database for OLTP -> at Server A
-1 Database for Reporting Purposes -> at Server B
-1 Database for OLAP -> at Server B
My Question -> Is it necessary to separate reporting database and OLAP
database?
Any sugestion please.
Thanks
Robert Lie
if you want to provide reports based on a copy of your OLTP database, so you
can create a "read-only" database optimized for reporting purpose.
you can provide (near)real time reports.
this usage as an advantage: you don't impat you operationnal server by
executing complex queries. but.. garbage in garbage out...
if you want to have a common and cleansed database for both reporting and
analysis to insure that you'll allways display the same information, use the
same database for RS + OLAP. but, generally, this database in not real-time
updated.
so what is your primary usage for your reports?
- operationnal purpose
- analytical purpose
but you can also provide reports based on the 2 databases regarding the
performance of your queries.
if you have some performance problems with your OLTP database (the copy on
the server B) then the OLAP database and cubes will improove the response
time.
also, look at the number of users... 100 users on a 10seconds report vs 100
users on a 1second report...
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:uD8T74gSFHA.2520@.TK2MSFTNGP09.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie
|||Here my considerations
1. Reporting Database:
- To provide operational reports with 10 minutes delay.
- Not Disturbing OLTP Server
- Incrase response time for users who access reports (estimation
max 20 users in the same time)
2. OLAP Database:
- To generate Cubes
- To boost the Cubes generation performance since it won't
affected by users who access reports.
- For analytical purpose
And both of them are not real-time.
Please explain further about garbage in garbage out?
So what do you think of my considerations?
Thanks a lot
Robert Lie
Jj wrote:
> if you want to provide reports based on a copy of your OLTP database, so you
> can create a "read-only" database optimized for reporting purpose.
> you can provide (near)real time reports.
> this usage as an advantage: you don't impat you operationnal server by
> executing complex queries. but.. garbage in garbage out...
> if you want to have a common and cleansed database for both reporting and
> analysis to insure that you'll allways display the same information, use the
> same database for RS + OLAP. but, generally, this database in not real-time
> updated.
> so what is your primary usage for your reports?
> - operationnal purpose
> - analytical purpose
> but you can also provide reports based on the 2 databases regarding the
> performance of your queries.
> if you have some performance problems with your OLTP database (the copy on
> the server B) then the OLAP database and cubes will improove the response
> time.
> also, look at the number of users... 100 users on a 10seconds report vs 100
> users on a 1second report...
>
> "Robert Lie" <robert.lie24@.gmail.com> wrote in message
> news:uD8T74gSFHA.2520@.TK2MSFTNGP09.phx.gbl...
>
>
|||creating a copy of the OLTP database is good choice
you can use the log shipping function to do this (or other methods)
(how do you plan to synchronize your databases?)
generating cubes will not lock your database if you do incremental updates
on a optimized cube. (or just a litlle lock)
Partitions will help you for the cube process step.
But your design appear to be good.
garbage in garbage out = bad data quality in the source = bad quality in
output (non existant clientID, duplicated product name, duplicated
records...). so an ETL tool can improove the data quality during the
process. or if you want to synchronize multiple sources (like reference
tables and operationnal tables)
But these steps reduce the loading time by adding data cleansing time.
if you think next step (which is SQL 2005) you'll have a lot of new features
to help you.
for example, you will be able to load directly a partition of your cube
while you'll load your database, so 1 read and 2 destinations
(and there is a lot of options)
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:%23RX3SehSFHA.248@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Here my considerations
> 1. Reporting Database:
> - To provide operational reports with 10 minutes delay.
> - Not Disturbing OLTP Server
> - Incrase response time for users who access reports (estimation
> max 20 users in the same time)
> 2. OLAP Database:
> - To generate Cubes
> - To boost the Cubes generation performance since it won't affected by
> users who access reports.
> - For analytical purpose
> And both of them are not real-time.
> Please explain further about garbage in garbage out?
> So what do you think of my considerations?
> Thanks a lot
> Robert Lie
>
> Jj wrote:
|||Actually what I want to do is not just copy the OLTP Database, but DTS
from OLTP tables to summaries form Tables to eliminate the join and
complex calculation when show up some reports.
-> What do you think?
Since my SQL Server 2000 is standard edition so I can't do a kind of
cube partition.
Thanks
Jj wrote:
> creating a copy of the OLTP database is good choice
> you can use the log shipping function to do this (or other methods)
> (how do you plan to synchronize your databases?)
> generating cubes will not lock your database if you do incremental updates
> on a optimized cube. (or just a litlle lock)
> Partitions will help you for the cube process step.
> But your design appear to be good.
> garbage in garbage out = bad data quality in the source = bad quality in
> output (non existant clientID, duplicated product name, duplicated
> records...). so an ETL tool can improove the data quality during the
> process. or if you want to synchronize multiple sources (like reference
> tables and operationnal tables)
> But these steps reduce the loading time by adding data cleansing time.
> if you think next step (which is SQL 2005) you'll have a lot of new features
> to help you.
> for example, you will be able to load directly a partition of your cube
> while you'll load your database, so 1 read and 2 destinations
> (and there is a lot of options)
> "Robert Lie" <robert.lie24@.gmail.com> wrote in message
> news:%23RX3SehSFHA.248@.TK2MSFTNGP15.phx.gbl...
>
sql

OLTP vs Reporting Database vs OLAP Database

Dear All,
I have a fundamental questions regarding my design of my SQL Server
Database.
Current SQL Server 2000 Design Setting (in one server)
-1 Database for OLTP
-1 Database for OLAP -> Generating Cubes
Planned SQL Server 2000 Design Setting (in two servers):
-1 Database for OLTP -> at Server A
-1 Database for Reporting Purposes -> at Server B
-1 Database for OLAP -> at Server B
My Question -> Is it necessary to separate reporting database and OLAP
database?
Any sugestion please.
Thanks
Robert LieDepends on the oad on the reporting server. I would install it on th same
machine with gernerating the cubes in a time where Reports are not often
queried. If the workloads gonna to heavy you even have the possibility to
scale it out.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Robert Lie" <robert.lie24@.gmail.com> schrieb im Newsbeitrag
news:ulBjQ7gSFHA.3096@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie|||Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
>
Whether you use 2 dbs for reporting or one depends on the reporting needs...
The one database for Reporting Purposes , when it is independent like you
have it might be called an ODS (Operational Data Store) . ODS look very much
like their OLTP counterparts, offload OLTP reporting from the OLTP database,
and are a location to aggregate OLTP information from across the many
locations in the enterprise to a single global report location. The data in
these databases is generally for a shorter specific period ( like quarterly
for instance.)
The OLAP database is intended for aggregated reporting, across longer
historical periods. The schema will have been changed to reflect OLAP
sensibilities as well..
hope this helps.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:ulBjQ7gSFHA.3096@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie

OLTP vs Reporting Database vs OLAP Database

Dear All,
I have a fundamental questions regarding my design of my SQL Server
Database.
Current SQL Server 2000 Design Setting (in one server)
-1 Database for OLTP
-1 Database for OLAP -> Generating Cubes
Planned SQL Server 2000 Design Setting (in two servers):
-1 Database for OLTP -> at Server A
-1 Database for Reporting Purposes -> at Server B
-1 Database for OLAP -> at Server B
My Question -> Is it necessary to separate reporting database and OLAP
database?
Any sugestion please.
Thanks
Robert LieDepends on the oad on the reporting server. I would install it on th same
machine with gernerating the cubes in a time where Reports are not often
queried. If the workloads gonna to heavy you even have the possibility to
scale it out.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Robert Lie" <robert.lie24@.gmail.com> schrieb im Newsbeitrag
news:ulBjQ7gSFHA.3096@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie|||Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
>
Whether you use 2 dbs for reporting or one depends on the reporting needs...
The one database for Reporting Purposes , when it is independent like you
have it might be called an ODS (Operational Data Store) . ODS look very much
like their OLTP counterparts, offload OLTP reporting from the OLTP database,
and are a location to aggregate OLTP information from across the many
locations in the enterprise to a single global report location. The data in
these databases is generally for a shorter specific period ( like quarterly
for instance.)
The OLAP database is intended for aggregated reporting, across longer
historical periods. The schema will have been changed to reflect OLAP
sensibilities as well..
hope this helps.
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:ulBjQ7gSFHA.3096@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie

OLTP vs Reporting Database vs OLAP Database

Dear All,
I have a fundamental questions regarding my design of my SQL Server
Database.
Current SQL Server 2000 Design Setting (in one server)
-1 Database for OLTP
-1 Database for OLAP -> Generating Cubes
Planned SQL Server 2000 Design Setting (in two servers):
-1 Database for OLTP -> at Server A
-1 Database for Reporting Purposes -> at Server B
-1 Database for OLAP -> at Server B
My Question -> Is it necessary to separate reporting database and OLAP
database?
Any sugestion please.
Thanks
Robert Lieif you want to provide reports based on a copy of your OLTP database, so you
can create a "read-only" database optimized for reporting purpose.
you can provide (near)real time reports.
this usage as an advantage: you don't impat you operationnal server by
executing complex queries. but.. garbage in garbage out...
if you want to have a common and cleansed database for both reporting and
analysis to insure that you'll allways display the same information, use the
same database for RS + OLAP. but, generally, this database in not real-time
updated.
so what is your primary usage for your reports?
- operationnal purpose
- analytical purpose
but you can also provide reports based on the 2 databases regarding the
performance of your queries.
if you have some performance problems with your OLTP database (the copy on
the server B) then the OLAP database and cubes will improove the response
time.
also, look at the number of users... 100 users on a 10seconds report vs 100
users on a 1second report...
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:uD8T74gSFHA.2520@.TK2MSFTNGP09.phx.gbl...
> Dear All,
> I have a fundamental questions regarding my design of my SQL Server
> Database.
> Current SQL Server 2000 Design Setting (in one server)
> -1 Database for OLTP
> -1 Database for OLAP -> Generating Cubes
> Planned SQL Server 2000 Design Setting (in two servers):
> -1 Database for OLTP -> at Server A
> -1 Database for Reporting Purposes -> at Server B
> -1 Database for OLAP -> at Server B
> My Question -> Is it necessary to separate reporting database and OLAP
> database?
> Any sugestion please.
> Thanks
> Robert Lie|||Here my considerations
1. Reporting Database:
- To provide operational reports with 10 minutes delay.
- Not Disturbing OLTP Server
- Incrase response time for users who access reports (estimation
max 20 users in the same time)
2. OLAP Database:
- To generate Cubes
- To boost the Cubes generation performance since it won't
affected by users who access reports.
- For analytical purpose
And both of them are not real-time.
Please explain further about garbage in garbage out?
So what do you think of my considerations?
Thanks a lot
Robert Lie
Jj wrote:
> if you want to provide reports based on a copy of your OLTP database, so y
ou
> can create a "read-only" database optimized for reporting purpose.
> you can provide (near)real time reports.
> this usage as an advantage: you don't impat you operationnal server by
> executing complex queries. but.. garbage in garbage out...
> if you want to have a common and cleansed database for both reporting and
> analysis to insure that you'll allways display the same information, use t
he
> same database for RS + OLAP. but, generally, this database in not real-tim
e
> updated.
> so what is your primary usage for your reports?
> - operationnal purpose
> - analytical purpose
> but you can also provide reports based on the 2 databases regarding the
> performance of your queries.
> if you have some performance problems with your OLTP database (the copy on
> the server B) then the OLAP database and cubes will improove the response
> time.
> also, look at the number of users... 100 users on a 10seconds report vs 10
0
> users on a 1second report...
>
> "Robert Lie" <robert.lie24@.gmail.com> wrote in message
> news:uD8T74gSFHA.2520@.TK2MSFTNGP09.phx.gbl...
>
>
>|||creating a copy of the OLTP database is good choice
you can use the log shipping function to do this (or other methods)
(how do you plan to synchronize your databases?)
generating cubes will not lock your database if you do incremental updates
on a optimized cube. (or just a litlle lock)
Partitions will help you for the cube process step.
But your design appear to be good.
garbage in garbage out = bad data quality in the source = bad quality in
output (non existant clientID, duplicated product name, duplicated
records...). so an ETL tool can improove the data quality during the
process. or if you want to synchronize multiple sources (like reference
tables and operationnal tables)
But these steps reduce the loading time by adding data cleansing time.
if you think next step (which is SQL 2005) you'll have a lot of new features
to help you.
for example, you will be able to load directly a partition of your cube
while you'll load your database, so 1 read and 2 destinations
(and there is a lot of options)
"Robert Lie" <robert.lie24@.gmail.com> wrote in message
news:%23RX3SehSFHA.248@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Here my considerations
> 1. Reporting Database:
> - To provide operational reports with 10 minutes delay.
> - Not Disturbing OLTP Server
> - Incrase response time for users who access reports (estimation
> max 20 users in the same time)
> 2. OLAP Database:
> - To generate Cubes
> - To boost the Cubes generation performance since it won't affected by
> users who access reports.
> - For analytical purpose
> And both of them are not real-time.
> Please explain further about garbage in garbage out?
> So what do you think of my considerations?
> Thanks a lot
> Robert Lie
>
> Jj wrote:|||Actually what I want to do is not just copy the OLTP Database, but DTS
from OLTP tables to summaries form Tables to eliminate the join and
complex calculation when show up some reports.
-> What do you think?
Since my SQL Server 2000 is standard edition so I can't do a kind of
cube partition.
Thanks
Jj wrote:
> creating a copy of the OLTP database is good choice
> you can use the log shipping function to do this (or other methods)
> (how do you plan to synchronize your databases?)
> generating cubes will not lock your database if you do incremental updates
> on a optimized cube. (or just a litlle lock)
> Partitions will help you for the cube process step.
> But your design appear to be good.
> garbage in garbage out = bad data quality in the source = bad quality in
> output (non existant clientID, duplicated product name, duplicated
> records...). so an ETL tool can improove the data quality during the
> process. or if you want to synchronize multiple sources (like reference
> tables and operationnal tables)
> But these steps reduce the loading time by adding data cleansing time.
> if you think next step (which is SQL 2005) you'll have a lot of new featur
es
> to help you.
> for example, you will be able to load directly a partition of your cube
> while you'll load your database, so 1 read and 2 destinations
> (and there is a lot of options)
> "Robert Lie" <robert.lie24@.gmail.com> wrote in message
> news:%23RX3SehSFHA.248@.TK2MSFTNGP15.phx.gbl...
>
>

Wednesday, March 21, 2012

OLTP access

Hi,
With my OLTP on another server, OLAP cube design works up to the point of
actually processing the cube, then it errors processing the dimension.
If I move the OLTP database (SQL Server 2000) onto the machine running the
OLAP it works fine.
It seems to be a rights issue but the ODBC tests work fine and the cube
design has no trouble viewing the OLTP schema.
In its 'normal' position the OLTP is on a Win2k Server that is part of a
work group.
The OLAP is on a Win2k Domain Controller.
Any clues on how to establish a successful processing of the OLTP in its
normal position would be appreciated.
Thanks
Bobhave you made sure the services for OLTP sql server and AS on the other
server are started with the same admin account and not local?
When you are in the design in AS, you are authenticated using your login to
the sql server source so it is ok there, but when you are processing, it is
authenticated using the login that start up AS, so that login might not have
access to the sql server tables to process the dimensions.
"Bob" wrote:

> Hi,
> With my OLTP on another server, OLAP cube design works up to the point of
> actually processing the cube, then it errors processing the dimension.
> If I move the OLTP database (SQL Server 2000) onto the machine running the
> OLAP it works fine.
> It seems to be a rights issue but the ODBC tests work fine and the cube
> design has no trouble viewing the OLTP schema.
> In its 'normal' position the OLTP is on a Win2k Server that is part of a
> work group.
> The OLAP is on a Win2k Domain Controller.
> Any clues on how to establish a successful processing of the OLTP in its
> normal position would be appreciated.
> Thanks
> Bob
>
>|||Hi,
Thanks for your reply.
I altered the OLAP service to run under administrator but it has made no
difference.
This is extremely poor design in IMHO. If the ODBC object can connect to
the OLTP, the OLAP should be able to process, end of story.
There is no trusted connection between the OLAP machine (Win2k Domain
Controller) and the OLTP machine (Win2k Server but running as a member of a
workgroup)
So I am relying ODBC to sort out the security issues.
e.g.. Access can use ODBC to link to tables in the OLTP so how come the OLAP
is so frail?
I have tried to create an ODBC connection to the OLTP that uses SQL server
authentication but have failed . I keep getting
'Not associated with a trusted SQL server connection'.
In a perfect world I would promote the OLTP to be a domain controller of its
own domain and establish a trust relationship between the to domains. But no
can do.
I think Bill's merry men should be looking at this.
Either I am missing something fundamental or the OLAP connection needs
redesigning.
No way should it be this difficult to use in this situation.
i.e. Anything that Access can do, OLAP should be able to do. The security
implications are the same.
regards
Bob
"bc" <bc@.discussions.microsoft.com> wrote in message
news:D6258097-009A-492A-BA75-2AC40A664968@.microsoft.com...
> have you made sure the services for OLTP sql server and AS on the other
> server are started with the same admin account and not local?
> When you are in the design in AS, you are authenticated using your login
to
> the sql server source so it is ok there, but when you are processing, it
is
> authenticated using the login that start up AS, so that login might not
have[vbcol=seagreen]
> access to the sql server tables to process the dimensions.
>
> "Bob" wrote:
>
of[vbcol=seagreen]
the[vbcol=seagreen]

OLTP access

Hi,
With my OLTP on another server, OLAP cube design works up to the point of
actually processing the cube, then it errors processing the dimension.
If I move the OLTP database (SQL Server 2000) onto the machine running the
OLAP it works fine.
It seems to be a rights issue but the ODBC tests work fine and the cube
design has no trouble viewing the OLTP schema.
In its 'normal' position the OLTP is on a Win2k Server that is part of a
work group.
The OLAP is on a Win2k Domain Controller.
Any clues on how to establish a successful processing of the OLTP in its
normal position would be appreciated.
Thanks
Bob
have you made sure the services for OLTP sql server and AS on the other
server are started with the same admin account and not local?
When you are in the design in AS, you are authenticated using your login to
the sql server source so it is ok there, but when you are processing, it is
authenticated using the login that start up AS, so that login might not have
access to the sql server tables to process the dimensions.
"Bob" wrote:

> Hi,
> With my OLTP on another server, OLAP cube design works up to the point of
> actually processing the cube, then it errors processing the dimension.
> If I move the OLTP database (SQL Server 2000) onto the machine running the
> OLAP it works fine.
> It seems to be a rights issue but the ODBC tests work fine and the cube
> design has no trouble viewing the OLTP schema.
> In its 'normal' position the OLTP is on a Win2k Server that is part of a
> work group.
> The OLAP is on a Win2k Domain Controller.
> Any clues on how to establish a successful processing of the OLTP in its
> normal position would be appreciated.
> Thanks
> Bob
>
>
|||Hi,
Thanks for your reply.
I altered the OLAP service to run under administrator but it has made no
difference.
This is extremely poor design in IMHO. If the ODBC object can connect to
the OLTP, the OLAP should be able to process, end of story.
There is no trusted connection between the OLAP machine (Win2k Domain
Controller) and the OLTP machine (Win2k Server but running as a member of a
workgroup)
So I am relying ODBC to sort out the security issues.
e.g.. Access can use ODBC to link to tables in the OLTP so how come the OLAP
is so frail?
I have tried to create an ODBC connection to the OLTP that uses SQL server
authentication but have failed . I keep getting
'Not associated with a trusted SQL server connection'.
In a perfect world I would promote the OLTP to be a domain controller of its
own domain and establish a trust relationship between the to domains. But no
can do.
I think Bill's merry men should be looking at this.
Either I am missing something fundamental or the OLAP connection needs
redesigning.
No way should it be this difficult to use in this situation.
i.e. Anything that Access can do, OLAP should be able to do. The security
implications are the same.
regards
Bob
"bc" <bc@.discussions.microsoft.com> wrote in message
news:D6258097-009A-492A-BA75-2AC40A664968@.microsoft.com...
> have you made sure the services for OLTP sql server and AS on the other
> server are started with the same admin account and not local?
> When you are in the design in AS, you are authenticated using your login
to
> the sql server source so it is ok there, but when you are processing, it
is
> authenticated using the login that start up AS, so that login might not
have[vbcol=seagreen]
> access to the sql server tables to process the dimensions.
>
> "Bob" wrote:
of[vbcol=seagreen]
the[vbcol=seagreen]

Friday, March 9, 2012

OLE DB Source & Excel Destination

Hi,

My OLE DB Source and Excel desintation values all will be assigned during the run time but it does work during design time but as on runtime columns are different. That's why it does not work.

Here is what I want to accomplish, I have table which contains all my report which needs to dumped to excel at the month end.

SQL Task using ADO enumrator read one record(one report), Give that record to For Each contair which Create the Excel file on the fly using one of variable from my table and uses a stored procedure to dump data to excel using Dataflow Task.

xlsQuery

CREATE TABLE `Sheet1` ( `FiscalYear` Short, `FiscalPeriod` Byte, `STORE #` Short, `Total Markups` Decimal(15,2), `Less Markdown SubTotal` Decimal(15,2), `Total Markup` Decimal(15,2) ) GO

sqlQuery

Exec Report.MyReport 1

Does it mean for 10 reports, I have to create 10 different data flow tasks, or it can be done using one data flow tasks but changing columns on the run time.

Please Help

Thanks

Shafiq

If the metadata of the sources changes then you cannot use the same data-flow task. Its as simple (or as difficult) as that.

-Jamie

|||

Is it possible to add a conditional splitter in my For Each Loop container to go to different Data-Flow Tasks based on package variable?

Or is there any thing which can refresh the meta data during runtime?

Thanks

Shafiq

|||

shafiqm wrote:

Is it possible to add a conditional splitter in my For Each Loop container to go to different Data-Flow Tasks based on package variable?

Yes, except they're not called conditional splitters. The correct nomenclature is conditional precedence constraints. Loads of good info here: http://www.sqlis.com/default.aspx?306

shafiqm wrote:

Or is there any thing which can refresh the meta data during runtime?

No! Well, actually there is a horrible workaround which involves editing a .dtsx package from another .dtsx package. I have never done it and I certainly never intend to - steer well clear of it.

Using precedence constraints to decide which data-flow to execute is absolutely the right way to go.

HTH

-Jamie

|||

I am going to use the conditional precedence constraints. The next question is do I have to use different OLE DB source / Excel File connection Manager for each data-flow task or they can be changed dynamically.

I was trying to only use one OLE DB and I got error message VS_NEEDSNEWMETADATA

Thanks

|||

You can use the same connection manager across different data-flows and change it dynamically.

You can not use an OLE DB Source component in different data-flows.

-Jamie

|||

It looks like I can't use same Excel File connection Manager as during the design time, If I change the file the mapping of data-flow task then previously defined Data-flow tasks goes wrong and I get the message

Excel desitnation needs VS_NEEDSNEWMETADATA

Note: Each excel file will have different columns depending upon the report

I think same excel file connection manager only work if all the files have the same number of columns

It looks like I am doing an automatic job manually.

Thanks

|||

OK, here's the deal. Once you change the connection manager to point to a file with differrent metadata then of course the data-flow tasks will fail to validate because they are expecting one thing and seeing another (that's what's causing the message you are getting).

Get around this by setting DelayValidation=TRUE on all the data-flows. THis means that they won't get validated until they are executed by which time your connection manager connection string should be set up correctly.

-Jamie

|||

Thanks very much for your prompt response and it help me a lot. One last thing. As I am deleting the excel file and re-creating every time the package runs, Is there way to format the excel file using SSIS

e.g.

Format a column to show 2 decimal places or format as currency

Do any subtotal or run a macro?

I know I did this using ActiveXScript task in SQL 2000, Is there any other way to do this?

Thanks

|||

If Excel has an API (which I assume it does) then I assume you can manipulate it via that API. You would need to ask someone that knows about Excel.

-Jamie

Monday, February 20, 2012

Old SQL Design Tools

Hi Guys...

I was familiar to use sqlserver2000 more than 2 years, and Utilized from beneficial Tools Like Enterprise Manager and Query Analyzer which was so helpfull... .

afterthen I decide to get knowledge on SqlServer 2005 Enterpise Edition.

and after install 2CD's and SP1 , I try to find the Old Tools mentioned above , or find any DataBase as example , but I find nothing ... so is there any tool do the role to related tools in the last version , or should I get another vesion instead like Express or ...etc.

Thanks

Basel

There should be SQL Server Management Studio, which is both EM and QA at once (an many other features as well).

If only it's not an Express version, either.

|||

just a little word of inspiration

"Don't get intimidated by the new UI"

everything has changed. though you can find it out easily

|||

Inspiration is all what I need to start great new day

Tnax to send your helpful space