Viewing 15 posts - 121 through 135 (of 346 total)
If the Pbfamily_new database already exists on your system, either drop it first or run this:
[font="Courier New"]RESTORE DATABASE Pbfamily_new
FROM DISK = 'C:\SQL-Backups\pbfamily\pbFamily_db_200805040200.BAK'
WITH MOVE 'PBFamily_Data'...
May 7, 2008 at 3:55 pm
This is even more helpful - code that actually updates stats in all databases. My bad, I missed that the first sp_executesql statement changes the context, but only for...
May 7, 2008 at 3:35 pm
I just did some testing and got the same results - SQL Server Agent wouldn't start after setting an alias. I didn't have to reinstall, however. Here's what...
May 6, 2008 at 10:44 pm
1. There is no default user/password per se. By default, BUILTIN\Administrators is granted sysadmin role, so any local administrator will be able to log in.
2. Make sure...
May 6, 2008 at 10:16 pm
This will work:
EDIT: No it won't! Bad code removed. See my next post.
May 6, 2008 at 5:48 pm
You don't need [font="Courier New"]END[/font] with an [font="Courier New"]IF[/font] statement, only with the [font="Courier New"]CASE[/font] statement. Unless you are doing multi-line code blocks for the statement blocks. So...
May 5, 2008 at 3:47 pm
Not as such. Some DDL triggers have server-level scope, some have database-level scope. So you can't create a server-level trigger to capture all ALTER TABLE statements, for example.
For...
May 5, 2008 at 3:26 pm
That would be my first guess - check/create SPNs for your SQL Server(s). I had to do it recently with the setspn utility (different circumstances but same error message)....
May 5, 2008 at 3:20 pm
Add the WITH NOCHECK clause.
[font="Courier New"]ALTER TABLE [dbo].[SearchItemWord] WITH NOCHECK
ADD CONSTRAINT [FK_SearchItemWord_SearchItem] FOREIGN KEY
(
[SearchItemID]
)
REFERENCES [dbo].[SearchItem]
(
[SearchItemID]
) ON DELETE CASCADE ON UPDATE CASCADE [/font]
May 5, 2008 at 3:16 pm
First thing we do is open two copies of perfmon. The first one, we add the % Processor time per thread counters (see PerfMon01.jpg) and switch to Chart/Histogram view....
May 5, 2008 at 3:05 pm
Doesn't matter about the versions.
Not sure about the other, though. Try it and see what happens.
May 4, 2008 at 10:04 pm
As stated in my previous post, I use nvarchar because sp_executesql only accepts unicode data. From BOL:
[font="Arial"][ @stmt = ] stmt
Is a Unicode string that contains a Transact-SQL statement...
May 4, 2008 at 9:56 pm
An internet connection is not necessary.
There is a gotcha regarding SQL Server 2005 SP1 and Integration Services. SSIS will not start because it is trying to reach crl.microsoft.com to...
May 4, 2008 at 9:42 pm
Here's some revised code that returns the SPID and does a DBCC INPUTBUFFER all in one step:
[font="Courier New"]USE master
GO
-- returns SPID & DBCC INPUTBUFFER for a given kpid
DECLARE @sql nvarchar(1000),...
May 4, 2008 at 9:27 pm
No, the first perfmon instance (in Histogram view) shows you which SQL Server thread is hogging CPU use. Each thread is assigned a number, so you have sqlservr/1,...
May 4, 2008 at 9:21 pm
Viewing 15 posts - 121 through 135 (of 346 total)