Viewing 15 posts - 3,376 through 3,390 (of 5,394 total)
BeginnerBug (3/14/2011)
1. Should i create clustered index on this column? or need not?
A clustered index on the primary key is usually a good idea. An identity column is usually a...
March 14, 2011 at 3:30 am
From your description, it seems to me that things got different from your analysis.
Probably, before restarts the GOOD plans were cached and you lost them restarting the service.
When the...
March 11, 2011 at 7:50 am
I mean that you can replicate tables to remote sql servers:
http://msdn.microsoft.com/en-us/library/ms151198.aspx
Obviously, if the target server is not MS SQL Server, this is not an option.
March 11, 2011 at 7:03 am
Dynamic sql is your friend:
DECLARE @sql nvarchar(max)
SET @sql = STUFF((
SELECT ',DEST.' + name + ' = SRC.' + name AS [text()]
FROM (
SELECT cols.name
FROM sys.columns AS cols
INNER JOIN sys.tables AS tabs
ON...
March 11, 2011 at 6:35 am
What about replication?
March 11, 2011 at 6:06 am
I would not focus on the DTA issue, I would rather start from the original problem: slow sql server.
It doesn't necessarily mean you need more (or better) indexes.
So, slow at...
March 11, 2011 at 6:01 am
rpfelgueiras (3/10/2011)
Can I...
March 11, 2011 at 1:40 am
Lowell (3/10/2011)
the only problem with dbcc inputbuffer is it is limited to 256 characters....
It was limited to 256 characters in SQL 2000, but from 2005 onwards it returns nvarchar(4000).
The real...
March 10, 2011 at 10:54 am
It could be something like this:
CREATE TRIGGER My_Trigger
ON MyTable
FOR DELETE
AS
BEGIN
SET NOCOUNT ON;
DECLARE @SQLBuffer nvarchar(4000)
DECLARE @buffer TABLE (
EventType nvarchar(30),
Parameters int,
EventInfo nvarchar(4000)
)
INSERT @buffer
EXEC sp_executesql...
March 10, 2011 at 10:18 am
OK, here it is:
declare @rc int, @dir nvarchar(4000)
exec @rc = master.dbo.xp_instance_regread
N'HKEY_LOCAL_MACHINE',
N'Software\Microsoft\MSSQLServer\MSSQLServer',
N'BackupDirectory',...
March 10, 2011 at 7:26 am
It should be:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\BackupDirectory
March 10, 2011 at 7:10 am
This is how I would do it:
SET XACT_ABORT ON
BEGIN TRY
BEGIN TRANSACTION
UPDATE srvrn.dbn.dbo.tbl1
SET name = 'test'
WHERE number=1
IF XACT_STATE() = 1
BEGIN
SELECT 'success'
COMMIT
END
ELSE
BEGIN
SELECT 'Uncommittable transaction'
END
END TRY
BEGIN CATCH
ROLLBACK
SELECT 'fail'
END...
March 10, 2011 at 6:52 am
Koen Verbeeck (3/10/2011)
Gianluca Sartori (3/10/2011)
GilaMonster (3/10/2011)
I know Steve has removed a couple of threads that people started solely to promote their blogs
OK, so... report this post as well!
I'm so...
March 10, 2011 at 6:31 am
Viewing 15 posts - 3,376 through 3,390 (of 5,394 total)