Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Friday, March 23, 2012

Help developing this project.

Hi,
I'm about to start working on a new project and I would like to have
some ideas from you guys. I already got an idea how to do it, but I'm
not sure how good it is.
This is the problem:
We have about 20 tables with data. We have Persons, Addresses, Vehicles,
Properties, Phones...
The problem that we have is they want to have everything related (many
to many) For example, we may have a Person related with an address, or a
Vehicle with an address, a property with 2 persons... any kind of
combination that you may think.
How to design that? First I thought in having 20 tables and creating one
link table between every two types. As you can see, that wouldn't be a
good solution, because we would have too many of these intermediate tables.
Then I thought that maybe I could have only 1 table with the data of the
20 types and have an extra field that tell us what type it is (if it is
a Person, an Address, ... )
The table would be like this:
Table A
--
PK (autoincrement)
RecordType (from 1 to 20)
Custom1
Custom2
Custom3
Custom4
...
Once I have that, I would add an extra table that give us the relations
between 2 records of Table A. Something Like this:
Table B
--
FK_1 (Foreign key to a record in Table A)
FK_2 (Foreign key to a record in Table A)
What do you guys think? I know it's not really nice but I cannot find a
better solution for that.
Thanks a lot!No - do not have one table for everything - this is very bad. Might as
well use text files to store your data, because you wouldn't need a
relational database.
The correct solution is your first instinct : linking tables that link
one entity to one other entity.
I suspect that everything doesn't truly relate to everything else in a
many-many relation. (e.g., Addresses-Properties).
Once you determine the actual many-many relations, why would having it
done right result in "too many tables?" [sounds like the emporer in
"Amadeus" telling Mozart his music has "too many notes"]
Star wrote:
> Hi,
> I'm about to start working on a new project and I would like to have
> some ideas from you guys. I already got an idea how to do it, but I'm
> not sure how good it is.
> This is the problem:
> We have about 20 tables with data. We have Persons, Addresses, Vehicles,
> Properties, Phones...
> The problem that we have is they want to have everything related (many
> to many) For example, we may have a Person related with an address, or a
> Vehicle with an address, a property with 2 persons... any kind of
> combination that you may think.
> How to design that? First I thought in having 20 tables and creating one
> link table between every two types. As you can see, that wouldn't be a
> good solution, because we would have too many of these intermediate tables
.
> Then I thought that maybe I could have only 1 table with the data of the
> 20 types and have an extra field that tell us what type it is (if it is
> a Person, an Address, ... )
> The table would be like this:
> Table A
> --
> PK (autoincrement)
> RecordType (from 1 to 20)
> Custom1
> Custom2
> Custom3
> Custom4
> ...
> Once I have that, I would add an extra table that give us the relations
> between 2 records of Table A. Something Like this:
> Table B
> --
> FK_1 (Foreign key to a record in Table A)
> FK_2 (Foreign key to a record in Table A)
>
> What do you guys think? I know it's not really nice but I cannot find a
> better solution for that.
> Thanks a lot!
>|||Star wrote:
> Hi,
> I'm about to start working on a new project and I would like to have
> some ideas from you guys. I already got an idea how to do it, but I'm
> not sure how good it is.
> This is the problem:
> We have about 20 tables with data. We have Persons, Addresses, Vehicles,
> Properties, Phones...
> The problem that we have is they want to have everything related (many
> to many) For example, we may have a Person related with an address, or a
> Vehicle with an address, a property with 2 persons... any kind of
> combination that you may think.
> How to design that? First I thought in having 20 tables and creating one
> link table between every two types. As you can see, that wouldn't be a
> good solution, because we would have too many of these intermediate tables
.
>
Not too many. Just as many as are needed - no more and no less. I
suspect it isn't as complicated as "they" think Probably the customer
is just being lazy about the specs - which is normal - but it's the
developer / analyst or PM's job to deal with that and to elicit proper
specs from the users or sponsors.
Take a look at:
http://www.intelligententerprise.com/010101/celko.jhtml
David Portas
SQL Server MVP
--|||"Star" <star@.nospam.com> wrote in message
news:%23RPA0n29FHA.2816@.tk2msftngp13.phx.gbl...
> Hi,
> I'm about to start working on a new project and I would like to have some
> ideas from you guys. I already got an idea how to do it, but I'm not sure
> how good it is.
> This is the problem:
> We have about 20 tables with data. We have Persons, Addresses, Vehicles,
> Properties, Phones...
> The problem that we have is they want to have everything related (many to
> many) For example, we may have a Person related with an address, or a
> Vehicle with an address, a property with 2 persons... any kind of
> combination that you may think.
> How to design that? First I thought in having 20 tables and creating one
> link table between every two types. As you can see, that wouldn't be a
> good solution, because we would have too many of these intermediate
> tables.
> Then I thought that maybe I could have only 1 table with the data of the
> 20 types and have an extra field that tell us what type it is (if it is a
> Person, an Address, ... )
> The table would be like this:
> Table A
> --
> PK (autoincrement)
> RecordType (from 1 to 20)
> Custom1
> Custom2
> Custom3
> Custom4
> ...
> Once I have that, I would add an extra table that give us the relations
> between 2 records of Table A. Something Like this:
> Table B
> --
> FK_1 (Foreign key to a record in Table A)
> FK_2 (Foreign key to a record in Table A)
>
> What do you guys think? I know it's not really nice but I cannot find a
> better solution for that.
> Thanks a lot!
I agree with Trey on this one.
One thing that you mentionned "or a Vehicle with an address".
It sounds silly to me asking "what's the address of the vehicule".
The vehicle should be linked to a person.
(I'm not sure if the vehicle can be owned or registered by more than one
person.)
Once you have the owner, it's easy to find the address or addresses.|||Hey folks,
Thanks for you answers.

> It sounds silly to me asking "what's the address of the vehicule".
Unfortunately not on this system. This systems tracks all kind of
information. Let's say that for example there was a robbery and the
vehicle was found at a certain location. That's why we may have all kind
of weird relationships.
I agree with you guys in having a relationship table for each pair that
we may think that are going to be related, but as I said our users may
have at any moment the need of adding a relation between two very
different kind of data.
If we have one relationship table for each pair, we would have 380
(19*20) relationship tables, and I don't think that would be a good idea.
I will try to convince my supervisors of only having the relationships
that we really know that are going to exist (that's what I have always
wanted), but that's not going to be easy.
By the way, I thought about another solution. Not very good either, but
I would like to have your opinion.
Here it is:
We do have the 20 tables. Persons, Addresses, ...
Each one of these tables look like this:
Table X
--
PK (autoincrement)
[Rest of the fields]
We assign an ID to each one of these tables. For example, for Persons is
1, for Addresses is 2 and so on
Now we have only 1 relationship table and it looks like this:
Table Relations
--
SourceID
FK_Source
DestinationID
FK_Dest
[other fields]
The PK of this table is (SourceID,FK_Source,DestinationID,FK_Des
t)
SourceID and DestinationID are going to have the ID of one of the 20
tables respectively. FK_Source and FK_Dest are the PKs of one of the 20
tables respectively
So if we have in that Relations table something like (1,32123,2,543543)
We know that we have a relation between a person and a address. The PK
of this person is 32123 and the PK of the address is 543543.
The relation between 2 tables changes depending on the type of data.
Not really a relational database...
What do you guys think?
Thanks a lot!!

Raymond D'Anjou wrote:
> "Star" <star@.nospam.com> wrote in message
> news:%23RPA0n29FHA.2816@.tk2msftngp13.phx.gbl...
>
>
> I agree with Trey on this one.
> One thing that you mentionned "or a Vehicle with an address".
> It sounds silly to me asking "what's the address of the vehicule".
> The vehicle should be linked to a person.
> (I'm not sure if the vehicle can be owned or registered by more than one
> person.)
> Once you have the owner, it's easy to find the address or addresses.
>|||"Star" <star@.nospam.com> wrote in message
news:eVN1el39FHA.2184@.TK2MSFTNGP10.phx.gbl...

> If we have one relationship table for each pair, we would have 380 (19*20)
> relationship tables, and I don't think that would be a good idea.
I've developed databases with more tables than that. The limit in SQL Server
is more than 2 billion objects.
An alternative may be the classic "type/supertype" model. See the following
example. Notice that the keys ensure each entity is of exactly one type.
This can get much more sophisticated by adding the entity_types to the
joining table (entity_references) so that you can enforce rules allowing
only certain combinations of references. Also you may want to add a column
to determine what kind of reference is defined in each case.
CREATE TABLE entities (entity_code INTEGER NOT NULL PRIMARY KEY, entity_type
CHAR(2) NOT NULL CHECK (entity_type IN ('AD','VH','PR') /*
Address/Vehicle/Person */), UNIQUE (entity_code, entity_type)) ;
CREATE TABLE entity_references (entity_code_1 INTEGER NOT NULL REFERENCES
entities (entity_code), entity_code_2 INTEGER NOT NULL REFERENCES entities
(entity_code)) ;
CREATE TABLE addresses (entity_code INTEGER NOT NULL, entity_type CHAR(2)
NOT NULL DEFAULT 'AD' CHECK (entity_type = 'AD'), FOREIGN KEY (entity_code,
entity_type) REFERENCES entities (entity_code, entity_type), /* address
attributes . . . */);
CREATE TABLE vehicles (entity_code INTEGER NOT NULL, entity_type CHAR(2) NOT
NULL DEFAULT 'VH' CHECK (entity_type = 'VH'), FOREIGN KEY (entity_code,
entity_type) REFERENCES entities (entity_code, entity_type), /* vehicle
attributes . . . */);
CREATE TABLE persons (entity_code INTEGER NOT NULL, entity_type CHAR(2) NOT
NULL DEFAULT 'PR' CHECK (entity_type = 'PR'), FOREIGN KEY (entity_code,
entity_type) REFERENCES entities (entity_code, entity_type), /* person
attributes . . . */);
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:OPUHrE49FHA.1028@.TK2MSFTNGP11.phx.gbl...
Oops. I missed out a key:
CREATE TABLE entity_references (entity_code_1 INTEGER NOT NULL REFERENCES
entities (entity_code), entity_code_2 INTEGER NOT NULL REFERENCES entities
(entity_code), PRIMARY KEY (entity_code_1, entity_code_2)) ;
David Portas
SQL Server MVP
--|||... in fact I missed out nearly all the keys! For completeness, here it is
again:
CREATE TABLE entities (entity_code INTEGER NOT NULL PRIMARY KEY, entity_type
CHAR(2) NOT NULL CHECK (entity_type IN ('AD','VH','PR') /*
Address/Vehicle/Person */), UNIQUE (entity_code, entity_type)) ;
CREATE TABLE entity_references (entity_code_1 INTEGER NOT NULL PRIMARY KEY
REFERENCES entities (entity_code), entity_code_2 INTEGER NOT NULL REFERENCES
entities (entity_code)) ;
CREATE TABLE addresses (entity_code INTEGER NOT NULL PRIMARY KEY,
entity_type CHAR(2) NOT NULL DEFAULT 'AD' CHECK (entity_type = 'AD'),
FOREIGN KEY (entity_code, entity_type) REFERENCES entities (entity_code,
entity_type), /* address attributes . . . */);
CREATE TABLE vehicles (entity_code INTEGER NOT NULL PRIMARY KEY, entity_type
CHAR(2) NOT NULL DEFAULT 'VH' CHECK (entity_type = 'VH'), FOREIGN KEY
(entity_code, entity_type) REFERENCES entities (entity_code, entity_type),
/* vehicle attributes . . . */);
CREATE TABLE persons (entity_code INTEGER NOT NULL PRIMARY KEY, entity_type
CHAR(2) NOT NULL DEFAULT 'PR' CHECK (entity_type = 'PR'), FOREIGN KEY
(entity_code, entity_type) REFERENCES entities (entity_code, entity_type),
/* person attributes . . . */);
Hope this helps.
David Portas
SQL Server MVP
--|||A few things:
* Nothing wrong with 380 tables, if you need them all.
* Anything that doesn't strongly define and relate entities is going to
lead to problems.
* However your users think things should be related will drive design,
of course, but their definition of "related" could be different than a
rdbms definition. There will almost certainly be more attributes to
these n-n relations than simply x.id(n)--y.id(n) [ simple example:
person-phone may have phone number type (home,work,mobile,fax,etc.)
which truly belongs with this relationship and not the phone number
itself ]. From your one example, Address-Vehicle still seems to not be a
true n-n relationship - it seems more like "address found" is an
attribute of the relationship of "vehicles involved in a case" (which
itself is an n-n relation between cases-vehicles) - after all, what use
is "address where vehicle found" if it doesn't relate to a case?
(assuming there is such entity).
Only thorough business analysis will help you determine this.
Star wrote:
> Hey folks,
> Thanks for you answers.
>
> Unfortunately not on this system. This systems tracks all kind of
> information. Let's say that for example there was a robbery and the
> vehicle was found at a certain location. That's why we may have all kind
> of weird relationships.
> I agree with you guys in having a relationship table for each pair that
> we may think that are going to be related, but as I said our users may
> have at any moment the need of adding a relation between two very
> different kind of data.
> If we have one relationship table for each pair, we would have 380
> (19*20) relationship tables, and I don't think that would be a good idea.
> I will try to convince my supervisors of only having the relationships
> that we really know that are going to exist (that's what I have always
> wanted), but that's not going to be easy.
> By the way, I thought about another solution. Not very good either, but
> I would like to have your opinion.
> Here it is:
> We do have the 20 tables. Persons, Addresses, ...
> Each one of these tables look like this:
> Table X
> --
> PK (autoincrement)
> [Rest of the fields]
> We assign an ID to each one of these tables. For example, for Persons is
> 1, for Addresses is 2 and so on
> Now we have only 1 relationship table and it looks like this:
> Table Relations
> --
> SourceID
> FK_Source
> DestinationID
> FK_Dest
> [other fields]
> The PK of this table is (SourceID,FK_Source,DestinationID,FK_Des
t)
> SourceID and DestinationID are going to have the ID of one of the 20
> tables respectively. FK_Source and FK_Dest are the PKs of one of the 20
> tables respectively
> So if we have in that Relations table something like (1,32123,2,543543)
> We know that we have a relation between a person and a address. The PK
> of this person is 32123 and the PK of the address is 543543.
> The relation between 2 tables changes depending on the type of data.
> Not really a relational database...
> What do you guys think?
> Thanks a lot!!
>
>
>
>
>
>
>
> Raymond D'Anjou wrote:
>|||Thanks a lot, David!
I haven't tried it yet, I will be doing some testing through the
wend. My first impression is your idea is something similar to my
second solution, but will all the relations defined correctly. Please
correct me if I'm wrong.
I'll get back to you in a couple of days, when I do some other testing.
Thanks again.
David Portas wrote:
> ... in fact I missed out nearly all the keys! For completeness, here it is
> again:
> CREATE TABLE entities (entity_code INTEGER NOT NULL PRIMARY KEY, entity_ty
pe
> CHAR(2) NOT NULL CHECK (entity_type IN ('AD','VH','PR') /*
> Address/Vehicle/Person */), UNIQUE (entity_code, entity_type)) ;
> CREATE TABLE entity_references (entity_code_1 INTEGER NOT NULL PRIMARY KEY
> REFERENCES entities (entity_code), entity_code_2 INTEGER NOT NULL REFERENC
ES
> entities (entity_code)) ;
> CREATE TABLE addresses (entity_code INTEGER NOT NULL PRIMARY KEY,
> entity_type CHAR(2) NOT NULL DEFAULT 'AD' CHECK (entity_type = 'AD'),
> FOREIGN KEY (entity_code, entity_type) REFERENCES entities (entity_code,
> entity_type), /* address attributes . . . */);
> CREATE TABLE vehicles (entity_code INTEGER NOT NULL PRIMARY KEY, entity_ty
pe
> CHAR(2) NOT NULL DEFAULT 'VH' CHECK (entity_type = 'VH'), FOREIGN KEY
> (entity_code, entity_type) REFERENCES entities (entity_code, entity_type),
> /* vehicle attributes . . . */);
> CREATE TABLE persons (entity_code INTEGER NOT NULL PRIMARY KEY, entity_typ
e
> CHAR(2) NOT NULL DEFAULT 'PR' CHECK (entity_type = 'PR'), FOREIGN KEY
> (entity_code, entity_type) REFERENCES entities (entity_code, entity_type),
> /* person attributes . . . */);
> Hope this helps.
>sql

Monday, March 12, 2012

HELP ! - How can a run a sql script to install a DB in a MS SQL Server?

Hello everyone,
I am new in the area of developing and I want to run a couple of sql scripts, what is the procedure to run them if I am using a MS SQL Server?
Thanks,
ArmandoUse Query Analyzer.

Check out the Books On Line.

Cheers,

hmscott

Friday, March 9, 2012

HELP - SRS for Developer Ed installed instead of for Standard Ed.

I have been getting ready to finally put into my company's Production
Environment all the reports I have been developing in our Test Environment.
The Test Environment is SQL 2000 Developer Edition, and SRS was installed via
the CD that came in the box - I read that it said "For SQL Server 2000
Developer Edition only."
The decision was made that we did not need Enterprise Edition features, so a
Standard Edition SQL Server 2000 license was purchased and installed, be my
supervisor. He then used the SAME CD for SRS to install that I did. His
logic was "These Microsoft disks can detect what version of SQL Server is
running, and only install the components for the version detected."
I was unaware of this and have been loading the new server with reports and
running the Report Snapshots for the LONG RUNNING REPORTS, and setting up the
Shared Schedules and Permissions for the 125+ reports. I was about to start
creating the Manual Subscriptions for the various reports when I noticed the
'New Data-driven Subscription' button, and then realized what happened.
I would like to avoid redoing work, if possible. Is there a way to
over-install the Standard Edition Version of SQL Reporting Services on top of
the Developer Edition, so I don't have to re-setup everything? Is there a
way to downgrade/upgrade Editions without having to re-build the site?It is possible to do this. Before starting anything, of course, backup your
databases and the report server encryption key (see help topics on backing
up report server).
1. Uninstall the developer edition (this will not remove the report server
databases)
2. Install the standard edition. When asked for a database, use a new one.
Do NOT use the one from the developer install
3. After installation is complete, run rsconfig to point the new
installation at the old database
4. Delete the temporary database that you created as part of step 2.
If you created any data driven subscriptions, they will no longer run with
standard installed.
--
This posting is provided "AS IS" with no warranties, and confers no rights
"Rob 'Spike' Stevens" <RobSpikeStevens@.discussions.microsoft.com> wrote in
message news:060F4BF0-885C-45A6-A871-3BBC19EF6617@.microsoft.com...
> I have been getting ready to finally put into my company's Production
> Environment all the reports I have been developing in our Test
Environment.
> The Test Environment is SQL 2000 Developer Edition, and SRS was installed
via
> the CD that came in the box - I read that it said "For SQL Server 2000
> Developer Edition only."
> The decision was made that we did not need Enterprise Edition features, so
a
> Standard Edition SQL Server 2000 license was purchased and installed, be
my
> supervisor. He then used the SAME CD for SRS to install that I did. His
> logic was "These Microsoft disks can detect what version of SQL Server is
> running, and only install the components for the version detected."
> I was unaware of this and have been loading the new server with reports
and
> running the Report Snapshots for the LONG RUNNING REPORTS, and setting up
the
> Shared Schedules and Permissions for the 125+ reports. I was about to
start
> creating the Manual Subscriptions for the various reports when I noticed
the
> 'New Data-driven Subscription' button, and then realized what happened.
> I would like to avoid redoing work, if possible. Is there a way to
> over-install the Standard Edition Version of SQL Reporting Services on top
of
> the Developer Edition, so I don't have to re-setup everything? Is there a
> way to downgrade/upgrade Editions without having to re-build the site?|||I followed your instructions, except I hadn't yet deleted the 'temp' database
yet - didn't want to get rid of it until I knew things are working. They
aren't. I get the following error now:
This edition of Reporting Services does not support web farm deployment.
(rsInvalidRSEditionConfiguration) Get Online Help
Online help says the following:
You cannot use the Standard edition of Reporting Services to deploy multiple
report servers in a Web farms.
I am not using a Web Farm. I have one server that houses the source
databases for my company, and this SRS server that hosts the IIS website and
the SRS databases, both with standard edition. The RDS file points to the
source database server. Is this what SRS consideres a Web Farm? According
to your schemeatics on Reporting Services I have a proper license for both
servers.
"Brian Hartman [MSFT]" wrote:
> It is possible to do this. Before starting anything, of course, backup your
> databases and the report server encryption key (see help topics on backing
> up report server).
> 1. Uninstall the developer edition (this will not remove the report server
> databases)
> 2. Install the standard edition. When asked for a database, use a new one.
> Do NOT use the one from the developer install
> 3. After installation is complete, run rsconfig to point the new
> installation at the old database
> 4. Delete the temporary database that you created as part of step 2.
> If you created any data driven subscriptions, they will no longer run with
> standard installed.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Rob 'Spike' Stevens" <RobSpikeStevens@.discussions.microsoft.com> wrote in
> message news:060F4BF0-885C-45A6-A871-3BBC19EF6617@.microsoft.com...
> > I have been getting ready to finally put into my company's Production
> > Environment all the reports I have been developing in our Test
> Environment.
> > The Test Environment is SQL 2000 Developer Edition, and SRS was installed
> via
> > the CD that came in the box - I read that it said "For SQL Server 2000
> > Developer Edition only."
> >
> > The decision was made that we did not need Enterprise Edition features, so
> a
> > Standard Edition SQL Server 2000 license was purchased and installed, be
> my
> > supervisor. He then used the SAME CD for SRS to install that I did. His
> > logic was "These Microsoft disks can detect what version of SQL Server is
> > running, and only install the components for the version detected."
> >
> > I was unaware of this and have been loading the new server with reports
> and
> > running the Report Snapshots for the LONG RUNNING REPORTS, and setting up
> the
> > Shared Schedules and Permissions for the 125+ reports. I was about to
> start
> > creating the Manual Subscriptions for the various reports when I noticed
> the
> > 'New Data-driven Subscription' button, and then realized what happened.
> >
> > I would like to avoid redoing work, if possible. Is there a way to
> > over-install the Standard Edition Version of SQL Reporting Services on top
> of
> > the Developer Edition, so I don't have to re-setup everything? Is there a
> > way to downgrade/upgrade Editions without having to re-build the site?
>
>|||I went ahead and deleted the new 'temp' databases after running rsconfig
again. I still get the same errors listed below.
"Rob 'Spike' Stevens" wrote:
> I followed your instructions, except I hadn't yet deleted the 'temp' database
> yet - didn't want to get rid of it until I knew things are working. They
> aren't. I get the following error now:
> This edition of Reporting Services does not support web farm deployment.
> (rsInvalidRSEditionConfiguration) Get Online Help
> Online help says the following:
> You cannot use the Standard edition of Reporting Services to deploy multiple
> report servers in a Web farms.
> I am not using a Web Farm. I have one server that houses the source
> databases for my company, and this SRS server that hosts the IIS website and
> the SRS databases, both with standard edition. The RDS file points to the
> source database server. Is this what SRS consideres a Web Farm? According
> to your schemeatics on Reporting Services I have a proper license for both
> servers.
> "Brian Hartman [MSFT]" wrote:
> > It is possible to do this. Before starting anything, of course, backup your
> > databases and the report server encryption key (see help topics on backing
> > up report server).
> >
> > 1. Uninstall the developer edition (this will not remove the report server
> > databases)
> > 2. Install the standard edition. When asked for a database, use a new one.
> > Do NOT use the one from the developer install
> > 3. After installation is complete, run rsconfig to point the new
> > installation at the old database
> > 4. Delete the temporary database that you created as part of step 2.
> >
> > If you created any data driven subscriptions, they will no longer run with
> > standard installed.
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights
> >
> > "Rob 'Spike' Stevens" <RobSpikeStevens@.discussions.microsoft.com> wrote in
> > message news:060F4BF0-885C-45A6-A871-3BBC19EF6617@.microsoft.com...
> > > I have been getting ready to finally put into my company's Production
> > > Environment all the reports I have been developing in our Test
> > Environment.
> > > The Test Environment is SQL 2000 Developer Edition, and SRS was installed
> > via
> > > the CD that came in the box - I read that it said "For SQL Server 2000
> > > Developer Edition only."
> > >
> > > The decision was made that we did not need Enterprise Edition features, so
> > a
> > > Standard Edition SQL Server 2000 license was purchased and installed, be
> > my
> > > supervisor. He then used the SAME CD for SRS to install that I did. His
> > > logic was "These Microsoft disks can detect what version of SQL Server is
> > > running, and only install the components for the version detected."
> > >
> > > I was unaware of this and have been loading the new server with reports
> > and
> > > running the Report Snapshots for the LONG RUNNING REPORTS, and setting up
> > the
> > > Shared Schedules and Permissions for the 125+ reports. I was about to
> > start
> > > creating the Manual Subscriptions for the various reports when I noticed
> > the
> > > 'New Data-driven Subscription' button, and then realized what happened.
> > >
> > > I would like to avoid redoing work, if possible. Is there a way to
> > > over-install the Standard Edition Version of SQL Reporting Services on top
> > of
> > > the Developer Edition, so I don't have to re-setup everything? Is there a
> > > way to downgrade/upgrade Editions without having to re-build the site?
> >
> >
> >|||Also, Iâ'm finding this error message in the application log:
Reporting Services components from different editions cannot be used together.
"Rob 'Spike' Stevens" wrote:
> I went ahead and deleted the new 'temp' databases after running rsconfig
> again. I still get the same errors listed below.
> "Rob 'Spike' Stevens" wrote:
> > I followed your instructions, except I hadn't yet deleted the 'temp' database
> > yet - didn't want to get rid of it until I knew things are working. They
> > aren't. I get the following error now:
> >
> > This edition of Reporting Services does not support web farm deployment.
> > (rsInvalidRSEditionConfiguration) Get Online Help
> >
> > Online help says the following:
> > You cannot use the Standard edition of Reporting Services to deploy multiple
> > report servers in a Web farms.
> >
> > I am not using a Web Farm. I have one server that houses the source
> > databases for my company, and this SRS server that hosts the IIS website and
> > the SRS databases, both with standard edition. The RDS file points to the
> > source database server. Is this what SRS consideres a Web Farm? According
> > to your schemeatics on Reporting Services I have a proper license for both
> > servers.
> >
> > "Brian Hartman [MSFT]" wrote:
> >
> > > It is possible to do this. Before starting anything, of course, backup your
> > > databases and the report server encryption key (see help topics on backing
> > > up report server).
> > >
> > > 1. Uninstall the developer edition (this will not remove the report server
> > > databases)
> > > 2. Install the standard edition. When asked for a database, use a new one.
> > > Do NOT use the one from the developer install
> > > 3. After installation is complete, run rsconfig to point the new
> > > installation at the old database
> > > 4. Delete the temporary database that you created as part of step 2.
> > >
> > > If you created any data driven subscriptions, they will no longer run with
> > > standard installed.
> > >
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no rights
> > >
> > > "Rob 'Spike' Stevens" <RobSpikeStevens@.discussions.microsoft.com> wrote in
> > > message news:060F4BF0-885C-45A6-A871-3BBC19EF6617@.microsoft.com...
> > > > I have been getting ready to finally put into my company's Production
> > > > Environment all the reports I have been developing in our Test
> > > Environment.
> > > > The Test Environment is SQL 2000 Developer Edition, and SRS was installed
> > > via
> > > > the CD that came in the box - I read that it said "For SQL Server 2000
> > > > Developer Edition only."
> > > >
> > > > The decision was made that we did not need Enterprise Edition features, so
> > > a
> > > > Standard Edition SQL Server 2000 license was purchased and installed, be
> > > my
> > > > supervisor. He then used the SAME CD for SRS to install that I did. His
> > > > logic was "These Microsoft disks can detect what version of SQL Server is
> > > > running, and only install the components for the version detected."
> > > >
> > > > I was unaware of this and have been loading the new server with reports
> > > and
> > > > running the Report Snapshots for the LONG RUNNING REPORTS, and setting up
> > > the
> > > > Shared Schedules and Permissions for the 125+ reports. I was about to
> > > start
> > > > creating the Manual Subscriptions for the various reports when I noticed
> > > the
> > > > 'New Data-driven Subscription' button, and then realized what happened.
> > > >
> > > > I would like to avoid redoing work, if possible. Is there a way to
> > > > over-install the Standard Edition Version of SQL Reporting Services on top
> > > of
> > > > the Developer Edition, so I don't have to re-setup everything? Is there a
> > > > way to downgrade/upgrade Editions without having to re-build the site?
> > >
> > >
> > >|||I was able to find a solution. Thanks for the help you did provide.
"Rob 'Spike' Stevens" wrote:
> Also, Iâ'm finding this error message in the application log:
> Reporting Services components from different editions cannot be used together.
>
> "Rob 'Spike' Stevens" wrote:
> > I went ahead and deleted the new 'temp' databases after running rsconfig
> > again. I still get the same errors listed below.
> >
> > "Rob 'Spike' Stevens" wrote:
> >
> > > I followed your instructions, except I hadn't yet deleted the 'temp' database
> > > yet - didn't want to get rid of it until I knew things are working. They
> > > aren't. I get the following error now:
> > >
> > > This edition of Reporting Services does not support web farm deployment.
> > > (rsInvalidRSEditionConfiguration) Get Online Help
> > >
> > > Online help says the following:
> > > You cannot use the Standard edition of Reporting Services to deploy multiple
> > > report servers in a Web farms.
> > >
> > > I am not using a Web Farm. I have one server that houses the source
> > > databases for my company, and this SRS server that hosts the IIS website and
> > > the SRS databases, both with standard edition. The RDS file points to the
> > > source database server. Is this what SRS consideres a Web Farm? According
> > > to your schemeatics on Reporting Services I have a proper license for both
> > > servers.
> > >
> > > "Brian Hartman [MSFT]" wrote:
> > >
> > > > It is possible to do this. Before starting anything, of course, backup your
> > > > databases and the report server encryption key (see help topics on backing
> > > > up report server).
> > > >
> > > > 1. Uninstall the developer edition (this will not remove the report server
> > > > databases)
> > > > 2. Install the standard edition. When asked for a database, use a new one.
> > > > Do NOT use the one from the developer install
> > > > 3. After installation is complete, run rsconfig to point the new
> > > > installation at the old database
> > > > 4. Delete the temporary database that you created as part of step 2.
> > > >
> > > > If you created any data driven subscriptions, they will no longer run with
> > > > standard installed.
> > > >
> > > > --
> > > > This posting is provided "AS IS" with no warranties, and confers no rights
> > > >
> > > > "Rob 'Spike' Stevens" <RobSpikeStevens@.discussions.microsoft.com> wrote in
> > > > message news:060F4BF0-885C-45A6-A871-3BBC19EF6617@.microsoft.com...
> > > > > I have been getting ready to finally put into my company's Production
> > > > > Environment all the reports I have been developing in our Test
> > > > Environment.
> > > > > The Test Environment is SQL 2000 Developer Edition, and SRS was installed
> > > > via
> > > > > the CD that came in the box - I read that it said "For SQL Server 2000
> > > > > Developer Edition only."
> > > > >
> > > > > The decision was made that we did not need Enterprise Edition features, so
> > > > a
> > > > > Standard Edition SQL Server 2000 license was purchased and installed, be
> > > > my
> > > > > supervisor. He then used the SAME CD for SRS to install that I did. His
> > > > > logic was "These Microsoft disks can detect what version of SQL Server is
> > > > > running, and only install the components for the version detected."
> > > > >
> > > > > I was unaware of this and have been loading the new server with reports
> > > > and
> > > > > running the Report Snapshots for the LONG RUNNING REPORTS, and setting up
> > > > the
> > > > > Shared Schedules and Permissions for the 125+ reports. I was about to
> > > > start
> > > > > creating the Manual Subscriptions for the various reports when I noticed
> > > > the
> > > > > 'New Data-driven Subscription' button, and then realized what happened.
> > > > >
> > > > > I would like to avoid redoing work, if possible. Is there a way to
> > > > > over-install the Standard Edition Version of SQL Reporting Services on top
> > > > of
> > > > > the Developer Edition, so I don't have to re-setup everything? Is there a
> > > > > way to downgrade/upgrade Editions without having to re-build the site?
> > > >
> > > >
> > > >

Help - Simple DataGrid Problem in Vis. Studio 2003

Hi,
As a relative newbie to SQL Server/ASP.NET I'm hoping someone here
can help with my problem. I'm developing a timesheet application in
ASP.NET C# using Visual Studio 2003 with a database built in MSDE.
One of my forms needs to return a simple list of resources from my
database. I have followed the guide on the MSDN libraries, but for
some reason I continuously get the same error message.
What I've done so far is Create the database, tables, and populate
with some sample data using using Server Explorer in Visual Studio. I
have
connected to the database (using integrated security) and I am
trying to get the contents of the Resource table to appear on my
form. I have then created a DataAdapter (tested the connection, set
the SQL as a simple SELECT * from Resource, etc), which also generates
an sqlConnection for me. To test this I have previewed the generated
data, and it returns what I want, so I
have chosen to generate a DataSet of this. I am then trying to get
this data into a simple DataGrid. On the properties of the DataGrid
I have changed the DataSource to point at my Dataset. As I
understand it, I then have to add the following to my Page Load
section of my code.
sqlConnection1.Open();
this.sqlDataAdapter1.Fill(this.dsResource);
sqlConnection1.Close();
The form builds fine, but when I browse to the particular form I get
the following error for the sqlConnection1.Open(); line
Exception Details: System.Data.SqlClient.SqlException: Cannot open
database requested in login 'SCMS'. Login fails. Login failed for
user 'AL-NOTEPAD\ASPNET'.
To me this is an error with my connection string. My database
instance is actually 'AL-NOTEPAD\VSDOTNET'. However the properties
for sqlConnection1 are pointing to the correct datasource. I do not
know why the application is looking for user 'AL-NOTEPAD\ASPNET'. It
does not exist, to my knowledge.
Any help with this would be greatly appreciated, as I get the same
error with my code for forms-based login...
Thanks in advance..thebison (alex.sinclair3@.btinternet.com) writes:
> The form builds fine, but when I browse to the particular form I get
> the following error for the sqlConnection1.Open(); line
> Exception Details: System.Data.SqlClient.SqlException: Cannot open
> database requested in login 'SCMS'. Login fails. Login failed for
> user 'AL-NOTEPAD\ASPNET'.
> To me this is an error with my connection string. My database
> instance is actually 'AL-NOTEPAD\VSDOTNET'. However the properties
> for sqlConnection1 are pointing to the correct datasource. I do not
> know why the application is looking for user 'AL-NOTEPAD\ASPNET'. It
> does not exist, to my knowledge.
I guess that's why the login fails. :-)
I believe this has to do with that IIS runs the in a context of a pre-
defined user, and IIS the tries to log in with integrated security,
but the ASPNET user have not been granted access to the database.
But you are probably better off asking in a newsgroup about ASP .Net.
At least I know very little about ASP .Net.
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

Monday, February 27, 2012

HELP - Designing a Subscripion System for a Group of Reports

We're developing an ASP.NET 2.0 (C#) application that will act as a
front-end to SQL Server 2005 Reporting Services. We have an interesting
requirement that [we believe] can't be solved using RS out-of-the-box. So,
I'm writing today to get some ideas on possible solutions.
The requirement is that the app. needs to support, what we're calling, a
report group. A report group is simply a group of similar reports that can
be executed as a single unit (instead of having to execute each report
individually). This was not too bad to solve. We simply created our own
database tables that track which report group contains which reports.
The tricky part is that we now have to figure out a way to create a
subscription that executes the report group (thereby executing each
individual report in the report group automatically). Creating a
subscription for a single report is fairly straightforward, but it appears
this concept of a report group is not a part of RS.
Does anyone out there have any good ideas/suggestions on how we can
implement such functionality?
The best thought we have so far is to write another application that manages
the execution of each report in a report group. So, the SQL Server 2005 job
would call this additional little application, this additional app. would
lookup which reports are in the report group, and then it would loop through
all the reports and execute them one-by-one. But, this has some issues-like
how do we handle the output type (PDF, Excel, etc.) and how do we handle the
destination (e-mail, printer, etc.) of each report. Plus, it seems like we
would be somewhat reinventing the wheel as far as subscriptions go.
Thanks.Why aren't you using one master report with all the other reports as
sub-reports?
Tom Bizannes
oiduts wrote:
> We're developing an ASP.NET 2.0 (C#) application that will act as a
> front-end to SQL Server 2005 Reporting Services. We have an interesting
> requirement that [we believe] can't be solved using RS out-of-the-box. So,
> I'm writing today to get some ideas on possible solutions.
> The requirement is that the app. needs to support, what we're calling, a
> report group. A report group is simply a group of similar reports that can
> be executed as a single unit (instead of having to execute each report
> individually). This was not too bad to solve. We simply created our own
> database tables that track which report group contains which reports.
> The tricky part is that we now have to figure out a way to create a
> subscription that executes the report group (thereby executing each
> individual report in the report group automatically). Creating a
> subscription for a single report is fairly straightforward, but it appears
> this concept of a report group is not a part of RS.
> Does anyone out there have any good ideas/suggestions on how we can
> implement such functionality?
> The best thought we have so far is to write another application that manages
> the execution of each report in a report group. So, the SQL Server 2005 job
> would call this additional little application, this additional app. would
> lookup which reports are in the report group, and then it would loop through
> all the reports and execute them one-by-one. But, this has some issues-like
> how do we handle the output type (PDF, Excel, etc.) and how do we handle the
> destination (e-mail, printer, etc.) of each report. Plus, it seems like we
> would be somewhat reinventing the wheel as far as subscriptions go.
> Thanks.|||You could try setting up a shared schedule. It would still require
individual subscriptions for each report but they would all start
firing at the same scheduled time.