Viewing 15 posts - 541 through 555 (of 684 total)
Geoff,
You can create the temp table with the default identity seed and then use dbcc checkident('tablename',reseed,new_seed_value)
CREATE TABLE #mytemp
(col1 INT IDENTITY)
DECLARE @new_seed INT
SET @new_seed = 20
DBCC CHECKIDENT('#mytemp',reseed,@new_seed)
Hope that helps,
June 7, 2006 at 8:33 am
Colin,
how about using fn_get_sql? That should return the last statement that was run (even if it's in a procedure).
DECLARE @handle binary(20)
SELECT @handle = sql_handle
FROM master..sysprocesses
...
June 7, 2006 at 8:29 am
Yep. That only applies for procedures that are created in master and prefixed with sp_
When executed from a database other than master the procedure runs within the context of...
June 7, 2006 at 8:24 am
Alex,
You only need to capture the Audit Login event and you can also put in a filter on the application column so that you only capture login events from those...
June 7, 2006 at 8:18 am
Ram,
If you create the procedure in the master database then you don't need to pass the db name through to it because select * from sysobjects will automatically select from...
June 7, 2006 at 8:09 am
That's a really good question Rudy. It never even occurred to me.
Now I'm curious too.
June 2, 2006 at 4:36 pm
To be honest I haven't experienced deadlocking caused by parallelism before so I cannot provide more details.
I suspect though that just like normal deadlocking, it will depend on a variety...
June 2, 2006 at 7:11 am
select dbo.funDaysInMonth('31 Dec 2005')
June 2, 2006 at 7:02 am
James try this:
select substring(mycolumn, charindex('TestBooking="', mycolumn) + 13, charindex('"',mycolumn,charindex('TestBooking="', mycolumn) + 13) -
(charindex('TestBooking="', mycolumn) + 13))
This will only work if TestBooking=" will always be a fixed length of 13...
June 2, 2006 at 5:13 am
Try this function posted by DavidT here in the SQLServerCentral library:
CREATE function funDaysInMonth
(@Date Datetime)
returns int
as
begin
declare @Days int
set @Date = (@Date - (day(@Date) - 1))
set @Date = dateadd(mm,1,@Date)
set @Date = dateadd(dd,...
June 2, 2006 at 4:44 am
Looks like you have deadlocking caused by parallelism.
I'd suggest you have a look around for parallelism and deadlock. One possible solution might be to use the maxdop=1 query hint.
June 2, 2006 at 4:29 am
Hi Daniel,
Try this:
select * from information_schema.tables
where objectproperty(object_id(table_name),'TableHasPrimaryKey') = 0
Hope that helps,
June 2, 2006 at 3:26 am
Hi Neil,
I'm assuming you have a backup of the master database.
Stop the SQL Server services and go to the command prompt.
Change the directory to the following (assuming this is a...
June 1, 2006 at 3:15 pm
It's the unwieldy integration between SourceSafe and SQL that prompted a third-party tool for source control - http://www.sqldbcontrol.com.
It integrates with SQL Server nicely, no need to maintain seperate files, and...
June 1, 2006 at 1:52 pm
Doh! You're absolutely right - don't know what I was thinking.
June 1, 2006 at 11:24 am
Viewing 15 posts - 541 through 555 (of 684 total)