Viewing 15 posts - 76 through 90 (of 119 total)
Fortunately, this is a workaround that we won't need to use with SQL Server 2005, where
DECLARE @MaxRows int
SET @MaxRows = 100
SELECT TOP (@MaxRows) ....
FROM ....
will work nicely.
Scott Thornburg
March 28, 2005 at 8:00 am
If you only need to differentiate between actions when there are rows affected by the triggering action, you can use something like this:
CREATER TRIGGER ...
FOR INSERT, UPDATE, DELETE
AS
BEGIN
DECLARE...
March 28, 2005 at 7:55 am
It's difficult to diagnose this message without more information.
Could you post the SP code and any relevant table schemas.
Also, check the SQL Error Log and machine event logs for any...
March 27, 2005 at 4:24 pm
If a table has a clustered index (which most should as a best practice) then DBCC DBREINDEX or DBCC INDEXDEFRAG rebuilds the table completely (use index id = 1 for...
March 27, 2005 at 4:10 pm
You can use sp_msforeachdb as wz700 as suggested, but the query itself should be modified to something like:
select count(*) as [?]
from [?].dbo.sysobjects
where OBJECTPROPERTY(id, 'IsMSShipped') = 0
That...
March 27, 2005 at 3:41 pm
This would be much easier if there were INFORMATION_SCHEMA views for indexes. Instead, you need to go some system table work:
Try something like:
select object_name(id) as TableName
, name...
March 27, 2005 at 3:35 pm
Felix,
To make a trigger carry out an action only when a specific column is updated, try the IF UPDATE (columnName) syntax:
CREATE TRIGGER tr_MyTrigger
ON MyTable
FOR UPDATE
AS
IF UPDATE (colname)
BEGIN
all...
March 18, 2005 at 11:29 pm
You can also get the SQL Server Perf Monitor counters from within SQL Server from the table sysperfinfo.
Check out BOL or execute
select * from sysperfinfo
where object_name = 'SQLServer:Latches'
to...
March 18, 2005 at 11:23 pm
It is not accurate to say that the table has two indexes in this case. Unlike a table with a clustered index (IndID = 1) which is well-ordered based on...
March 17, 2005 at 10:35 pm
It's a little buried in BOL for DBCC SHOWCONTIG, but Index ID 0 refers to a heap table, i.e., one without a clustered index.
March 17, 2005 at 8:35 pm
And no offense taken. It looks like we both agree that when it comes to performance improvements, empirical testing is a must. There is far more that can impact performance...
March 16, 2005 at 7:43 pm
Jeff,
Given the information available, it's not possible to say whether or not performance will improve. This depends on the method of access of the table MASMEDIA. If the UPDATEs are...
March 16, 2005 at 2:32 am
You can easily join updates that have similar where clauses except for a single condition such as the four update statements for avg_sale and avg_profit:
UPDATE MASMEDIA
SET avg_sale = CASE
WHEN...
March 15, 2005 at 8:53 pm
Tim,
No, Transactional replication itself does not alter your user table schemas. However, published tables MUST have a primary key, so in that sense, you might have to alter the tables...
March 14, 2005 at 2:04 am
A while ago SQL Server Magazine website posted a method to create system functions in master that could be called from any database without prefixing the owner's name. It was an...
March 8, 2005 at 1:40 am
Viewing 15 posts - 76 through 90 (of 119 total)