Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Friday, March 30, 2012

Question(s) about memory management

I'm monitoring a SQL Server 2000 server running on W2k3 and I'm noticing tha
t
the procedure cache is shrinking at an alarming rate and the buffer cache is
growing. This is surprising to me as this is a proc intensive server and I
know SQL Server dynamically manages the memory. My question is there anyway
to change the amount of memory allocated to the proc cache? I went through
books online, but I only saw things relating to setting the min/max memory
amounts but nothing directly related to the type of management that I'm
wanting to do.this is not bad, your queries are well parameterized and also your SPs,so th
ousands of querys are using the same plan, the problem is when you have a l
arge proc cache and a litle data cache.
--
Mauro
MCTS - SQL Server 2005
"Big Ern" <BigErn@.discussions.microsoft.com> wrote in message news:584554A5-
708A-4F68-924C-94A169B44ED9@.microsoft.com...
I'm monitoring a SQL Server 2000 server running on W2k3 and I'm noticing tha
t
the procedure cache is shrinking at an alarming rate and the buffer cache is
growing. This is surprising to me as this is a proc intensive server and I
know SQL Server dynamically manages the memory. My question is there anyway
to change the amount of memory allocated to the proc cache? I went through
books online, but I only saw things relating to setting the min/max memory
amounts but nothing directly related to the type of management that I'm
wanting to do.

Question(s) about memory management

I'm monitoring a SQL Server 2000 server running on W2k3 and I'm noticing that
the procedure cache is shrinking at an alarming rate and the buffer cache is
growing. This is surprising to me as this is a proc intensive server and I
know SQL Server dynamically manages the memory. My question is there anyway
to change the amount of memory allocated to the proc cache? I went through
books online, but I only saw things relating to setting the min/max memory
amounts but nothing directly related to the type of management that I'm
wanting to do.This is a multi-part message in MIME format.
--=_NextPart_000_02CE_01C76B0A.1C9DB110
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
this is not bad, your queries are well parameterized and also your =SPs,so thousands of querys are using the same plan, the problem is when =you have a large proc cache and a litle data cache.
-- Mauro
MCTS - SQL Server 2005
"Big Ern" <BigErn@.discussions.microsoft.com> wrote in message =news:584554A5-708A-4F68-924C-94A169B44ED9@.microsoft.com...
I'm monitoring a SQL Server 2000 server running on W2k3 and I'm =noticing that the procedure cache is shrinking at an alarming rate and the buffer =cache is growing. This is surprising to me as this is a proc intensive server =and I know SQL Server dynamically manages the memory. My question is there =anyway to change the amount of memory allocated to the proc cache? I went =through books online, but I only saw things relating to setting the min/max =memory amounts but nothing directly related to the type of management that =I'm wanting to do.
--=_NextPart_000_02CE_01C76B0A.1C9DB110
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

this is not bad, your queries are well parameterized and also your SPs,so thousands of querys are using the =same plan, the problem is when you have a large proc cache and a litle data cache.
-- MauroMCTS - SQL Server 2005
"Big Ern" wrote in message news:584=554A5-708A-4F68-924C-94A169B44ED9@.microsoft.com...I'm monitoring a SQL Server 2000 server running on W2k3 and I'm noticing =that the procedure cache is shrinking at an alarming rate and the =buffer cache is growing. This is surprising to me as this is a proc intensive =server and I know SQL Server dynamically manages the memory. My question =is there anyway to change the amount of memory allocated to the proc cache? =I went through books online, but I only saw things relating to setting =the min/max memory amounts but nothing directly related to the type of = management that I'm wanting to do.

--=_NextPart_000_02CE_01C76B0A.1C9DB110--sql

Wednesday, March 28, 2012

Question regarding running a stored procedure as a job step

I am running a stored procedure as a job step and in the stored procedure I use return to pass one of several possible values when there is an error in processing (not an system error) so that the job step will fail. However, even when I return a non-zero value using return the job step completes as successful. What should I be doing so that the job step picks up the non-zero value and then indicates the step failed?

Try using a RAISERROR with a severity greater than 10.

-Sue

|||Thank you very much Sue

Monday, March 26, 2012

Question RE /PAE In Active-Active Cluster

I have a 2003 Enterprise Ed 2 node cluster with each node having 8 gig of
memory.
On each active node, I am running a single named instance of sql server 2000
enterprise wiath latest svc packs.
The boot ini on the servers is currently configured with the /PAE switch only.
Each SQL named instance is defined to manage memory dynmaciclly. There are
no plans to add addtl memory to the servers.
I need to account for defined memory within each node to accomodate a
failover of either node to the other and run the resepctive SQL Server
instances.
What impact does the /PAE switch have on this particular configuration and
would it be better instead to use the /3GB switch? I believe that would
provide 3 gigs of memory to each sql server if running on the same node with
1 gig left for the O/S.
Would the /PAE switch not be necessary then?
thanks
Tom
/3GB, /PAE, and /AWE plus sp_configing your memory in SQL are great ideas,
but they all have to be monitored and test with your application, hardware,
and exact configuration. Have you called the hardware vendor to find out
what they suggest from a hardware stand point?
I am sure a true SQL DBA/MVP like Geoff will follow with a detailed SQL
explanation of the switches above for you
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://msmvps.com/clustering - Blog
http://www.clusterhelp.com - Cluster Training
"Tom Frost" <TomFrost@.discussions.microsoft.com> wrote in message
news:269FF0A2-3F04-4767-8D67-15C9DC20AA95@.microsoft.com...
>I have a 2003 Enterprise Ed 2 node cluster with each node having 8 gig of
> memory.
> On each active node, I am running a single named instance of sql server
> 2000
> enterprise wiath latest svc packs.
> The boot ini on the servers is currently configured with the /PAE switch
> only.
> Each SQL named instance is defined to manage memory dynmaciclly. There are
> no plans to add addtl memory to the servers.
> I need to account for defined memory within each node to accomodate a
> failover of either node to the other and run the resepctive SQL Server
> instances.
> What impact does the /PAE switch have on this particular configuration and
> would it be better instead to use the /3GB switch? I believe that would
> provide 3 gigs of memory to each sql server if running on the same node
> with
> 1 gig left for the O/S.
> Would the /PAE switch not be necessary then?
> thanks
> Tom
>
|||Right now, your SQL Instances get about 1.6GB of physical RAM each. They
should increase memory usage until they get to that level then stay there
long term.
/PAE lets the Operating System see all the physical memory in the servers.
It is necessary anytime a 32-bit OS has more than 4 GB of physical RAM.
I might enable AWE memory in SQL. If you do, you must set a maximum memory
value for SQL on a multi-instance cluster. Two SQL behaviors combine to
make this a necessity. First, AWE kills dynamic memory allocation. Memory
is allocated at service startup and never shrinks. Second, the maximum
memory value is set to the actual physical memory amount. SQL grabs
everything. You will need to set the actual memory values on both instances
so they can "stack" on the same server without overcommitting memory. Be
sure and leave some for the OS. I would recommend 3GB or so, but you can
watch the Memory | Available MBytes counter to check.
As for the /3GB switch, you could go that route. You won't replace the /PAE
switch, you will add this switch to the boot.ini startup options.
One option I have used in this situation was to set up the two instances
with asymmetrical memory allocation. If you know one server is under higher
load, you can allocate more memory to that instance. I ran a similar system
to yours with 4GB on one instance, 2GB on the other instance, and 2GB left
for the OS. The perfmon counter SQLServer:Buffer manager | Page Life
Expectancy will let you know relative memory pressure. Be sure to use a
fairly long observation time with the server under normal workload to
determine true memory pressure.
Any way you go, you will need to manually set memory levels and monitor to
see of you have overcommitted memory. However, SQL loves memory so you may
see some performance gains. Use the Page Life Expectancy counter to see the
difference before and after.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Tom Frost" <TomFrost@.discussions.microsoft.com> wrote in message
news:269FF0A2-3F04-4767-8D67-15C9DC20AA95@.microsoft.com...
>I have a 2003 Enterprise Ed 2 node cluster with each node having 8 gig of
> memory.
> On each active node, I am running a single named instance of sql server
> 2000
> enterprise wiath latest svc packs.
> The boot ini on the servers is currently configured with the /PAE switch
> only.
> Each SQL named instance is defined to manage memory dynmaciclly. There are
> no plans to add addtl memory to the servers.
> I need to account for defined memory within each node to accomodate a
> failover of either node to the other and run the resepctive SQL Server
> instances.
> What impact does the /PAE switch have on this particular configuration and
> would it be better instead to use the /3GB switch? I believe that would
> provide 3 gigs of memory to each sql server if running on the same node
> with
> 1 gig left for the O/S.
> Would the /PAE switch not be necessary then?
> thanks
> Tom
>
|||The /3GB switch simply restricts the OS to 1GB of RAM, which allows
applications to address up to 3GB of RAM. The /PAE switch simply loads a
different NT kernel which contains the code to address RAM > 4GB.
The AWE setting in SQL Server works with the /PAE switch. If you enable
AWE, but don't turn on the /PAE switch, then you can not address the
extended memory space. So, in order to allow AWE to utilize the RAM above
4GB, you need to turn on the /PAE switch as well.
In terms of running multiple instances on a single machine, you need to
balance the RAM. (If your business requirements will allow performance
degradation in the event of a failover, then you don't necessarily need to
do this.) You control the maximum amount of RAM that SQL Server will
address by setting the max server memory config option.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Tom Frost" <TomFrost@.discussions.microsoft.com> wrote in message
news:269FF0A2-3F04-4767-8D67-15C9DC20AA95@.microsoft.com...
>I have a 2003 Enterprise Ed 2 node cluster with each node having 8 gig of
> memory.
> On each active node, I am running a single named instance of sql server
> 2000
> enterprise wiath latest svc packs.
> The boot ini on the servers is currently configured with the /PAE switch
> only.
> Each SQL named instance is defined to manage memory dynmaciclly. There are
> no plans to add addtl memory to the servers.
> I need to account for defined memory within each node to accomodate a
> failover of either node to the other and run the resepctive SQL Server
> instances.
> What impact does the /PAE switch have on this particular configuration and
> would it be better instead to use the /3GB switch? I believe that would
> provide 3 gigs of memory to each sql server if running on the same node
> with
> 1 gig left for the O/S.
> Would the /PAE switch not be necessary then?
> thanks
> Tom
>
sql

question on warnings recieved after running sp_repladdcolumn and sp_repldropcolumn

copy/past of sample error:
Warning: only Subscribers running SQL Server 2000 can synchronize with
publication 'mytestdb' because schema replication is performed.
Warning: The table 'GeneralInventory' has been created but its maximum row
size (9929) exceeds the maximum number of bytes per row (8060). INSERT or
UPDATE of a row in this table will fail if the resulting row length exceeds
8060 bytes.
Warning: The table 'conflict_mytestdb_GeneralInventory' has been created but
its maximum row size (11924) exceeds the maximum number of bytes per row
(8060). INSERT or UPDATE of a row in this table will fail if the resulting
row length exceeds 8060 bytes.
this was after a sp_repldropcolumn? and I recieved similar messages after
performing an sp_repladdcolumn? What are they talking about? what problems
could this cause? what do I need to do?
any info is appreciated... thanks.
ignore these warnings. The first one is the only meaningful one.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"djc" <noone@.nowhere.com> wrote in message
news:%23$oVUw3XEHA.2448@.TK2MSFTNGP09.phx.gbl...
> copy/past of sample error:
> --
> Warning: only Subscribers running SQL Server 2000 can synchronize with
> publication 'mytestdb' because schema replication is performed.
> Warning: The table 'GeneralInventory' has been created but its maximum row
> size (9929) exceeds the maximum number of bytes per row (8060). INSERT or
> UPDATE of a row in this table will fail if the resulting row length
exceeds
> 8060 bytes.
> Warning: The table 'conflict_mytestdb_GeneralInventory' has been created
but
> its maximum row size (11924) exceeds the maximum number of bytes per row
> (8060). INSERT or UPDATE of a row in this table will fail if the resulting
> row length exceeds 8060 bytes.
> --
> this was after a sp_repldropcolumn? and I recieved similar messages after
> performing an sp_repladdcolumn? What are they talking about? what problems
> could this cause? what do I need to do?
> any info is appreciated... thanks.
>
|||This is a general SQL Server warning and isn't particular to replication eg
you can 2 varchar (8000) cols as you want to a table and the second time
there'll be this warning (if you do it in QA), as potentially you might
exceed the 8060ish max row size.
Regards,
Paul Ibison
|||good. Thank you!
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:Op8xu83XEHA.3664@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> ignore these warnings. The first one is the only meaningful one.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "djc" <noone@.nowhere.com> wrote in message
> news:%23$oVUw3XEHA.2448@.TK2MSFTNGP09.phx.gbl...
row[vbcol=seagreen]
or[vbcol=seagreen]
> exceeds
> but
resulting[vbcol=seagreen]
after[vbcol=seagreen]
problems
>
|||thanks Paul.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:evHKNn4XEHA.3016@.tk2msftngp13.phx.gbl...
> This is a general SQL Server warning and isn't particular to replication
eg
> you can 2 varchar (8000) cols as you want to a table and the second time
> there'll be this warning (if you do it in QA), as potentially you might
> exceed the 8060ish max row size.
> Regards,
> Paul Ibison
>
sql

Friday, March 23, 2012

Question on Transaction Log Backups

New to Sql Server, running SQL Server 2000.

Our transaction log file backups occasionally fail as the size of the
transaction log gets really huge. We'd like to schedule additional
transaction log backups. Does that require an exclusive on the database
or can the db be used during a transaction log backup?

Also, does switching to a bulk mode recovery model before a bulk
operation then switching back to full recovery mode after present any
issues?

Thanks in advance.DataPro wrote:
> New to Sql Server, running SQL Server 2000.
> Our transaction log file backups occasionally fail as the size of the
> transaction log gets really huge. We'd like to schedule additional
> transaction log backups. Does that require an exclusive on the database
> or can the db be used during a transaction log backup?
> Also, does switching to a bulk mode recovery model before a bulk
> operation then switching back to full recovery mode after present any
> issues?

It doesn't make sense to switch back and forth. You can permanently
switch to bulk logged because different logging for bulk operations is
all this recovery model is about.

See Microsoft's documentation for more details:

http://technet2.microsoft.com/Windo...3.mspx?mfr=true

Kind regards

robert|||DataPro (datapro01@.yahoo.com) writes:
> Our transaction log file backups occasionally fail as the size of the
> transaction log gets really huge. We'd like to schedule additional
> transaction log backups. Does that require an exclusive on the database
> or can the db be used during a transaction log backup?

Translog backups can be taken without conflict for other users. Else
it would be a quite meaningless operations. Some sites back up their
transaction log every 15 minutes or so.

> Also, does switching to a bulk mode recovery model before a bulk
> operation then switching back to full recovery mode after present any
> issues?

In difference to Robert, I think this makes sense. I believe we do this
in the maintenance procedure that we ship with our product. We switch
to bulk-logged before starting reindexing of tables, and then switch
back to full when it's done.

--
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|||Erland Sommarskog wrote:
>> Also, does switching to a bulk mode recovery model before a bulk
>> operation then switching back to full recovery mode after present any
>> issues?
> In difference to Robert, I think this makes sense. I believe we do this
> in the maintenance procedure that we ship with our product. We switch
> to bulk-logged before starting reindexing of tables, and then switch
> back to full when it's done.

Hm, I can see that it makes sense if you do this for *some* bulk
operations only. My understanding of the question was whether it makes
sense to do it always for bulk operations. And in that case I don't
think it does: if I switch from "full" to "bulk logged" before any bulk
op and switch back afterwards I get the same behavior as if "bulk
logged" was used all the time.

Kind regards

robert|||Many thanks for the thoughts. Being brand new to SQL Server (coming
over from DB2) have much to read and learn.

Here is my situation. An application upgrade occurred over the weekend
which made several database changes. Now the active log is at 12 Gigs.
Taking a full database backup and a log backup is not truncating the
log. Issuing a backup log truncate only has no effect.

I ussed a dbcc loginfo against the database and it returned 308 rows. I
am assuming that these 'virtual logs' represent active non-committed
transactions.

Is that right?

We are talking to the application vendor asking him why this occured.
In the meantime,,,,

Any thoughts on how I can reduce the size of this log? From what I've
read about shrinkfile it doesn't appear to be relevant here.

Any thoughts or suggestions would be appreciated.|||DataPro (datapro01@.yahoo.com) writes:
> Here is my situation. An application upgrade occurred over the weekend
> which made several database changes. Now the active log is at 12 Gigs.
> Taking a full database backup and a log backup is not truncating the
> log. Issuing a backup log truncate only has no effect.

It has, but that will not shrink the log file. (Unless autoshrink is in
effect, but you don't want that.) Only give you a lot of free space in
the file.

Note that TRUNCATE_ONLY invalidates the transaction log, so you need to
take a full backup after this operation.

> Any thoughts on how I can reduce the size of this log? From what I've
> read about shrinkfile it doesn't appear to be relevant here.

DBCC SHRINKFILE is indeed your guy. Be sure to set a target size when
you run it, so you don't make the log too small. In that case, it will
have to grow again, and that will only take performance from the system.
And the file may become fragmented on disk.

For things like an application upgrade, the best strategy may be to set
the recovery mode to simple, and set back to full recovery when it the
upgrade is done. Again, you need to take a full backup in this situation.

--
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|||Here is what the vendor is recommending:

1. Back up db and log via Windows Explorer or normal db backups
2. Stop services (application...EAS)
3. Disconnect/detach database
4. Delete log via Windows Explorer
5. Reconnect/reattach database....log will dynamically be allocated

Does this make sense?
They also want autoshrink turned on but its my understanding some SQL
DBA's don't want that. Your thoughts?

Thanks in advance.|||Well SQL Server definetely seems to be a different animal.

Here are some questions a newguy like myself would have about the
logging.

The documentation says that once a backup log truncate only is done, a
full backup should be taken as the recovery ability of the system has
been degraded. Why is that, if that command merely archives committed
transactions?

A SELECT @.@.TRANCOUNT yields a count of zero.
dbcc opentran(eas) says zero also.
dbcc loginfo yeilds 308 rows marked with a '2' which apparently implies
that they are open transactions. Why don't they show up in trancount
then?

If a log backup supposedly makes the log 'reusable' then why would a 12
gig log grow another Gig right within a few hours of the backup with
minimal database use?
Wouldn't most of that space be reusable.

Please straighten me out on my thinking :)

Thanks|||We shrink the transaction log every two hours without any noticeable
performance hit, but our total database size is less than 500 MB. I
have played with the simple logging one time and had problems with it,
so we have been sticking with our two hour shrink process (added to our
two hour backup process) which works fine for now.

DBCC SHRINKFILE(DBName_log, 1)
BACKUP LOG DBName WITH TRUNCATE_ONLY
DBCC SHRINKFILE(DBName_log, 1)
go|||pb648174 (google@.webpaul.net) writes:
> We shrink the transaction log every two hours without any noticeable
> performance hit, but our total database size is less than 500 MB. I
> have played with the simple logging one time and had problems with it,
> so we have been sticking with our two hour shrink process (added to our
> two hour backup process) which works fine for now.
> DBCC SHRINKFILE(DBName_log, 1)
> BACKUP LOG DBName WITH TRUNCATE_ONLY
> DBCC SHRINKFILE(DBName_log, 1)

This appears completely pointless to me. If you have full recovery,
you are losing all the benefits by truncating the transaction log
every two hours. If you have simple recovery, there should not be
any need to shrink the file, unless there has been any extraordinary
actions going on.

--
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|||DataPro (datapro01@.yahoo.com) writes:
> Here is what the vendor is recommending:
> 1. Back up db and log via Windows Explorer or normal db backups
> 2. Stop services (application...EAS)
> 3. Disconnect/detach database
> 4. Delete log via Windows Explorer
> 5. Reconnect/reattach database....log will dynamically be allocated
> Does this make sense?

No! Never delete a log file, unless you are told so by a Microsoft
support professional. There are so many people who have lost their
database, because they deleted the log. I guess it's safe if you
detach first, but I would like to take a gamble with a production
database.

> They also want autoshrink turned on but its my understanding some SQL
> DBA's don't want that. Your thoughts?

Shrinking a database file only make sense if there has been some
exceptional activity. Running a schema upgrade certainly counts as one.
But doing it as a matter of routine, or with autoshrink, only serves
to degrade the performance of the application in three different
ways:

1) The shrinking takes resources.
2) The autogrow takes resources.
3) The log file becomes fragmented on disk.

Autogrow is a mixed blessing. Up to SQL Server 6.5 there was no autogrow,
which meant that if the data or log segment was filled up, it was a
hard stop. Autogrow that was added in SQL 7 avoids these situations,
as long as the disk has space. However, for the DBA there is not
really any difference: he should should still monitor database size
amd increase the size in due time. A 10% autogrow in a 200 GB database
is very painfully noticeable fot the users.

--
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|||DataPro (datapro01@.yahoo.com) writes:
> Well SQL Server definetely seems to be a different animal.
> Here are some questions a newguy like myself would have about the
> logging.
> The documentation says that once a backup log truncate only is done, a
> full backup should be taken as the recovery ability of the system has
> been degraded. Why is that, if that command merely archives committed
> transactions?

Up-to-the point recovery. You take a full backup at midnight, then
you backup the transaction log once an hour. at 10:23 you run an
UPDATE statement, but forget the WHERE clause. At this point you
can back up the transaction log.

You can the restore the full backup and reapply the transaction log
dumps but stop at 10:22, so you can recover the lost data. If you
somewhere along the line has backed up the transaction log with
NO_LOG or TRUNCATE_ONLY, the log chain is broken, and it's not
possible to continue to apply logs.

> A SELECT @.@.TRANCOUNT yields a count of zero.
> dbcc opentran(eas) says zero also.
> dbcc loginfo yeilds 308 rows marked with a '2' which apparently implies
> that they are open transactions. Why don't they show up in trancount
> then?
> If a log backup supposedly makes the log 'reusable' then why would a 12
> gig log grow another Gig right within a few hours of the backup with
> minimal database use?
> Wouldn't most of that space be reusable.

I'm not really sure what you are talking about here. If the log file
grew, apparently there was some action going on in the database.

--
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|||Thanks for your replies.
In regards to:

"> A SELECT @.@.TRANCOUNT yields a count of zero.
> dbcc opentran(eas) says zero also.
> dbcc loginfo yeilds 308 rows marked with a '2' which apparently implies
> that they are open transactions. Why don't they show up in trancount
> then?

> If a log backup supposedly makes the log 'reusable' then why would a 12
> gig log grow another Gig right within a few hours of the backup with
> minimal database use?
> Wouldn't most of that space be reusable.

I'm not really sure what you are talking about here. If the log file
grew, apparently there was some action going on in the database. "

1.) What I'm not clear on is this...a dbcc loginfo yeilds 308 rows
marked with a 2.
Are those 'active' uncommitted transactions? What do those rows
represent?

2.) If backing up a log makes the space within a log file 'reusable'
why did the log grow in size if the space in the log was made reusable?
Wouldn't the minimal activity I referenced use that reclaimed space
within the log instead of making it bigger?

3) And finally what is the relationship between the results of a dbcc
loginfo command, a dbcc opentran and a A SELECT @.@.TRANCOUNT|||DataPro (datapro01@.yahoo.com) writes:
> 1.) What I'm not clear on is this...a dbcc loginfo yeilds 308 rows
> marked with a 2.
> Are those 'active' uncommitted transactions? What do those rows
> represent?

DBCC LOGINFO is not documented, but I learn a little from SQL Server
MVP Tibor Karasiz's article on shrinking:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp. (I recommend
that you read this article in whole, although I summarise some details
below.)

Each row represents a VLF, a virtual log file, and 2 indicates that
that VLF is in use. You cannot shrink the log past the last active
VLF. And if all VLF's have a 2, then all VLFs are in use, and obviously
nothing can be shrunk.

You should backup the transaction log, either to disk or just toss it
with TRUNCATE_ONLY.

> 2.) If backing up a log makes the space within a log file 'reusable'
> why did the log grow in size if the space in the log was made reusable?

As I discussed above, the log is apparently not reusable.

> 3) And finally what is the relationship between the results of a dbcc
> loginfo command, a dbcc opentran and a A SELECT @.@.TRANCOUNT

@.@.trancount only reflects the state of the current process.

DBCC OPENTRAN reveals if there are any open transactions. The log
cannot be truncated past the oldest active transaction.

--
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|||Thanks much|||This has been a really usefull thread. I have the same problem, and
debated about starting new thread or continue this one:
DBCC LOGINFO shows my last log entry is in use (as indicated by STATUS
of 2)
DBCC OPENTRAN indicates no active open transactions
My file is 89% empty, Ive backed up the log files repeatedly (first one
was large 40+ GB, now they are < 500K)
I've tried taking the DB offline and back online. The last log entry
still shows in use and I cant shrink.
I read the article, which helps identify why I cant shrink (log file in
use) but now I'm stumped.
TIA
Rob|||rcamarda (robc390@.hotmail.com) writes:
> This has been a really usefull thread. I have the same problem, and
> debated about starting new thread or continue this one:
> DBCC LOGINFO shows my last log entry is in use (as indicated by STATUS
> of 2)
> DBCC OPENTRAN indicates no active open transactions
> My file is 89% empty, Ive backed up the log files repeatedly (first one
> was large 40+ GB, now they are < 500K)
> I've tried taking the DB offline and back online. The last log entry
> still shows in use and I cant shrink.
> I read the article, which helps identify why I cant shrink (log file in
> use) but now I'm stumped.

Is the last VLF the only that has status = 2? Or are there several?

Did you try running BACKUP TRANSACTION WITH NO_LOG? (Since you lose the
log chain, you need a full backup as well.)

--
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.mspxsql

Wednesday, March 21, 2012

Question on SQL Profiler

I am running a trace on a set of queries. What I am noticing is that the
duration for all the individual SQL statment within the batch is minimal but
yet the total duration for the same batch completed is a lot more than if I
added the duration for individul SQL statements. So my question is where is
the remaining time coming from? How do I speed that up if I do not know what
is causing the batch to take longer time?
Thanks
Try checking out how the sql queries are being executed on the client side if possible. Usually, there are other things involved like recompilations and/or sql prepare operations and/or cursor fetch(es). ODBC calls usually do this and run sp_cursoropen, s
p_prepare, sp_cursorfetch, ..., etc... Try looking at RPC's and SQL's on the profiler... =)

Question on SQL

Good Day,
I have a simple question on SQL 2000. Please note that I am no expert and
this is a basic question.
We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have a remote
site that connects to this server via a T1 line using a program that we
created called popss.
What happens is that the program takes a long time getting the data from the
server and we know that it's a bandwidth issue. What I would like to know
is there a way to install a toned down version of SQL something like desktop
on another Windows 2003 server or do we need the another full version of SQL
at that location so that the program can read from the local instance
instead of going over the pipe.
I am looking for a way to sync up the two SQL databases say at night this
way there we be no traffic over the pipe during the day.
Thank You
Adam RaffYou could use Transactional Replication and set its schedule as running once
at night. SQL Server Express Edition can be used as a Subscriber in a
Replication topology and it's free. However, Express Edition has its
limitations. (4GB db, 1 CPU, 1GB RAM)
http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
You would make your current SQL Server as Publisher \ Distributor (consider
workload on your current server) and the other one would be the Subscriber.
So, your new SQL Server would be updated daily and your app would query your
local SQL Server directly.
Try this in a test environment first. If your system and app works without
any problem then you could apply it to your production system.
--
Ekrem Önsoy
"Adam Raff" <araff@.newsgroup.nospam> wrote in message
news:OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl...
> Good Day,
> I have a simple question on SQL 2000. Please note that I am no expert and
> this is a basic question.
> We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have a
> remote site that connects to this server via a T1 line using a program
> that we created called popss.
> What happens is that the program takes a long time getting the data from
> the server and we know that it's a bandwidth issue. What I would like to
> know is there a way to install a toned down version of SQL something like
> desktop on another Windows 2003 server or do we need the another full
> version of SQL at that location so that the program can read from the
> local instance instead of going over the pipe.
> I am looking for a way to sync up the two SQL databases say at night this
> way there we be no traffic over the pipe during the day.
> Thank You
> Adam Raff
>|||Ekrem,
Thanks for your help. The size of the database is small about 500MB so that
is not an issue. My only other question on this is Does this go both ways.
Meaning when they copy to the SQL Express will it update the SQL server
later during the Replication time since the Express is setup as Subscriber?
Thanks again for your help
Adam Raff
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com...
> You could use Transactional Replication and set its schedule as running
> once at night. SQL Server Express Edition can be used as a Subscriber in a
> Replication topology and it's free. However, Express Edition has its
> limitations. (4GB db, 1 CPU, 1GB RAM)
> http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
> You would make your current SQL Server as Publisher \ Distributor
> (consider workload on your current server) and the other one would be the
> Subscriber. So, your new SQL Server would be updated daily and your app
> would query your local SQL Server directly.
> Try this in a test environment first. If your system and app works without
> any problem then you could apply it to your production system.
> --
> Ekrem Önsoy
>
> "Adam Raff" <araff@.newsgroup.nospam> wrote in message
> news:OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl...
>> Good Day,
>> I have a simple question on SQL 2000. Please note that I am no expert
>> and this is a basic question.
>> We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have a
>> remote site that connects to this server via a T1 line using a program
>> that we created called popss.
>> What happens is that the program takes a long time getting the data from
>> the server and we know that it's a bandwidth issue. What I would like to
>> know is there a way to install a toned down version of SQL something like
>> desktop on another Windows 2003 server or do we need the another full
>> version of SQL at that location so that the program can read from the
>> local instance instead of going over the pipe.
>> I am looking for a way to sync up the two SQL databases say at night this
>> way there we be no traffic over the pipe during the day.
>> Thank You
>> Adam Raff
>|||Dear Adam,
Thank you for posting here.
I would like to explain that the SQL Server 2000 does not support the
updatable Subscriptions for Transactional Replication and the SQL Server
2005 Express 2005 Edition can only be configured as the Subscriber. So, the
replication is done in only one way and the data written in the SQL Express
will not be transferred to the main SQL Server.
If your application "Popss" only reads the data from SQL Server, we can
choose to use Transactional Replication. If not, we can try the Merge
Replication so that the changes can be synchronized to the publisher.
For your reference, I have included some relevant articles below:
How Merge Replication Works
http://technet.microsoft.com/en-us/library/ms151329.aspx
How Transactional Replication Works
http://technet.microsoft.com/en-us/library/ms151706.aspx
If anything is unclear in my reply, please don't hesitate to let me know
and I will be glad to help.
Have a nice day!
Best regards,
Adams Qu, MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "Adam Raff" <araff@.newsgroup.nospam>
| References: <OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl>
<11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com>
| Subject: Re: Question on SQL
| Date: Wed, 12 Sep 2007 16:40:10 -0400
| Lines: 62
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
| X-RFC2646: Format=Flowed; Response
| Message-ID: <OyQZd0X9HHA.1212@.TK2MSFTNGP05.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: 208-39-138-189.isp.comcastbusiness.net 208.39.138.189
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:25271
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Ekrem,
|
| Thanks for your help. The size of the database is small about 500MB so
that
| is not an issue. My only other question on this is Does this go both
ways.
|
| Meaning when they copy to the SQL Express will it update the SQL server
| later during the Replication time since the Express is setup as
Subscriber?
|
| Thanks again for your help
| Adam Raff
|
|
|
| "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
| news:11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com...
| > You could use Transactional Replication and set its schedule as running
| > once at night. SQL Server Express Edition can be used as a Subscriber
in a
| > Replication topology and it's free. However, Express Edition has its
| > limitations. (4GB db, 1 CPU, 1GB RAM)
| >
| > http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
| >
| > You would make your current SQL Server as Publisher \ Distributor
| > (consider workload on your current server) and the other one would be
the
| > Subscriber. So, your new SQL Server would be updated daily and your app
| > would query your local SQL Server directly.
| >
| > Try this in a test environment first. If your system and app works
without
| > any problem then you could apply it to your production system.
| >
| > --
| > Ekrem Önsoy
| >
| >
| >
| > "Adam Raff" <araff@.newsgroup.nospam> wrote in message
| > news:OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl...
| >> Good Day,
| >>
| >> I have a simple question on SQL 2000. Please note that I am no expert
| >> and this is a basic question.
| >>
| >> We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have a
| >> remote site that connects to this server via a T1 line using a program
| >> that we created called popss.
| >>
| >> What happens is that the program takes a long time getting the data
from
| >> the server and we know that it's a bandwidth issue. What I would like
to
| >> know is there a way to install a toned down version of SQL something
like
| >> desktop on another Windows 2003 server or do we need the another full
| >> version of SQL at that location so that the program can read from the
| >> local instance instead of going over the pipe.
| >>
| >> I am looking for a way to sync up the two SQL databases say at night
this
| >> way there we be no traffic over the pipe during the day.
| >>
| >> Thank You
| >> Adam Raff
| >>
| >
|
|
||||Hi Adams,
If we upgrade to SQL 2005 lets say or the newer version of SQL 2007 will
this then work then?
Is the Express version limited in that it can never sync up with the full
version of SQL?
Thanks
Adam Raff
"Adams Qu [MSFT]" <v-adamqu@.online.microsoft.com> wrote in message
news:WwE9G5d9HHA.5532@.TK2MSFTNGHUB02.phx.gbl...
> Dear Adam,
> Thank you for posting here.
> I would like to explain that the SQL Server 2000 does not support the
> updatable Subscriptions for Transactional Replication and the SQL Server
> 2005 Express 2005 Edition can only be configured as the Subscriber. So,
> the
> replication is done in only one way and the data written in the SQL
> Express
> will not be transferred to the main SQL Server.
> If your application "Popss" only reads the data from SQL Server, we can
> choose to use Transactional Replication. If not, we can try the Merge
> Replication so that the changes can be synchronized to the publisher.
> For your reference, I have included some relevant articles below:
> How Merge Replication Works
> http://technet.microsoft.com/en-us/library/ms151329.aspx
> How Transactional Replication Works
> http://technet.microsoft.com/en-us/library/ms151706.aspx
> If anything is unclear in my reply, please don't hesitate to let me know
> and I will be glad to help.
> Have a nice day!
> Best regards,
> Adams Qu, MCSE, MCDBA, MCTS
> Microsoft Online Support
> Microsoft Global Technical Support Center
> Get Secure! - www.microsoft.com/security
> =====================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> --
> | From: "Adam Raff" <araff@.newsgroup.nospam>
> | References: <OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl>
> <11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com>
> | Subject: Re: Question on SQL
> | Date: Wed, 12 Sep 2007 16:40:10 -0400
> | Lines: 62
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
> | X-RFC2646: Format=Flowed; Response
> | Message-ID: <OyQZd0X9HHA.1212@.TK2MSFTNGP05.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.server
> | NNTP-Posting-Host: 208-39-138-189.isp.comcastbusiness.net 208.39.138.189
> | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
> | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:25271
> | X-Tomcat-NG: microsoft.public.sqlserver.server
> |
> | Ekrem,
> |
> | Thanks for your help. The size of the database is small about 500MB so
> that
> | is not an issue. My only other question on this is Does this go both
> ways.
> |
> | Meaning when they copy to the SQL Express will it update the SQL server
> | later during the Replication time since the Express is setup as
> Subscriber?
> |
> | Thanks again for your help
> | Adam Raff
> |
> |
> |
> | "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
> | news:11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com...
> | > You could use Transactional Replication and set its schedule as
> running
> | > once at night. SQL Server Express Edition can be used as a Subscriber
> in a
> | > Replication topology and it's free. However, Express Edition has its
> | > limitations. (4GB db, 1 CPU, 1GB RAM)
> | >
> | > http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
> | >
> | > You would make your current SQL Server as Publisher \ Distributor
> | > (consider workload on your current server) and the other one would be
> the
> | > Subscriber. So, your new SQL Server would be updated daily and your
> app
> | > would query your local SQL Server directly.
> | >
> | > Try this in a test environment first. If your system and app works
> without
> | > any problem then you could apply it to your production system.
> | >
> | > --
> | > Ekrem Önsoy
> | >
> | >
> | >
> | > "Adam Raff" <araff@.newsgroup.nospam> wrote in message
> | > news:OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl...
> | >> Good Day,
> | >>
> | >> I have a simple question on SQL 2000. Please note that I am no
> expert
> | >> and this is a basic question.
> | >>
> | >> We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have a
> | >> remote site that connects to this server via a T1 line using a
> program
> | >> that we created called popss.
> | >>
> | >> What happens is that the program takes a long time getting the data
> from
> | >> the server and we know that it's a bandwidth issue. What I would
> like
> to
> | >> know is there a way to install a toned down version of SQL something
> like
> | >> desktop on another Windows 2003 server or do we need the another full
> | >> version of SQL at that location so that the program can read from the
> | >> local instance instead of going over the pipe.
> | >>
> | >> I am looking for a way to sync up the two SQL databases say at night
> this
> | >> way there we be no traffic over the pipe during the day.
> | >>
> | >> Thank You
> | >> Adam Raff
> | >>
> | >
> |
> |
> |
>|||Correction: There is no version 2007 of SQL Server. SQL Server 2008 is the
one that's going to be successor of SQL Server 2005.
If you want to transfer changes that you make in your second SQL Server to
be applied to your first SQL Server, then use Merge Replication. As you can
not use SQL Server Express Edition in a Updatable Subscriptions for
Transactional Replication topology, you may want to go with Merge
Replication. You'd be able to use Express Edition in a Transactional
Replication if you wanted to use your second SQL Server only for reporting
server purposes which means you would not want to transfer the updated
records from your second SQL Server to the First one.
Express Edition's limitation is just to be Subscriber in a Replication
Topology in this topic. It can not be a Publisher nor Distributor. But it
can be a Subscriber and for you situation can be used in a Merge Replication
topology.
Just give it a try Merge Replication on your test machine and see how it
works.
If you'd like to learn more about Transactional and Merge Replications, I
encourage you you to visit the links that Adams already mentioned.
>> How Merge Replication Works
>> http://technet.microsoft.com/en-us/library/ms151329.aspx
>> How Transactional Replication Works
>> http://technet.microsoft.com/en-us/library/ms151706.aspx
Ekrem Önsoy
"Adam Raff" <araff@.newsgroup.nospam> wrote in message
news:eVK6zng9HHA.1212@.TK2MSFTNGP05.phx.gbl...
> Hi Adams,
> If we upgrade to SQL 2005 lets say or the newer version of SQL 2007 will
> this then work then?
> Is the Express version limited in that it can never sync up with the full
> version of SQL?
> Thanks
> Adam Raff
>
> "Adams Qu [MSFT]" <v-adamqu@.online.microsoft.com> wrote in message
> news:WwE9G5d9HHA.5532@.TK2MSFTNGHUB02.phx.gbl...
>> Dear Adam,
>> Thank you for posting here.
>> I would like to explain that the SQL Server 2000 does not support the
>> updatable Subscriptions for Transactional Replication and the SQL Server
>> 2005 Express 2005 Edition can only be configured as the Subscriber. So,
>> the
>> replication is done in only one way and the data written in the SQL
>> Express
>> will not be transferred to the main SQL Server.
>> If your application "Popss" only reads the data from SQL Server, we can
>> choose to use Transactional Replication. If not, we can try the Merge
>> Replication so that the changes can be synchronized to the publisher.
>> For your reference, I have included some relevant articles below:
>> How Merge Replication Works
>> http://technet.microsoft.com/en-us/library/ms151329.aspx
>> How Transactional Replication Works
>> http://technet.microsoft.com/en-us/library/ms151706.aspx
>> If anything is unclear in my reply, please don't hesitate to let me know
>> and I will be glad to help.
>> Have a nice day!
>> Best regards,
>> Adams Qu, MCSE, MCDBA, MCTS
>> Microsoft Online Support
>> Microsoft Global Technical Support Center
>> Get Secure! - www.microsoft.com/security
>> =====================================================>> When responding to posts, please "Reply to Group" via your newsreader so
>> that others may learn and benefit from your issue.
>> =====================================================>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> --
>> | From: "Adam Raff" <araff@.newsgroup.nospam>
>> | References: <OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl>
>> <11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com>
>> | Subject: Re: Question on SQL
>> | Date: Wed, 12 Sep 2007 16:40:10 -0400
>> | Lines: 62
>> | X-Priority: 3
>> | X-MSMail-Priority: Normal
>> | X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
>> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
>> | X-RFC2646: Format=Flowed; Response
>> | Message-ID: <OyQZd0X9HHA.1212@.TK2MSFTNGP05.phx.gbl>
>> | Newsgroups: microsoft.public.sqlserver.server
>> | NNTP-Posting-Host: 208-39-138-189.isp.comcastbusiness.net
>> 208.39.138.189
>> | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
>> | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:25271
>> | X-Tomcat-NG: microsoft.public.sqlserver.server
>> |
>> | Ekrem,
>> |
>> | Thanks for your help. The size of the database is small about 500MB so
>> that
>> | is not an issue. My only other question on this is Does this go both
>> ways.
>> |
>> | Meaning when they copy to the SQL Express will it update the SQL server
>> | later during the Replication time since the Express is setup as
>> Subscriber?
>> |
>> | Thanks again for your help
>> | Adam Raff
>> |
>> |
>> |
>> | "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> | news:11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com...
>> | > You could use Transactional Replication and set its schedule as
>> running
>> | > once at night. SQL Server Express Edition can be used as a Subscriber
>> in a
>> | > Replication topology and it's free. However, Express Edition has its
>> | > limitations. (4GB db, 1 CPU, 1GB RAM)
>> | >
>> | > http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
>> | >
>> | > You would make your current SQL Server as Publisher \ Distributor
>> | > (consider workload on your current server) and the other one would be
>> the
>> | > Subscriber. So, your new SQL Server would be updated daily and your
>> app
>> | > would query your local SQL Server directly.
>> | >
>> | > Try this in a test environment first. If your system and app works
>> without
>> | > any problem then you could apply it to your production system.
>> | >
>> | > --
>> | > Ekrem Önsoy
>> | >
>> | >
>> | >
>> | > "Adam Raff" <araff@.newsgroup.nospam> wrote in message
>> | > news:OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl...
>> | >> Good Day,
>> | >>
>> | >> I have a simple question on SQL 2000. Please note that I am no
>> expert
>> | >> and this is a basic question.
>> | >>
>> | >> We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have
>> a
>> | >> remote site that connects to this server via a T1 line using a
>> program
>> | >> that we created called popss.
>> | >>
>> | >> What happens is that the program takes a long time getting the data
>> from
>> | >> the server and we know that it's a bandwidth issue. What I would
>> like
>> to
>> | >> know is there a way to install a toned down version of SQL something
>> like
>> | >> desktop on another Windows 2003 server or do we need the another
>> full
>> | >> version of SQL at that location so that the program can read from
>> the
>> | >> local instance instead of going over the pipe.
>> | >>
>> | >> I am looking for a way to sync up the two SQL databases say at night
>> this
>> | >> way there we be no traffic over the pipe during the day.
>> | >>
>> | >> Thank You
>> | >> Adam Raff
>> | >>
>> | >
>> |
>> |
>> |
>|||Thank You both for explaining this to me. I will sit down to read the
articles to get an idea. Now that I know that it is possible to do with
what I have.
Thanks again for your help
Adam Raff
"Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
news:8E4680AF-987C-4999-90A3-33BF3B6D5953@.microsoft.com...
> Correction: There is no version 2007 of SQL Server. SQL Server 2008 is the
> one that's going to be successor of SQL Server 2005.
> If you want to transfer changes that you make in your second SQL Server to
> be applied to your first SQL Server, then use Merge Replication. As you
> can not use SQL Server Express Edition in a Updatable Subscriptions for
> Transactional Replication topology, you may want to go with Merge
> Replication. You'd be able to use Express Edition in a Transactional
> Replication if you wanted to use your second SQL Server only for reporting
> server purposes which means you would not want to transfer the updated
> records from your second SQL Server to the First one.
> Express Edition's limitation is just to be Subscriber in a Replication
> Topology in this topic. It can not be a Publisher nor Distributor. But it
> can be a Subscriber and for you situation can be used in a Merge
> Replication topology.
> Just give it a try Merge Replication on your test machine and see how it
> works.
> If you'd like to learn more about Transactional and Merge Replications, I
> encourage you you to visit the links that Adams already mentioned.
>> How Merge Replication Works
>> http://technet.microsoft.com/en-us/library/ms151329.aspx
>> How Transactional Replication Works
>> http://technet.microsoft.com/en-us/library/ms151706.aspx
>
> --
> Ekrem Önsoy
>
> "Adam Raff" <araff@.newsgroup.nospam> wrote in message
> news:eVK6zng9HHA.1212@.TK2MSFTNGP05.phx.gbl...
>> Hi Adams,
>> If we upgrade to SQL 2005 lets say or the newer version of SQL 2007 will
>> this then work then?
>> Is the Express version limited in that it can never sync up with the full
>> version of SQL?
>> Thanks
>> Adam Raff
>>
>> "Adams Qu [MSFT]" <v-adamqu@.online.microsoft.com> wrote in message
>> news:WwE9G5d9HHA.5532@.TK2MSFTNGHUB02.phx.gbl...
>> Dear Adam,
>> Thank you for posting here.
>> I would like to explain that the SQL Server 2000 does not support the
>> updatable Subscriptions for Transactional Replication and the SQL Server
>> 2005 Express 2005 Edition can only be configured as the Subscriber. So,
>> the
>> replication is done in only one way and the data written in the SQL
>> Express
>> will not be transferred to the main SQL Server.
>> If your application "Popss" only reads the data from SQL Server, we can
>> choose to use Transactional Replication. If not, we can try the Merge
>> Replication so that the changes can be synchronized to the publisher.
>> For your reference, I have included some relevant articles below:
>> How Merge Replication Works
>> http://technet.microsoft.com/en-us/library/ms151329.aspx
>> How Transactional Replication Works
>> http://technet.microsoft.com/en-us/library/ms151706.aspx
>> If anything is unclear in my reply, please don't hesitate to let me know
>> and I will be glad to help.
>> Have a nice day!
>> Best regards,
>> Adams Qu, MCSE, MCDBA, MCTS
>> Microsoft Online Support
>> Microsoft Global Technical Support Center
>> Get Secure! - www.microsoft.com/security
>> =====================================================>> When responding to posts, please "Reply to Group" via your newsreader so
>> that others may learn and benefit from your issue.
>> =====================================================>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> --
>> | From: "Adam Raff" <araff@.newsgroup.nospam>
>> | References: <OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl>
>> <11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com>
>> | Subject: Re: Question on SQL
>> | Date: Wed, 12 Sep 2007 16:40:10 -0400
>> | Lines: 62
>> | X-Priority: 3
>> | X-MSMail-Priority: Normal
>> | X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
>> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
>> | X-RFC2646: Format=Flowed; Response
>> | Message-ID: <OyQZd0X9HHA.1212@.TK2MSFTNGP05.phx.gbl>
>> | Newsgroups: microsoft.public.sqlserver.server
>> | NNTP-Posting-Host: 208-39-138-189.isp.comcastbusiness.net
>> 208.39.138.189
>> | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
>> | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:25271
>> | X-Tomcat-NG: microsoft.public.sqlserver.server
>> |
>> | Ekrem,
>> |
>> | Thanks for your help. The size of the database is small about 500MB
>> so
>> that
>> | is not an issue. My only other question on this is Does this go both
>> ways.
>> |
>> | Meaning when they copy to the SQL Express will it update the SQL
>> server
>> | later during the Replication time since the Express is setup as
>> Subscriber?
>> |
>> | Thanks again for your help
>> | Adam Raff
>> |
>> |
>> |
>> | "Ekrem Önsoy" <ekrem@.btegitim.com> wrote in message
>> | news:11330C0D-7942-4968-BB9F-230F6FD3EA83@.microsoft.com...
>> | > You could use Transactional Replication and set its schedule as
>> running
>> | > once at night. SQL Server Express Edition can be used as a
>> Subscriber
>> in a
>> | > Replication topology and it's free. However, Express Edition has its
>> | > limitations. (4GB db, 1 CPU, 1GB RAM)
>> | >
>> | > http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx
>> | >
>> | > You would make your current SQL Server as Publisher \ Distributor
>> | > (consider workload on your current server) and the other one would
>> be
>> the
>> | > Subscriber. So, your new SQL Server would be updated daily and your
>> app
>> | > would query your local SQL Server directly.
>> | >
>> | > Try this in a test environment first. If your system and app works
>> without
>> | > any problem then you could apply it to your production system.
>> | >
>> | > --
>> | > Ekrem Önsoy
>> | >
>> | >
>> | >
>> | > "Adam Raff" <araff@.newsgroup.nospam> wrote in message
>> | > news:OZ7NvdW9HHA.4752@.TK2MSFTNGP04.phx.gbl...
>> | >> Good Day,
>> | >>
>> | >> I have a simple question on SQL 2000. Please note that I am no
>> expert
>> | >> and this is a basic question.
>> | >>
>> | >> We have a SQL 2000 SP3 server running on Windows 2003 SP1. We have
>> a
>> | >> remote site that connects to this server via a T1 line using a
>> program
>> | >> that we created called popss.
>> | >>
>> | >> What happens is that the program takes a long time getting the data
>> from
>> | >> the server and we know that it's a bandwidth issue. What I would
>> like
>> to
>> | >> know is there a way to install a toned down version of SQL
>> something
>> like
>> | >> desktop on another Windows 2003 server or do we need the another
>> full
>> | >> version of SQL at that location so that the program can read from
>> the
>> | >> local instance instead of going over the pipe.
>> | >>
>> | >> I am looking for a way to sync up the two SQL databases say at
>> night
>> this
>> | >> way there we be no traffic over the pipe during the day.
>> | >>
>> | >> Thank You
>> | >> Adam Raff
>> | >>
>> | >
>> |
>> |
>> |
>>
>|||Dear Adam,
Thank you for your response.
If you have any other questions or concerns, please do not hesitate to
contact me. It is always my pleasure to be of assistance.
Have a nice day!
Best regards,
Adams Qu, MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Question on size restriction for Sql Express and Sql 2005 Standard

If i create a database in SqlEX and then move it to a sever running Sql 2005 standard, am Is my database still limited to the 4GB size?

No, I've tested:

create a database in SQL Express, then detach it;

attach to SQL 2005 Enterprise Edition;

Increase the data file size to 5GB, no problem

question on SELECT 1 and Profiler

I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
and I see a lot of SELECT 1 statements that are running longer in sql
2005 than in sql 2000. what are these select 1 statements?
"Derek" <gepetto_2000@.yahoo.com> wrote in message
news:1164034938.054630.206620@.k70g2000cwa.googlegr oups.com...
> I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
> and I see a lot of SELECT 1 statements that are running longer in sql
> 2005 than in sql 2000. what are these select 1 statements?
>
SELECT 1
Is a query that returns a single row and a single column containing the
value 1. It's extremely cheap, and probably being used as kind of "ping"
from some application. It's such a cheap query that its cost is probably
just background noise.
David
|||How much longer? 1,000 times longer? SQL Server 2005's profiler can
track time in Miliseconds or Microseconds. I believe the default is
microseconds. If something took 1 ms (would not have shown that level
of detail, but just for an example.. In 2000 I believe the lowest level
of detail visible was about 10 or 12 ms, one of the reasons the
microseconds are used, to provide much more detail over the life of a
query and it's trending time) in 2005 profiler under microseconds it
would be 1,000 (still 1 milisecond, however).
David Browne wrote:
> "Derek" <gepetto_2000@.yahoo.com> wrote in message
> news:1164034938.054630.206620@.k70g2000cwa.googlegr oups.com...
> SELECT 1
> Is a query that returns a single row and a single column containing the
> value 1. It's extremely cheap, and probably being used as kind of "ping"
> from some application. It's such a cheap query that its cost is probably
> just background noise.
> David
|||First of all, the SELECT 1 query is used by Connection Pools to maintain
those connections as "live" so the pool manager does not close them. Only
the base connections should be executing them; otherwise, the pool would
never shrink.
Next, when you say 1,000 times longer, I'm not sure what you mean. On a
SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
execute the same script on SS2K5. What are the average per execution
duration and the overall duration for each of these installations?
Now, there can be environmental factors that you should be careful about,
and I would prefer to run these against each instance, but on the same
hardware, but they should still be roughly the same. There's just not a
whole lot of improvements a system could make on such a simple query.
Sincerely,
Anthony Thomas

"MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
news:1164074119.932839.211510@.j44g2000cwa.googlegr oups.com...[vbcol=seagreen]
> How much longer? 1,000 times longer? SQL Server 2005's profiler can
> track time in Miliseconds or Microseconds. I believe the default is
> microseconds. If something took 1 ms (would not have shown that level
> of detail, but just for an example.. In 2000 I believe the lowest level
> of detail visible was about 10 or 12 ms, one of the reasons the
> microseconds are used, to provide much more detail over the life of a
> query and it's trending time) in 2005 profiler under microseconds it
> would be 1,000 (still 1 milisecond, however).
>
> David Browne wrote:
driver[vbcol=seagreen]
"ping"[vbcol=seagreen]
probably
>
|||Anthony,
I am not the OP. I did not discuss what the SELECT 1 was. The original
poster indicated that when using profiler, a SELECT 1 query is taking a
lot (never indicated by what factor) longer to run. (Presumably when
looking at Duration in Profiler)
My reply indicated that in SQL Server 2005 you can view your Duration
event in Micro or Miliseconds. In SQL Server 2000 the duration shows
only in miliseconds. I was suggesting that the default behavior (which,
I believe is to view duration in MICROseconds) is probably what is
making the OP's SELECT 1 query appear to run a lot longer in SQL Server
2005. A microsecond is 1,000 times longer than a milisecond.
Sorry that wasn't clear.
Anthony Thomas wrote:[vbcol=seagreen]
> First of all, the SELECT 1 query is used by Connection Pools to maintain
> those connections as "live" so the pool manager does not close them. Only
> the base connections should be executing them; otherwise, the pool would
> never shrink.
> Next, when you say 1,000 times longer, I'm not sure what you mean. On a
> SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
> execute the same script on SS2K5. What are the average per execution
> duration and the overall duration for each of these installations?
> Now, there can be environmental factors that you should be careful about,
> and I would prefer to run these against each instance, but on the same
> hardware, but they should still be roughly the same. There's just not a
> whole lot of improvements a system could make on such a simple query.
> Sincerely,
>
> Anthony Thomas
>
> --
> "MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
> news:1164074119.932839.211510@.j44g2000cwa.googlegr oups.com...
> driver
> "ping"
> probably
|||Yes, I think your analysis is correct. But, when in doubt, test it out. If
anything, just out of curiosity.
Anthony Thomas

"MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
news:1164129078.760070.81590@.j44g2000cwa.googlegro ups.com...[vbcol=seagreen]
> Anthony,
> I am not the OP. I did not discuss what the SELECT 1 was. The original
> poster indicated that when using profiler, a SELECT 1 query is taking a
> lot (never indicated by what factor) longer to run. (Presumably when
> looking at Duration in Profiler)
> My reply indicated that in SQL Server 2005 you can view your Duration
> event in Micro or Miliseconds. In SQL Server 2000 the duration shows
> only in miliseconds. I was suggesting that the default behavior (which,
> I believe is to view duration in MICROseconds) is probably what is
> making the OP's SELECT 1 query appear to run a lot longer in SQL Server
> 2005. A microsecond is 1,000 times longer than a milisecond.
> Sorry that wasn't clear.
>
> Anthony Thomas wrote:
Only[vbcol=seagreen]
about,[vbcol=seagreen]
level[vbcol=seagreen]
sql[vbcol=seagreen]
the
>

question on SELECT 1 and Profiler

I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
and I see a lot of SELECT 1 statements that are running longer in sql
2005 than in sql 2000. what are these select 1 statements?"Derek" <gepetto_2000@.yahoo.com> wrote in message
news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
> and I see a lot of SELECT 1 statements that are running longer in sql
> 2005 than in sql 2000. what are these select 1 statements?
>
SELECT 1
Is a query that returns a single row and a single column containing the
value 1. It's extremely cheap, and probably being used as kind of "ping"
from some application. It's such a cheap query that its cost is probably
just background noise.
David|||How much longer? 1,000 times longer? SQL Server 2005's profiler can
track time in Miliseconds or Microseconds. I believe the default is
microseconds. If something took 1 ms (would not have shown that level
of detail, but just for an example.. In 2000 I believe the lowest level
of detail visible was about 10 or 12 ms, one of the reasons the
microseconds are used, to provide much more detail over the life of a
query and it's trending time) in 2005 profiler under microseconds it
would be 1,000 (still 1 milisecond, however).
David Browne wrote:
> "Derek" <gepetto_2000@.yahoo.com> wrote in message
> news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> SELECT 1
> Is a query that returns a single row and a single column containing the
> value 1. It's extremely cheap, and probably being used as kind of "ping"
> from some application. It's such a cheap query that its cost is probably
> just background noise.
> David|||First of all, the SELECT 1 query is used by Connection Pools to maintain
those connections as "live" so the pool manager does not close them. Only
the base connections should be executing them; otherwise, the pool would
never shrink.
Next, when you say 1,000 times longer, I'm not sure what you mean. On a
SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
execute the same script on SS2K5. What are the average per execution
duration and the overall duration for each of these installations?
Now, there can be environmental factors that you should be careful about,
and I would prefer to run these against each instance, but on the same
hardware, but they should still be roughly the same. There's just not a
whole lot of improvements a system could make on such a simple query.
Sincerely,
Anthony Thomas
"MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
news:1164074119.932839.211510@.j44g2000cwa.googlegroups.com...
> How much longer? 1,000 times longer? SQL Server 2005's profiler can
> track time in Miliseconds or Microseconds. I believe the default is
> microseconds. If something took 1 ms (would not have shown that level
> of detail, but just for an example.. In 2000 I believe the lowest level
> of detail visible was about 10 or 12 ms, one of the reasons the
> microseconds are used, to provide much more detail over the life of a
> query and it's trending time) in 2005 profiler under microseconds it
> would be 1,000 (still 1 milisecond, however).
>
> David Browne wrote:
driver[vbcol=seagreen]
"ping"[vbcol=seagreen]
probably[vbcol=seagreen]
>|||Anthony,
I am not the OP. I did not discuss what the SELECT 1 was. The original
poster indicated that when using profiler, a SELECT 1 query is taking a
lot (never indicated by what factor) longer to run. (Presumably when
looking at Duration in Profiler)
My reply indicated that in SQL Server 2005 you can view your Duration
event in Micro or Miliseconds. In SQL Server 2000 the duration shows
only in miliseconds. I was suggesting that the default behavior (which,
I believe is to view duration in MICROseconds) is probably what is
making the OP's SELECT 1 query appear to run a lot longer in SQL Server
2005. A microsecond is 1,000 times longer than a milisecond.
Sorry that wasn't clear.
Anthony Thomas wrote:[vbcol=seagreen]
> First of all, the SELECT 1 query is used by Connection Pools to maintain
> those connections as "live" so the pool manager does not close them. Only
> the base connections should be executing them; otherwise, the pool would
> never shrink.
> Next, when you say 1,000 times longer, I'm not sure what you mean. On a
> SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
> execute the same script on SS2K5. What are the average per execution
> duration and the overall duration for each of these installations?
> Now, there can be environmental factors that you should be careful about,
> and I would prefer to run these against each instance, but on the same
> hardware, but they should still be roughly the same. There's just not a
> whole lot of improvements a system could make on such a simple query.
> Sincerely,
>
> Anthony Thomas
>
> --
> "MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
> news:1164074119.932839.211510@.j44g2000cwa.googlegroups.com...
> driver
> "ping"
> probably|||Yes, I think your analysis is correct. But, when in doubt, test it out. If
anything, just out of curiosity.
Anthony Thomas
"MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
news:1164129078.760070.81590@.j44g2000cwa.googlegroups.com...
> Anthony,
> I am not the OP. I did not discuss what the SELECT 1 was. The original
> poster indicated that when using profiler, a SELECT 1 query is taking a
> lot (never indicated by what factor) longer to run. (Presumably when
> looking at Duration in Profiler)
> My reply indicated that in SQL Server 2005 you can view your Duration
> event in Micro or Miliseconds. In SQL Server 2000 the duration shows
> only in miliseconds. I was suggesting that the default behavior (which,
> I believe is to view duration in MICROseconds) is probably what is
> making the OP's SELECT 1 query appear to run a lot longer in SQL Server
> 2005. A microsecond is 1,000 times longer than a milisecond.
> Sorry that wasn't clear.
>
> Anthony Thomas wrote:
Only[vbcol=seagreen]
about,[vbcol=seagreen]
level[vbcol=seagreen]
sql[vbcol=seagreen]
the[vbcol=seagreen]
>

question on SELECT 1 and Profiler

I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
and I see a lot of SELECT 1 statements that are running longer in sql
2005 than in sql 2000. what are these select 1 statements?"Derek" <gepetto_2000@.yahoo.com> wrote in message
news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
> and I see a lot of SELECT 1 statements that are running longer in sql
> 2005 than in sql 2000. what are these select 1 statements?
>
SELECT 1
Is a query that returns a single row and a single column containing the
value 1. It's extremely cheap, and probably being used as kind of "ping"
from some application. It's such a cheap query that its cost is probably
just background noise.
David|||How much longer? 1,000 times longer? SQL Server 2005's profiler can
track time in Miliseconds or Microseconds. I believe the default is
microseconds. If something took 1 ms (would not have shown that level
of detail, but just for an example.. In 2000 I believe the lowest level
of detail visible was about 10 or 12 ms, one of the reasons the
microseconds are used, to provide much more detail over the life of a
query and it's trending time) in 2005 profiler under microseconds it
would be 1,000 (still 1 milisecond, however).
David Browne wrote:
> "Derek" <gepetto_2000@.yahoo.com> wrote in message
> news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> >
> > I am testing sql 2005 queries using the sql server 2005 jdbc 1.1 driver
> > and I see a lot of SELECT 1 statements that are running longer in sql
> > 2005 than in sql 2000. what are these select 1 statements?
> >
> SELECT 1
> Is a query that returns a single row and a single column containing the
> value 1. It's extremely cheap, and probably being used as kind of "ping"
> from some application. It's such a cheap query that its cost is probably
> just background noise.
> David|||First of all, the SELECT 1 query is used by Connection Pools to maintain
those connections as "live" so the pool manager does not close them. Only
the base connections should be executing them; otherwise, the pool would
never shrink.
Next, when you say 1,000 times longer, I'm not sure what you mean. On a
SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
execute the same script on SS2K5. What are the average per execution
duration and the overall duration for each of these installations?
Now, there can be environmental factors that you should be careful about,
and I would prefer to run these against each instance, but on the same
hardware, but they should still be roughly the same. There's just not a
whole lot of improvements a system could make on such a simple query.
Sincerely,
Anthony Thomas
"MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
news:1164074119.932839.211510@.j44g2000cwa.googlegroups.com...
> How much longer? 1,000 times longer? SQL Server 2005's profiler can
> track time in Miliseconds or Microseconds. I believe the default is
> microseconds. If something took 1 ms (would not have shown that level
> of detail, but just for an example.. In 2000 I believe the lowest level
> of detail visible was about 10 or 12 ms, one of the reasons the
> microseconds are used, to provide much more detail over the life of a
> query and it's trending time) in 2005 profiler under microseconds it
> would be 1,000 (still 1 milisecond, however).
>
> David Browne wrote:
> > "Derek" <gepetto_2000@.yahoo.com> wrote in message
> > news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> > >
> > > I am testing sql 2005 queries using the sql server 2005 jdbc 1.1
driver
> > > and I see a lot of SELECT 1 statements that are running longer in sql
> > > 2005 than in sql 2000. what are these select 1 statements?
> > >
> >
> > SELECT 1
> >
> > Is a query that returns a single row and a single column containing the
> > value 1. It's extremely cheap, and probably being used as kind of
"ping"
> > from some application. It's such a cheap query that its cost is
probably
> > just background noise.
> >
> > David
>|||Anthony,
I am not the OP. I did not discuss what the SELECT 1 was. The original
poster indicated that when using profiler, a SELECT 1 query is taking a
lot (never indicated by what factor) longer to run. (Presumably when
looking at Duration in Profiler)
My reply indicated that in SQL Server 2005 you can view your Duration
event in Micro or Miliseconds. In SQL Server 2000 the duration shows
only in miliseconds. I was suggesting that the default behavior (which,
I believe is to view duration in MICROseconds) is probably what is
making the OP's SELECT 1 query appear to run a lot longer in SQL Server
2005. A microsecond is 1,000 times longer than a milisecond.
Sorry that wasn't clear.
Anthony Thomas wrote:
> First of all, the SELECT 1 query is used by Connection Pools to maintain
> those connections as "live" so the pool manager does not close them. Only
> the base connections should be executing them; otherwise, the pool would
> never shrink.
> Next, when you say 1,000 times longer, I'm not sure what you mean. On a
> SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
> execute the same script on SS2K5. What are the average per execution
> duration and the overall duration for each of these installations?
> Now, there can be environmental factors that you should be careful about,
> and I would prefer to run these against each instance, but on the same
> hardware, but they should still be roughly the same. There's just not a
> whole lot of improvements a system could make on such a simple query.
> Sincerely,
>
> Anthony Thomas
>
> --
> "MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
> news:1164074119.932839.211510@.j44g2000cwa.googlegroups.com...
> > How much longer? 1,000 times longer? SQL Server 2005's profiler can
> > track time in Miliseconds or Microseconds. I believe the default is
> > microseconds. If something took 1 ms (would not have shown that level
> > of detail, but just for an example.. In 2000 I believe the lowest level
> > of detail visible was about 10 or 12 ms, one of the reasons the
> > microseconds are used, to provide much more detail over the life of a
> > query and it's trending time) in 2005 profiler under microseconds it
> > would be 1,000 (still 1 milisecond, however).
> >
> >
> > David Browne wrote:
> > > "Derek" <gepetto_2000@.yahoo.com> wrote in message
> > > news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> > > >
> > > > I am testing sql 2005 queries using the sql server 2005 jdbc 1.1
> driver
> > > > and I see a lot of SELECT 1 statements that are running longer in sql
> > > > 2005 than in sql 2000. what are these select 1 statements?
> > > >
> > >
> > > SELECT 1
> > >
> > > Is a query that returns a single row and a single column containing the
> > > value 1. It's extremely cheap, and probably being used as kind of
> "ping"
> > > from some application. It's such a cheap query that its cost is
> probably
> > > just background noise.
> > >
> > > David
> >|||Yes, I think your analysis is correct. But, when in doubt, test it out. If
anything, just out of curiosity.
Anthony Thomas
"MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
news:1164129078.760070.81590@.j44g2000cwa.googlegroups.com...
> Anthony,
> I am not the OP. I did not discuss what the SELECT 1 was. The original
> poster indicated that when using profiler, a SELECT 1 query is taking a
> lot (never indicated by what factor) longer to run. (Presumably when
> looking at Duration in Profiler)
> My reply indicated that in SQL Server 2005 you can view your Duration
> event in Micro or Miliseconds. In SQL Server 2000 the duration shows
> only in miliseconds. I was suggesting that the default behavior (which,
> I believe is to view duration in MICROseconds) is probably what is
> making the OP's SELECT 1 query appear to run a lot longer in SQL Server
> 2005. A microsecond is 1,000 times longer than a milisecond.
> Sorry that wasn't clear.
>
> Anthony Thomas wrote:
> > First of all, the SELECT 1 query is used by Connection Pools to maintain
> > those connections as "live" so the pool manager does not close them.
Only
> > the base connections should be executing them; otherwise, the pool would
> > never shrink.
> >
> > Next, when you say 1,000 times longer, I'm not sure what you mean. On a
> > SS2K instance, run a script of a loop of SELECT 1 for 5,000 times. Now,
> > execute the same script on SS2K5. What are the average per execution
> > duration and the overall duration for each of these installations?
> >
> > Now, there can be environmental factors that you should be careful
about,
> > and I would prefer to run these against each instance, but on the same
> > hardware, but they should still be roughly the same. There's just not a
> > whole lot of improvements a system could make on such a simple query.
> >
> > Sincerely,
> >
> >
> > Anthony Thomas
> >
> >
> >
> > --
> >
> > "MikeWalsh" <mwalsh9815@.gmail.com> wrote in message
> > news:1164074119.932839.211510@.j44g2000cwa.googlegroups.com...
> > > How much longer? 1,000 times longer? SQL Server 2005's profiler can
> > > track time in Miliseconds or Microseconds. I believe the default is
> > > microseconds. If something took 1 ms (would not have shown that level
> > > of detail, but just for an example.. In 2000 I believe the lowest
level
> > > of detail visible was about 10 or 12 ms, one of the reasons the
> > > microseconds are used, to provide much more detail over the life of a
> > > query and it's trending time) in 2005 profiler under microseconds it
> > > would be 1,000 (still 1 milisecond, however).
> > >
> > >
> > > David Browne wrote:
> > > > "Derek" <gepetto_2000@.yahoo.com> wrote in message
> > > > news:1164034938.054630.206620@.k70g2000cwa.googlegroups.com...
> > > > >
> > > > > I am testing sql 2005 queries using the sql server 2005 jdbc 1.1
> > driver
> > > > > and I see a lot of SELECT 1 statements that are running longer in
sql
> > > > > 2005 than in sql 2000. what are these select 1 statements?
> > > > >
> > > >
> > > > SELECT 1
> > > >
> > > > Is a query that returns a single row and a single column containing
the
> > > > value 1. It's extremely cheap, and probably being used as kind of
> > "ping"
> > > > from some application. It's such a cheap query that its cost is
> > probably
> > > > just background noise.
> > > >
> > > > David
> > >
>

Monday, March 12, 2012

Question on Process killed and still exists with a killed/rollback

Hi
I have killed a process running from sql server agent. the process id is 55
and when i give sp_who2 it still shows the process as killed /rollback. whe
n
i give the command kill 55 it says 100% rollback complete, but still the
process exists. Any suggestions to kill this process completely.
Thanks
RodgerRodger,
You cannot kill a process that is in the middle of Rolling back (it
must be a rather long transaction). Unfortunately you will need to
wait patiently until the rollback finishes. Use Kill WITH STATUS ONLY
will show you how fast the rollback has finished.
Attempt to stop a rollback process e.g. restart the SQL Instance will
only cause the rollback run even longer.|||Someone asked essentially the same question just a few days ago. Your
process may be blocked or perhaps it had a massive amount of uncommitted
data changes when you first attempted to kill it, and this thread discusses
various options.
http://groups.google.com/group/micr...1637c15f84fa05f
Another consideration going forward is to verify that your database
transaction log is located on a seperate physical disk from your database
data file. When rolling back a large transaction, both the data and log
files get hit heavily and keeping them on seperate drives decreases the time
required to recover due to parallel I/O processing.
"Rodger" <Rodger@.discussions.microsoft.com> wrote in message
news:3F59A2B2-9606-4409-8434-39DF9D4366C0@.microsoft.com...
> Hi
> I have killed a process running from sql server agent. the process id is
> 55
> and when i give sp_who2 it still shows the process as killed /rollback.
> when
> i give the command kill 55 it says 100% rollback complete, but still the
> process exists. Any suggestions to kill this process completely.
> Thanks
> Rodger

Question on named instance

Hi,
I have sql2000 and 2 instances running, none have the default port. From the
BOL:
"A TCP port is chosen dynamically the first time the MSSQL$instancename
service is started."
"SQL Server 2000 clients do not have to be configured to connect to an
instance of SQL Server 2000. The SQL Server 2000 client components query a
computer running instances of SQL Server 2000 to determine the Net-Libraries
and network addresses for each instance. The client components then
transparently choose a supported Net-Library and address for the connection
without having to be configured on the client. The only information the
application must supply is the computer name and instance name."
Questions:
1, If I restart the MSSQL$instancename service the port is going to change
or fixed there?
2, what is "client components" refers to?
2, I need to connect to these instances from jdbc which only needs server
name and port number which is different from the above statement, how can I
connect?
Thanks
> 1, If I restart the MSSQL$instancename service the port is going to
change
> or fixed there?
I have no idea about this. If I had to guess, I would say that it
doesn't change. Suppose that a client obtains the port number for an
instance, then the instance gets restarted; now the client has an
incorrect port number (if the port has changed) and it has to get all
that information again. But this is just a guess.

> 2, what is "client components" refers to?
MDAC, JDBC drivers, any client libraries.

> 2, I need to connect to these instances from jdbc which only needs
server
> name and port number which is different from the above statement, how
can I
> connect?
You can look into the registry and obtain the port number from there
(not sure exactly where, but you could google for it) or you could use
a JDBC driver that "knows" how to determine ports for named instances,
such as the open source jTDS or the commercial drivers.
Alin.
Disclaimer: I am a jTDS developer.
|||Jen
The port the instance uses is fixed. You should find the default instance
will be running on port 1433. The named instance will be assigned by SQL
Server when you created the instance. If you want to see what ports you are
using, from the SQL Server programs group choose Server Network Utility (You
need to do this on the server running SQL Server). On there click on TCP/IP
and then properties, this will show you the port the instance is using.
Regards
John
"Alin Sinpalean" wrote:

> change
> I have no idea about this. If I had to guess, I would say that it
> doesn't change. Suppose that a client obtains the port number for an
> instance, then the instance gets restarted; now the client has an
> incorrect port number (if the port has changed) and it has to get all
> that information again. But this is just a guess.
>
> MDAC, JDBC drivers, any client libraries.
> server
> can I
> You can look into the registry and obtain the port number from there
> (not sure exactly where, but you could google for it) or you could use
> a JDBC driver that "knows" how to determine ports for named instances,
> such as the open source jTDS or the commercial drivers.
> Alin.
> Disclaimer: I am a jTDS developer.
>
|||The automatic assignment of ports on named instances that WERE NOT
configured manually do not change. However, upon startup, the first time,
one is acquired and cached. Upon secondary startups, if that same port is
in use by another process, then SQL Server will attempt binding to a new
port number.
What is meant by port assignment on the client end is that SQL Server
exposes UDP 1434, called Dynamic Discovery. Anyone who queries this will
receive a list of instances and port assignments which will automatically
configure clients to connect to those ports.
Sincerely,
Anthony Thomas

"John Bandettini" <JohnBandettini@.discussions.microsoft.com> wrote in
message news:932AC1DF-7195-416B-8DD6-6110BFEB4086@.microsoft.com...
Jen
The port the instance uses is fixed. You should find the default instance
will be running on port 1433. The named instance will be assigned by SQL
Server when you created the instance. If you want to see what ports you are
using, from the SQL Server programs group choose Server Network Utility (You
need to do this on the server running SQL Server). On there click on TCP/IP
and then properties, this will show you the port the instance is using.
Regards
John
"Alin Sinpalean" wrote:

> change
> I have no idea about this. If I had to guess, I would say that it
> doesn't change. Suppose that a client obtains the port number for an
> instance, then the instance gets restarted; now the client has an
> incorrect port number (if the port has changed) and it has to get all
> that information again. But this is just a guess.
>
> MDAC, JDBC drivers, any client libraries.
> server
> can I
> You can look into the registry and obtain the port number from there
> (not sure exactly where, but you could google for it) or you could use
> a JDBC driver that "knows" how to determine ports for named instances,
> such as the open source jTDS or the commercial drivers.
> Alin.
> Disclaimer: I am a jTDS developer.
>