Showing posts with label structure. Show all posts
Showing posts with label structure. Show all posts

Friday, March 30, 2012

Laws against copying the whole database structure and scripts.

Hi,

I would like to know if there are laws in any state that prohibits anyone from using someone else's database structure and stored procedures. I would like to think that if someone's else got hold of my database and use it and sell a product that uses the structure, will there be a legal basis to sue that person or company?

I know that this sounds a little bit crazy but I want some light regarding this matter.

ThanksDon't let anyone into your database, use passwords to protect it.
Grant rights as appropriate. If you want people to get to a database through application but not directly to a database hash people passwords before login so they wouldnt really know their passwords. Never grant windows authentication.

I never heard of such law. If you let person into your database and let them view everything they probably can copy it.
You have to have patent for your work to protect your copy rights by law.

Good Luck.|||

Quote:

Originally Posted by lihard

Hi,

I would like to know if there are laws in any state that prohibits anyone from using someone else's database structure and stored procedures. I would like to think that if someone's else got hold of my database and use it and sell a product that uses the structure, will there be a legal basis to sue that person or company?

I know that this sounds a little bit crazy but I want some light regarding this matter.

Thanks



In my experience (and I am not a lawyer so don't quote me on it. If you need that go see one) the principles of copyright law demand that you can prove 'uniqueness' of a product entity to you. To have a script that creates a table of shall we say people in which there might be firstname, surname and so on, in itself would be impossible to prove as 'your' copyright because it is so generic.

If however over a thousand scripts comprising one system if it could be shown that the total number when taken together as a 'whole' shows uniqueness of 'the system' then you may have a case.

The protection of copyright (as distinct from patent) is invoked the minute an object is created by its author it does not require any other action, no court action, patent or anything else from my understanding.

Practically speaking you would need to ensure that 'uniqueness' is in your favour as the author and that this can be 'demonstrated' to a third party/external body (ie a court). Evidentially speaking this could be something as little as posting a document or other crucial proof of its existence, at a point in time, back to yourself on the day the object was created.

The process is always going to be adversarial... the outcome of which would rely on independant adjudication to determine who is the so called 'winner' no doubt from a very costly prosecution or defence of an 'action'

Regards

Jim

Wednesday, March 7, 2012

Large table structure

Hi
Have noticed that some table structures get quite large in size, when you truncate the table it's still large. It doesn't appear to be an index issue. The large tables cause problems in MSDE as the database then reaches the 2 GB limit.
Has anyone seen this before or know why it happens?
Regards
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
> Have noticed that some table structures get quite large in size, when you truncate the table it's
still large.
How do you determine that? What command etc. are you using?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rachel" <rachel.goodson@.iwl.com.au> wrote in message news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> Hi
> Have noticed that some table structures get quite large in size, when you truncate the table it's
still large. It doesn't appear to be an index issue. The large tables cause problems in MSDE as
the database then reaches the 2 GB limit.
> Has anyone seen this before or know why it happens?
> Regards
> ************************************************** ********************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Hi Tibor
Thank you for your reply. To determine the size of the table, we truncated
the contains of the table and then compared it to a emtpy table in an
identical database. We found the truncated table was unusually large. We
would like to know if there is anyway to prevent this from happening.
Regards
Rachel
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
you truncate the table it's
> still large.
> How do you determine that? What command etc. are you using?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
you truncate the table it's
> still large. It doesn't appear to be an index issue. The large tables
cause problems in MSDE as[vbcol=seagreen]
> the database then reaches the 2 GB limit.
ASP.NET resources...
>
|||What command did you use to "truncate the contains for the table".
Also, what commands did you use to check the size.
I.e., please post TSQL. If we didn't know what you did, it is very difficult to guess what is going
on.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rachel" <rachel@.xyz.com> wrote in message news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi Tibor
> Thank you for your reply. To determine the size of the table, we truncated
> the contains of the table and then compared it to a emtpy table in an
> identical database. We found the truncated table was unusually large. We
> would like to know if there is anyway to prevent this from happening.
> Regards
> Rachel
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
> you truncate the table it's
> news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> you truncate the table it's
> cause problems in MSDE as
> ASP.NET resources...
>
|||Hi Tibor,
Here's what I did:
Got a database in from a client that surpasses the 2 gig limit.
Attached it in SQL Server and viewed the taskpad in Enterprise Manager.
Noticed after comparing with another database with similar contents that
some tables are oversize.
Truncated the oversize table in query analyzer using the command:
truncate table <tablename>
I then truncated the table on the reference database using the same command.
Went back into the taskpad and the size of the empty table was still huge,
and space is only freed up in the database when the table is dropped. I
thought it might be a large index but it is not the case.
When the table is recreated using a script from an identical table in Object
Browser in Query Analyser, and the data is added back in, the database size
is reduced dramatically.
This issue seems to be getting more and more common and our clients are
asking questions as to why they have to purchase SQL Server when is it not
necessary.
Regards
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
> What command did you use to "truncate the contains for the table".
> Also, what commands did you use to check the size.
> I.e., please post TSQL. If we didn't know what you did, it is very
difficult to guess what is going
> on.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Rachel" <rachel@.xyz.com> wrote in message
news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
truncated[vbcol=seagreen]
We[vbcol=seagreen]
in[vbcol=seagreen]
when[vbcol=seagreen]
when[vbcol=seagreen]
tables[vbcol=seagreen]
************************************************** ********************
>
|||I suggest you look into DBCC UPDATEUSAGE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rachel" <rachel@.xyz.com> wrote in message news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...
> Hi Tibor,
> Here's what I did:
> Got a database in from a client that surpasses the 2 gig limit.
> Attached it in SQL Server and viewed the taskpad in Enterprise Manager.
> Noticed after comparing with another database with similar contents that
> some tables are oversize.
> Truncated the oversize table in query analyzer using the command:
> truncate table <tablename>
> I then truncated the table on the reference database using the same command.
> Went back into the taskpad and the size of the empty table was still huge,
> and space is only freed up in the database when the table is dropped. I
> thought it might be a large index but it is not the case.
> When the table is recreated using a script from an identical table in Object
> Browser in Query Analyser, and the data is added back in, the database size
> is reduced dramatically.
> This issue seems to be getting more and more common and our clients are
> asking questions as to why they have to purchase SQL Server when is it not
> necessary.
> Regards
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
> difficult to guess what is going
> news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
> truncated
> We
> in
> when
> when
> tables
> ************************************************** ********************
>
|||This makes no difference as this relates to the indexes which are fine.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uN1ep5wpEHA.4076@.TK2MSFTNGP12.phx.gbl...
> I suggest you look into DBCC UPDATEUSAGE.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Rachel" <rachel@.xyz.com> wrote in message
news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
command.[vbcol=seagreen]
huge,[vbcol=seagreen]
Object[vbcol=seagreen]
size[vbcol=seagreen]
not[vbcol=seagreen]
in[vbcol=seagreen]
large.[vbcol=seagreen]
wrote[vbcol=seagreen]
&
>
|||Rachel
Please read the docs for DBCC UPDATEUSAGE again. Although it affects the
data stored in the sysindexes table, that does NOT mean it just pertains to
indexes. The command allows you to specify a table name to have its space
allocation information updated. Sysindexes keeps track of all objects in a
database that take up space, which includes tables, indexes and text/image
fields.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Rachel" <rachel@.xyz.com> wrote in message
news:Ov4u6tnqEHA.536@.TK2MSFTNGP09.phx.gbl...
> This makes no difference as this relates to the indexes which are fine.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> message news:uN1ep5wpEHA.4076@.TK2MSFTNGP12.phx.gbl...
> news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...
> command.
> huge,
> Object
> size
> not
> in
> large.
> wrote
> &
>
|||Hi Kalen
I did run the command but it made no difference to the size of the tables.
Regards
Rachel
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:OgO2k1nqEHA.3728@.TK2MSFTNGP09.phx.gbl...
> Rachel
> Please read the docs for DBCC UPDATEUSAGE again. Although it affects the
> data stored in the sysindexes table, that does NOT mean it just pertains
to[vbcol=seagreen]
> indexes. The command allows you to specify a table name to have its space
> allocation information updated. Sysindexes keeps track of all objects in a
> database that take up space, which includes tables, indexes and text/image
> fields.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Rachel" <rachel@.xyz.com> wrote in message
> news:Ov4u6tnqEHA.536@.TK2MSFTNGP09.phx.gbl...
Manager.[vbcol=seagreen]
database[vbcol=seagreen]
are[vbcol=seagreen]
it[vbcol=seagreen]
size,[vbcol=seagreen]
size,[vbcol=seagreen]
************************************************** ********************
>

Large table structure

Hi
Have noticed that some table structures get quite large in size, when you truncate the table it's still large. It doesn't appear to be an index issue. The large tables cause problems in MSDE as the database then reaches the 2 GB limit.
Has anyone seen this before or know why it happens?
Regards
**********************************************************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...> Have noticed that some table structures get quite large in size, when you truncate the table it's
still large.
How do you determine that? What command etc. are you using?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rachel" <rachel.goodson@.iwl.com.au> wrote in message news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> Hi
> Have noticed that some table structures get quite large in size, when you truncate the table it's
still large. It doesn't appear to be an index issue. The large tables cause problems in MSDE as
the database then reaches the 2 GB limit.
> Has anyone seen this before or know why it happens?
> Regards
> **********************************************************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...|||Hi Tibor
Thank you for your reply. To determine the size of the table, we truncated
the contains of the table and then compared it to a emtpy table in an
identical database. We found the truncated table was unusually large. We
would like to know if there is anyway to prevent this from happening.
Regards
Rachel
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
> > Have noticed that some table structures get quite large in size, when
you truncate the table it's
> still large.
> How do you determine that? What command etc. are you using?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> > Hi
> >
> > Have noticed that some table structures get quite large in size, when
you truncate the table it's
> still large. It doesn't appear to be an index issue. The large tables
cause problems in MSDE as
> the database then reaches the 2 GB limit.
> >
> > Has anyone seen this before or know why it happens?
> >
> > Regards
> >
> > **********************************************************************
> > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> > Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
>|||What command did you use to "truncate the contains for the table".
Also, what commands did you use to check the size.
I.e., please post TSQL. If we didn't know what you did, it is very difficult to guess what is going
on.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rachel" <rachel@.xyz.com> wrote in message news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi Tibor
> Thank you for your reply. To determine the size of the table, we truncated
> the contains of the table and then compared it to a emtpy table in an
> identical database. We found the truncated table was unusually large. We
> would like to know if there is anyway to prevent this from happening.
> Regards
> Rachel
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
> > > Have noticed that some table structures get quite large in size, when
> you truncate the table it's
> > still large.
> >
> > How do you determine that? What command etc. are you using?
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
> news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> > > Hi
> > >
> > > Have noticed that some table structures get quite large in size, when
> you truncate the table it's
> > still large. It doesn't appear to be an index issue. The large tables
> cause problems in MSDE as
> > the database then reaches the 2 GB limit.
> > >
> > > Has anyone seen this before or know why it happens?
> > >
> > > Regards
> > >
> > > **********************************************************************
> > > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> > > Comprehensive, categorised, searchable collection of links to ASP &
> ASP.NET resources...
> >
> >
>|||Hi Tibor,
Here's what I did:
Got a database in from a client that surpasses the 2 gig limit.
Attached it in SQL Server and viewed the taskpad in Enterprise Manager.
Noticed after comparing with another database with similar contents that
some tables are oversize.
Truncated the oversize table in query analyzer using the command:
truncate table <tablename>
I then truncated the table on the reference database using the same command.
Went back into the taskpad and the size of the empty table was still huge,
and space is only freed up in the database when the table is dropped. I
thought it might be a large index but it is not the case.
When the table is recreated using a script from an identical table in Object
Browser in Query Analyser, and the data is added back in, the database size
is reduced dramatically.
This issue seems to be getting more and more common and our clients are
asking questions as to why they have to purchase SQL Server when is it not
necessary.
Regards
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
> What command did you use to "truncate the contains for the table".
> Also, what commands did you use to check the size.
> I.e., please post TSQL. If we didn't know what you did, it is very
difficult to guess what is going
> on.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Rachel" <rachel@.xyz.com> wrote in message
news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
> > Hi Tibor
> >
> > Thank you for your reply. To determine the size of the table, we
truncated
> > the contains of the table and then compared it to a emtpy table in an
> > identical database. We found the truncated table was unusually large.
We
> > would like to know if there is anyway to prevent this from happening.
> >
> > Regards
> > Rachel
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
> > > > Have noticed that some table structures get quite large in size,
when
> > you truncate the table it's
> > > still large.
> > >
> > > How do you determine that? What command etc. are you using?
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
> > news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> > > > Hi
> > > >
> > > > Have noticed that some table structures get quite large in size,
when
> > you truncate the table it's
> > > still large. It doesn't appear to be an index issue. The large
tables
> > cause problems in MSDE as
> > > the database then reaches the 2 GB limit.
> > > >
> > > > Has anyone seen this before or know why it happens?
> > > >
> > > > Regards
> > > >
> > > >
**********************************************************************
> > > > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> > > > Comprehensive, categorised, searchable collection of links to ASP &
> > ASP.NET resources...
> > >
> > >
> >
> >
>|||I suggest you look into DBCC UPDATEUSAGE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rachel" <rachel@.xyz.com> wrote in message news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...
> Hi Tibor,
> Here's what I did:
> Got a database in from a client that surpasses the 2 gig limit.
> Attached it in SQL Server and viewed the taskpad in Enterprise Manager.
> Noticed after comparing with another database with similar contents that
> some tables are oversize.
> Truncated the oversize table in query analyzer using the command:
> truncate table <tablename>
> I then truncated the table on the reference database using the same command.
> Went back into the taskpad and the size of the empty table was still huge,
> and space is only freed up in the database when the table is dropped. I
> thought it might be a large index but it is not the case.
> When the table is recreated using a script from an identical table in Object
> Browser in Query Analyser, and the data is added back in, the database size
> is reduced dramatically.
> This issue seems to be getting more and more common and our clients are
> asking questions as to why they have to purchase SQL Server when is it not
> necessary.
> Regards
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
>> What command did you use to "truncate the contains for the table".
>> Also, what commands did you use to check the size.
>> I.e., please post TSQL. If we didn't know what you did, it is very
> difficult to guess what is going
>> on.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Rachel" <rachel@.xyz.com> wrote in message
> news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
>> > Hi Tibor
>> >
>> > Thank you for your reply. To determine the size of the table, we
> truncated
>> > the contains of the table and then compared it to a emtpy table in an
>> > identical database. We found the truncated table was unusually large.
> We
>> > would like to know if there is anyway to prevent this from happening.
>> >
>> > Regards
>> > Rachel
>> >
>> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
>> > message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
>> > > > Have noticed that some table structures get quite large in size,
> when
>> > you truncate the table it's
>> > > still large.
>> > >
>> > > How do you determine that? What command etc. are you using?
>> > >
>> > > --
>> > > Tibor Karaszi, SQL Server MVP
>> > > http://www.karaszi.com/sqlserver/default.asp
>> > > http://www.solidqualitylearning.com/
>> > >
>> > >
>> > > "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
>> > news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
>> > > > Hi
>> > > >
>> > > > Have noticed that some table structures get quite large in size,
> when
>> > you truncate the table it's
>> > > still large. It doesn't appear to be an index issue. The large
> tables
>> > cause problems in MSDE as
>> > > the database then reaches the 2 GB limit.
>> > > >
>> > > > Has anyone seen this before or know why it happens?
>> > > >
>> > > > Regards
>> > > >
>> > > >
> **********************************************************************
>> > > > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>> > > > Comprehensive, categorised, searchable collection of links to ASP &
>> > ASP.NET resources...
>> > >
>> > >
>> >
>> >
>>
>|||This makes no difference as this relates to the indexes which are fine.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uN1ep5wpEHA.4076@.TK2MSFTNGP12.phx.gbl...
> I suggest you look into DBCC UPDATEUSAGE.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Rachel" <rachel@.xyz.com> wrote in message
news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...
> > Hi Tibor,
> >
> > Here's what I did:
> >
> > Got a database in from a client that surpasses the 2 gig limit.
> > Attached it in SQL Server and viewed the taskpad in Enterprise Manager.
> > Noticed after comparing with another database with similar contents that
> > some tables are oversize.
> > Truncated the oversize table in query analyzer using the command:
> >
> > truncate table <tablename>
> >
> > I then truncated the table on the reference database using the same
command.
> >
> > Went back into the taskpad and the size of the empty table was still
huge,
> > and space is only freed up in the database when the table is dropped. I
> > thought it might be a large index but it is not the case.
> >
> > When the table is recreated using a script from an identical table in
Object
> > Browser in Query Analyser, and the data is added back in, the database
size
> > is reduced dramatically.
> >
> > This issue seems to be getting more and more common and our clients are
> > asking questions as to why they have to purchase SQL Server when is it
not
> > necessary.
> >
> > Regards
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
> >> What command did you use to "truncate the contains for the table".
> >>
> >> Also, what commands did you use to check the size.
> >>
> >> I.e., please post TSQL. If we didn't know what you did, it is very
> > difficult to guess what is going
> >> on.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Rachel" <rachel@.xyz.com> wrote in message
> > news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
> >> > Hi Tibor
> >> >
> >> > Thank you for your reply. To determine the size of the table, we
> > truncated
> >> > the contains of the table and then compared it to a emtpy table in an
> >> > identical database. We found the truncated table was unusually
large.
> > We
> >> > would like to know if there is anyway to prevent this from happening.
> >> >
> >> > Regards
> >> > Rachel
> >> >
> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> >> > message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
> >> > > > Have noticed that some table structures get quite large in size,
> > when
> >> > you truncate the table it's
> >> > > still large.
> >> > >
> >> > > How do you determine that? What command etc. are you using?
> >> > >
> >> > > --
> >> > > Tibor Karaszi, SQL Server MVP
> >> > > http://www.karaszi.com/sqlserver/default.asp
> >> > > http://www.solidqualitylearning.com/
> >> > >
> >> > >
> >> > > "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
> >> > news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> >> > > > Hi
> >> > > >
> >> > > > Have noticed that some table structures get quite large in size,
> > when
> >> > you truncate the table it's
> >> > > still large. It doesn't appear to be an index issue. The large
> > tables
> >> > cause problems in MSDE as
> >> > > the database then reaches the 2 GB limit.
> >> > > >
> >> > > > Has anyone seen this before or know why it happens?
> >> > > >
> >> > > > Regards
> >> > > >
> >> > > >
> > **********************************************************************
> >> > > > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> >> > > > Comprehensive, categorised, searchable collection of links to ASP
&
> >> > ASP.NET resources...
> >> > >
> >> > >
> >> >
> >> >
> >>
> >>
> >
> >
>|||Rachel
Please read the docs for DBCC UPDATEUSAGE again. Although it affects the
data stored in the sysindexes table, that does NOT mean it just pertains to
indexes. The command allows you to specify a table name to have its space
allocation information updated. Sysindexes keeps track of all objects in a
database that take up space, which includes tables, indexes and text/image
fields.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Rachel" <rachel@.xyz.com> wrote in message
news:Ov4u6tnqEHA.536@.TK2MSFTNGP09.phx.gbl...
> This makes no difference as this relates to the indexes which are fine.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> message news:uN1ep5wpEHA.4076@.TK2MSFTNGP12.phx.gbl...
>> I suggest you look into DBCC UPDATEUSAGE.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Rachel" <rachel@.xyz.com> wrote in message
> news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...
>> > Hi Tibor,
>> >
>> > Here's what I did:
>> >
>> > Got a database in from a client that surpasses the 2 gig limit.
>> > Attached it in SQL Server and viewed the taskpad in Enterprise Manager.
>> > Noticed after comparing with another database with similar contents
>> > that
>> > some tables are oversize.
>> > Truncated the oversize table in query analyzer using the command:
>> >
>> > truncate table <tablename>
>> >
>> > I then truncated the table on the reference database using the same
> command.
>> >
>> > Went back into the taskpad and the size of the empty table was still
> huge,
>> > and space is only freed up in the database when the table is dropped.
>> > I
>> > thought it might be a large index but it is not the case.
>> >
>> > When the table is recreated using a script from an identical table in
> Object
>> > Browser in Query Analyser, and the data is added back in, the database
> size
>> > is reduced dramatically.
>> >
>> > This issue seems to be getting more and more common and our clients are
>> > asking questions as to why they have to purchase SQL Server when is it
> not
>> > necessary.
>> >
>> > Regards
>> >
>> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
>> > wrote
> in
>> > message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
>> >> What command did you use to "truncate the contains for the table".
>> >>
>> >> Also, what commands did you use to check the size.
>> >>
>> >> I.e., please post TSQL. If we didn't know what you did, it is very
>> > difficult to guess what is going
>> >> on.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Rachel" <rachel@.xyz.com> wrote in message
>> > news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
>> >> > Hi Tibor
>> >> >
>> >> > Thank you for your reply. To determine the size of the table, we
>> > truncated
>> >> > the contains of the table and then compared it to a emtpy table in
>> >> > an
>> >> > identical database. We found the truncated table was unusually
> large.
>> > We
>> >> > would like to know if there is anyway to prevent this from
>> >> > happening.
>> >> >
>> >> > Regards
>> >> > Rachel
>> >> >
>> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote
>> > in
>> >> > message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
>> >> > > > Have noticed that some table structures get quite large in size,
>> > when
>> >> > you truncate the table it's
>> >> > > still large.
>> >> > >
>> >> > > How do you determine that? What command etc. are you using?
>> >> > >
>> >> > > --
>> >> > > Tibor Karaszi, SQL Server MVP
>> >> > > http://www.karaszi.com/sqlserver/default.asp
>> >> > > http://www.solidqualitylearning.com/
>> >> > >
>> >> > >
>> >> > > "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
>> >> > news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
>> >> > > > Hi
>> >> > > >
>> >> > > > Have noticed that some table structures get quite large in size,
>> > when
>> >> > you truncate the table it's
>> >> > > still large. It doesn't appear to be an index issue. The large
>> > tables
>> >> > cause problems in MSDE as
>> >> > > the database then reaches the 2 GB limit.
>> >> > > >
>> >> > > > Has anyone seen this before or know why it happens?
>> >> > > >
>> >> > > > Regards
>> >> > > >
>> >> > > >
>> > **********************************************************************
>> >> > > > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>> >> > > > Comprehensive, categorised, searchable collection of links to
>> >> > > > ASP
> &
>> >> > ASP.NET resources...
>> >> > >
>> >> > >
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>|||Hi Kalen
I did run the command but it made no difference to the size of the tables.
Regards
Rachel
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:OgO2k1nqEHA.3728@.TK2MSFTNGP09.phx.gbl...
> Rachel
> Please read the docs for DBCC UPDATEUSAGE again. Although it affects the
> data stored in the sysindexes table, that does NOT mean it just pertains
to
> indexes. The command allows you to specify a table name to have its space
> allocation information updated. Sysindexes keeps track of all objects in a
> database that take up space, which includes tables, indexes and text/image
> fields.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Rachel" <rachel@.xyz.com> wrote in message
> news:Ov4u6tnqEHA.536@.TK2MSFTNGP09.phx.gbl...
> > This makes no difference as this relates to the indexes which are fine.
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> > in
> > message news:uN1ep5wpEHA.4076@.TK2MSFTNGP12.phx.gbl...
> >> I suggest you look into DBCC UPDATEUSAGE.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Rachel" <rachel@.xyz.com> wrote in message
> > news:%23ZAwFtnpEHA.3244@.tk2msftngp13.phx.gbl...
> >> > Hi Tibor,
> >> >
> >> > Here's what I did:
> >> >
> >> > Got a database in from a client that surpasses the 2 gig limit.
> >> > Attached it in SQL Server and viewed the taskpad in Enterprise
Manager.
> >> > Noticed after comparing with another database with similar contents
> >> > that
> >> > some tables are oversize.
> >> > Truncated the oversize table in query analyzer using the command:
> >> >
> >> > truncate table <tablename>
> >> >
> >> > I then truncated the table on the reference database using the same
> > command.
> >> >
> >> > Went back into the taskpad and the size of the empty table was still
> > huge,
> >> > and space is only freed up in the database when the table is dropped.
> >> > I
> >> > thought it might be a large index but it is not the case.
> >> >
> >> > When the table is recreated using a script from an identical table in
> > Object
> >> > Browser in Query Analyser, and the data is added back in, the
database
> > size
> >> > is reduced dramatically.
> >> >
> >> > This issue seems to be getting more and more common and our clients
are
> >> > asking questions as to why they have to purchase SQL Server when is
it
> > not
> >> > necessary.
> >> >
> >> > Regards
> >> >
> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> >> > wrote
> > in
> >> > message news:O5rg5RUpEHA.592@.TK2MSFTNGP11.phx.gbl...
> >> >> What command did you use to "truncate the contains for the table".
> >> >>
> >> >> Also, what commands did you use to check the size.
> >> >>
> >> >> I.e., please post TSQL. If we didn't know what you did, it is very
> >> > difficult to guess what is going
> >> >> on.
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Rachel" <rachel@.xyz.com> wrote in message
> >> > news:%23vSnZ3OpEHA.592@.TK2MSFTNGP11.phx.gbl...
> >> >> > Hi Tibor
> >> >> >
> >> >> > Thank you for your reply. To determine the size of the table, we
> >> > truncated
> >> >> > the contains of the table and then compared it to a emtpy table in
> >> >> > an
> >> >> > identical database. We found the truncated table was unusually
> > large.
> >> > We
> >> >> > would like to know if there is anyway to prevent this from
> >> >> > happening.
> >> >> >
> >> >> > Regards
> >> >> > Rachel
> >> >> >
> >> >> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > wrote
> >> > in
> >> >> > message news:e912QSVoEHA.896@.TK2MSFTNGP12.phx.gbl...
> >> >> > > > Have noticed that some table structures get quite large in
size,
> >> > when
> >> >> > you truncate the table it's
> >> >> > > still large.
> >> >> > >
> >> >> > > How do you determine that? What command etc. are you using?
> >> >> > >
> >> >> > > --
> >> >> > > Tibor Karaszi, SQL Server MVP
> >> >> > > http://www.karaszi.com/sqlserver/default.asp
> >> >> > > http://www.solidqualitylearning.com/
> >> >> > >
> >> >> > >
> >> >> > > "Rachel" <rachel.goodson@.iwl.com.au> wrote in message
> >> >> > news:OAFiR8PoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> >> >> > > > Hi
> >> >> > > >
> >> >> > > > Have noticed that some table structures get quite large in
size,
> >> > when
> >> >> > you truncate the table it's
> >> >> > > still large. It doesn't appear to be an index issue. The large
> >> > tables
> >> >> > cause problems in MSDE as
> >> >> > > the database then reaches the 2 GB limit.
> >> >> > > >
> >> >> > > > Has anyone seen this before or know why it happens?
> >> >> > > >
> >> >> > > > Regards
> >> >> > > >
> >> >> > > >
> >> >
**********************************************************************
> >> >> > > > Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> >> >> > > > Comprehensive, categorised, searchable collection of links to
> >> >> > > > ASP
> > &
> >> >> > ASP.NET resources...
> >> >> > >
> >> >> > >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>

Friday, February 24, 2012

Large number of reports

Hi

I have a large number of reports that are very similar in structure (only some query and report heading changes).

Creation of these is simple by creating a template or modifying the project file and saving as a new project. But whenever there is some change to be made (format or query change), it has to be made individually in all of the reports, which makes it very time consuming and error prone.

Can anyone give some suggestions as to how to automate this process, or some other way to improve maintainability in this situation.

Thanks

Shomik

Unfortunately RS does not support CSS which would be ideal. One solution is to make certain formatting options data driven. Seeing as most properties are expression based, you could have a styles table and have the report query the styles at runtime and set colours and fonts based on fields from a dataset. Any change would effect all supporting reports.|||

I have made the formatting options and even the static messages shown, database driven wherever possible. But still cannot do it everywhere, because of which even a position change of a textbox has to be made in all of the reports manually.

I tried using a template, but that is ok for creating the new report. I again have the same problem when it comes to maintenance.

Can anyone suggest any changes to the way I am doing this or another approach for tackling this issue ?

Thanks,

Shomik

Monday, February 20, 2012

Large Export of Data from one DB of one Structure to Another

Hi guys,

Hopefully this is the right place to ask.

Basically we have have two larges databases, one of which is updated from the other monthly.

For exaplination purposes:

DB1 = Source DB

DB2 = Destination DB

The problem that I require a soltion to is, how do I insert rows from a table in DB1 to DB2 and recover and store the identity of the new row against the ID of the existing row. This is so that I can then matain constraints when it comes to inserting rows into the next table and the next and so on.

This process of storing the ID's as lookups will need to be done for almost every table of which there are 20.

The best Idea we have at the minute is to create a table with two colums for each table (drop it and recreate it after each table has exported) that contains the two ID's, new and old.

This will require using a cursor for each row in the existing table, inserting it in the new table and the using @.@.Scope_Identity to get the new ID and then insert the two values into the temp table.

This too me feels like it will be very slow, particuarly when I bear in mind how much data we have.

Does anyone have any better ideas? (Sorry if the explaination isn't great, its difficult to get accross)

Thanks

Ed


--db1
CREATE TABLE MOVETO
(
iID uniqueidentifier,
iName nchar(50)
)

CREATE TABLE MOVETO_TABLETWO
(
iRowid int identity(1,1),
cAddress nvarchar(100)
)
--db2
CREATE TABLE MOVEFROM
(
TableTwo int Identity(1,1),
iID uniqueidentifier,
cAddress nvarchar(100)
)

CREATE PROCEDURE MOVEDATA
AS
BEGIN

CREATE #GETIDENTITY TABLE
(
iIdentity int identity(1,1)
oldidentity uniqueidentifier,
newidentity uniqueidentifier DEFAULT NEWID()
)
--get old and new identitys
INSERT INTO #GETIDENTITY(oldidentity)
SELECT iID
FROM MOVEFROM
WHERE ?


--now hookup new identitys to insert into MOVETO

INSERT INTO db2.MOVETO(iID,iName)
SELECT G.newidentity
FROM #GETIDENTITY G INNER JOIN MOVEFROM MF
ON G.oldidentity = MF.iID

--INSERT INTO MOVER_TABLETWO
INSERT INTO db2.MOVETO_TABLETWO(cAddress)
SELECT MF.cAddress
FROM #GETIDENTITY G INNER JOIN MOVEFROM MF
ON F.oldidentity = MF.iID


DROP TABLE #GETIDENTITY

END