Showing posts with label records. Show all posts
Showing posts with label records. Show all posts

Thursday, March 29, 2012

EOF (end of file)

Hi! Is there an equivalent EOF function in Crystal Reports 8.5.?
I want to use a Do While Loop, but dont know the number of records so
I want to use the EOF so it will terminate upon reaching the end of the
file.
Thanks.you can have RECORD COUNT so based on that number you can specify total number of loops you will require in report

Tuesday, March 27, 2012

Enumerate ODBC System records

By calling CDatabase::OpenEx(NULL, CDatabase::forceODBCDialog)
you get the ODBC DSN Control panel selection screen thingy to choose from.
That screen has File, System and perhaps more tabs on them
I want to not go through that selection window, instead only enumerate the
System DSNs in my own app.
I know this info is stored in the windows registry, but I'm looking to do
this using the right way: documented API's.
Any idea ?
LisaTake a look at the SQLDataSources API. This will allow you to enumerate the
DSNs.
HTH
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@.m_ with @. to reply.
"Lisa Pearlson" <no@.spam.plz> wrote in message
news:OjuNz$02DHA.1760@.TK2MSFTNGP10.phx.gbl...
quote:

> By calling CDatabase::OpenEx(NULL, CDatabase::forceODBCDialog)
> you get the ODBC DSN Control panel selection screen thingy to choose from.
> That screen has File, System and perhaps more tabs on them
> I want to not go through that selection window, instead only enumerate the
> System DSNs in my own app.
> I know this info is stored in the windows registry, but I'm looking to do
> this using the right way: documented API's.
> Any idea ?
> Lisa
>

Monday, March 26, 2012

entity relationships and performance

I have large, very heavily used database (SQL 2000). Performance is critical. I have a job that runs on a nightly basis to delete records no longer need from specific tables (as to keep them manageable).

My question, does have entity relationships on these tables adversely affect performance? The cleanup batch job is taking so long now that I'd like to delete table relationships to speed it up.

I understand the value for maintaining data integerity, but any insight as to how relationships affect performance?

Thanks.Well, I delete the relationships. The batch job that deleted records went from 6-10 hours to 22 minutes.

So, while I don't think there is a major performance hit by having relationships established and doing selects/inserts/updates, there obviously is when it comes to deletes.|||whether you are doing inserts, updates or deletes there wil lalways be a "HIT" due to RI. Insert or Update 10,000 records at one time, both with and without RI and you will see a diffrence. The question is does removal of RI justify the speed over potentialy corrupted data.|||Obviously, the performance gain was substantial. Are there any performance gains via relationships, i.e. does the query optimizer leverage relationships when creating execution plans?|||No. The optimizer looks at indexes, statistics and hints to decide the best query plan.
Referential integrity is there solely to enforce the quality of the data.

Wednesday, March 21, 2012

Enterprise manager taking up to 10 minutes to save design changes

Hi,
I am running SQL 2000 with an 8 GB database. I have two relatively large
tables (each with about 2 million records in them), and I occasionally need
to make changes to the table design (add a column, increase the size of an
existing field, etc.) on these two tables through the Enterprise Manager.
However, saving these changes can take betwen 5-10 minutes to complete.
If I make changes to any of my other smaller tables, they are saved
instantly. Is it really supposed to take this long for larger tables to be
updated?
Any suggestions would be greatly appreciated.
Never make a change to a production db with EM. Most of the time it will
create a temp table, copy all the data over from the original, drop the
original and then rename the temp table to the original name. Most of the
time a simple ALTER TABLE is all you need to issue. If it is something
simple like increasing a varchar column it might just be a meta data change.
Andrew J. Kelly SQL MVP
"Stu" <Stu@.discussions.microsoft.com> wrote in message
news:BACB0B6C-FDA2-439A-BFA5-A5672AE7AE21@.microsoft.com...
> Hi,
> I am running SQL 2000 with an 8 GB database. I have two relatively large
> tables (each with about 2 million records in them), and I occasionally
> need
> to make changes to the table design (add a column, increase the size of an
> existing field, etc.) on these two tables through the Enterprise Manager.
> However, saving these changes can take betwen 5-10 minutes to complete.
> If I make changes to any of my other smaller tables, they are saved
> instantly. Is it really supposed to take this long for larger tables to
> be
> updated?
> Any suggestions would be greatly appreciated.

Enterprise manager taking up to 10 minutes to save design changes

Hi,
I am running SQL 2000 with an 8 GB database. I have two relatively large
tables (each with about 2 million records in them), and I occasionally need
to make changes to the table design (add a column, increase the size of an
existing field, etc.) on these two tables through the Enterprise Manager.
However, saving these changes can take betwen 5-10 minutes to complete.
If I make changes to any of my other smaller tables, they are saved
instantly. Is it really supposed to take this long for larger tables to be
updated?
Any suggestions would be greatly appreciated.Never make a change to a production db with EM. Most of the time it will
create a temp table, copy all the data over from the original, drop the
original and then rename the temp table to the original name. Most of the
time a simple ALTER TABLE is all you need to issue. If it is something
simple like increasing a varchar column it might just be a meta data change.
--
Andrew J. Kelly SQL MVP
"Stu" <Stu@.discussions.microsoft.com> wrote in message
news:BACB0B6C-FDA2-439A-BFA5-A5672AE7AE21@.microsoft.com...
> Hi,
> I am running SQL 2000 with an 8 GB database. I have two relatively large
> tables (each with about 2 million records in them), and I occasionally
> need
> to make changes to the table design (add a column, increase the size of an
> existing field, etc.) on these two tables through the Enterprise Manager.
> However, saving these changes can take betwen 5-10 minutes to complete.
> If I make changes to any of my other smaller tables, they are saved
> instantly. Is it really supposed to take this long for larger tables to
> be
> updated?
> Any suggestions would be greatly appreciated.

Enterprise manager taking up to 10 minutes to save design changes

Hi,
I am running SQL 2000 with an 8 GB database. I have two relatively large
tables (each with about 2 million records in them), and I occasionally need
to make changes to the table design (add a column, increase the size of an
existing field, etc.) on these two tables through the Enterprise Manager.
However, saving these changes can take betwen 5-10 minutes to complete.
If I make changes to any of my other smaller tables, they are saved
instantly. Is it really supposed to take this long for larger tables to be
updated?
Any suggestions would be greatly appreciated.Never make a change to a production db with EM. Most of the time it will
create a temp table, copy all the data over from the original, drop the
original and then rename the temp table to the original name. Most of the
time a simple ALTER TABLE is all you need to issue. If it is something
simple like increasing a varchar column it might just be a meta data change.
Andrew J. Kelly SQL MVP
"Stu" <Stu@.discussions.microsoft.com> wrote in message
news:BACB0B6C-FDA2-439A-BFA5-A5672AE7AE21@.microsoft.com...
> Hi,
> I am running SQL 2000 with an 8 GB database. I have two relatively large
> tables (each with about 2 million records in them), and I occasionally
> need
> to make changes to the table design (add a column, increase the size of an
> existing field, etc.) on these two tables through the Enterprise Manager.
> However, saving these changes can take betwen 5-10 minutes to complete.
> If I make changes to any of my other smaller tables, they are saved
> instantly. Is it really supposed to take this long for larger tables to
> be
> updated?
> Any suggestions would be greatly appreciated.sql

Friday, February 24, 2012

Enterprise Manager Cannot Display Table Records or Run Query

I have a new installation of SQL Server 2000 Dev Edition on a Win2K3 Standard Edition Server that I used for development. I just set this machine up in th last week and installed all Win2K3 patches and then installed SQL2K and SP3a. I have a single named instance. I just noticed today that I cannot view table data or use the Query part of EM. When I right click a table and select Open Table->Return All Rows it gives me an error dialog "An unexpected error happened during this operation". While the EM is diplaying this dialog the EM screen looks like Internet Explorer and says "Action Canceled - You might not have permission to view this directory or page using the credentials you supplied." I believe that this is a EM issue as I cannot view table content on other remote server. ANy ideas? Might this be an IE security patch disallowing some connectivity ?

--Frank

--
Message posted via http://www.sqlmonster.com"Frank Rizzo via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:08f32b66479d4ddcbe5ab7a876ff377d@.SQLMonster.c om...
>I have a new installation of SQL Server 2000 Dev Edition on a Win2K3
>Standard Edition Server that I used for development. I just set this
>machine up in th last week and installed all Win2K3 patches and then
>installed SQL2K and SP3a. I have a single named instance. I just noticed
>today that I cannot view table data or use the Query part of EM. When I
>right click a table and select Open Table->Return All Rows it gives me an
>error dialog "An unexpected error happened during this operation". While
>the EM is diplaying this dialog the EM screen looks like Internet Explorer
>and says "Action Canceled - You might not have permission to view this
>directory or page using the credentials you supplied." I believe that this
>is a EM issue as I cannot view table content on other remote server. ANy
>ideas? Might this be an IE security patch disallowing some connectivity ?
> --Frank
> --
> Message posted via http://www.sqlmonster.com

A number of people seem to have had similar issues - if you Google the
newsgroups, you'll see that the usual response is to reinstall either the
MSSQL client tools (including SP3a) and/or the latest MDAC version.
Unfortunately, it doesn't always seem to solve the problem.

Simon