Viewing 15 posts - 6,601 through 6,615 (of 6,676 total)
I know exactly what you mean - I knew about this but couldn't find it, so wrote my own. Then, of course - I found it again. 😀
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 19, 2008 at 3:51 pm
Actually just found a different approach:
SELECT object_name(@@procid);
-- with SCHEMA
SELECT schema_name(schema_id) + '.' + object_name(object_id)
FROM sys.objects
WHERE object_id = @@procid;
Jeff
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 18, 2008 at 12:16 pm
Well, after thinking about this a little - I remembered something that simplifies this a little. Here is the updated script:
ALTER PROCEDURE dbo.TestProcedure
AS
DECLARE @sessionid smallint;
SELECT @sessionid =...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 18, 2008 at 12:09 pm
Here is a better version, forgot a couple of things:
ALTER PROCEDURE dbo.TestProcedure
AS
DECLARE @objectid int;
DECLARE @sessionid smallint;
-- Get the object id for this procedure
SELECT @objectid = objectid
...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 18, 2008 at 10:41 am
How about using something like:
DECLARE @sessionid smallint;
SELECT @sessionid = session_id
FROM sys.dm_exec_requests r
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) a
WHERE object_name(a.objectid) = 'MyTestProcedure';
IF (@sessionid IS NOT NULL)
BEGIN;
RAISERROR('Process...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 18, 2008 at 10:20 am
You can determine the object name with the following:
SELECTobject_name(a.objectid)
FROMsys.dm_exec_requests r
CROSSAPPLY sys.dm_exec_sql_text(r.sql_handle) a
WHEREsession_id = @@spid;
If you need/want the schema also, you have to...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 18, 2008 at 10:00 am
After adding a new drive to a cluster (both nodes, right?), then you have to add the drive to the cluster using Cluster Administrator as a resource in your SQL...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 15, 2008 at 3:03 pm
The best way to shrink is: DON'T. Size your database and log files appropriately and expand them as needed.
See: http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 14, 2008 at 10:58 pm
You can use the Import/Export wizard in SQL Server 2005, or - you can create an SSIS (Integration Services) package. If you use Import/Export wizard and save the package...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 14, 2008 at 10:54 pm
Looking at what you are providing, there really is not too much we can do to identify the problem. Try just selecting the variable instead of executing it and...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 14, 2008 at 10:49 pm
Of course - and probably additional checking to validate that we have 9 characters, etc...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 14, 2008 at 12:56 pm
SQL-challenged (5/13/2008)
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 13, 2008 at 10:58 pm
I agree with Jeff - but, just to have some fun - I would not use the 'correct' answer for this one. I would use this:
UPDATE Employee
SET SocialSecNumber =...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 13, 2008 at 6:19 pm
Off the top of my head, I would suspect that you are seeing the checkpoint operation in action.
See: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/98a80238-7409-4708-8a7d-5defd9957185.htm for additional information on what activities cause a checkpoint.
How often do...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 12, 2008 at 5:48 pm
snow_rose_87 (5/11/2008)
i wanna select 2 characters from this record in a table to a combo box
10073010002
10072010012
10063020001
10083010001
how...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
May 11, 2008 at 9:45 pm
Viewing 15 posts - 6,601 through 6,615 (of 6,676 total)