Viewing 15 posts - 106 through 120 (of 907 total)
The %username% produces the following error if run through sql agent:
Login failed for user '%username%'.
But works if run through xp_cmdshell.
So basically I'm guessing no environment variables get replaced with there...
December 29, 2003 at 9:57 am
It returns the computer name on which the command runs. Why are you asking?
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here:...
December 29, 2003 at 8:59 am
No, not running this on a cluster.
Thanks for the solution, that would work, as well as the one provided by mccork.
Really I was wondering if anyone know why...
December 29, 2003 at 7:57 am
Wonder why starting a new shell makes a difference in a SQL Agent job?
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here: http://www.sqlservercentral.com/bestof/
Need...
December 24, 2003 at 7:32 am
Here is an article I wrote that might give you another method of scripting login migrations:
http://www.sqlservercentral.com/columnists/glarsen/migratingloginstoanotherserver.asp
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy...
December 23, 2003 at 12:21 pm
Think you want something like this:
create table t1(c1 int, c2 char(5), c3 char(5))
insert into t1 values(1, '0100T', '9999T')
insert into t1 values(2, '00000', '09999')
insert into t1 values(3, '10000', '69999')
select * from...
December 18, 2003 at 1:54 pm
oops. found a bug, try this one:
----------------------------------------------------------------
-- Display average row size for each table in a database
-- Author: Greg Larsen Date: 12/18/2003
----------------------------------------------------------------
set nocount on
declare @old_tname varchar(100)
declare...
December 18, 2003 at 1:15 pm
Sorry about that blank post. Ok took a stab at creating the Average Records Length query. I use the information in sp_spaceused to calculate the average. ...
December 18, 2003 at 1:10 pm
quote:
I'm looking for a tool that would calculate the min, max and average row size of a table. This tool would...
December 18, 2003 at 12:37 pm
More information about the book can be found here:
http://www.sqlservercentral.com/bestof/
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here: http:www.sqlservercentral.com/bestof/purchase.asp
Need SQL Server Examples check out...
December 18, 2003 at 9:29 am
When you do a point in time restore the database will be restored to that point in time. Now if you can identify the corrupted transaction and the data...
December 18, 2003 at 7:24 am
Now there is a bold suggestion. Would you consider deleting records manually for a system table as a "good practice" or one of those "bad practices".
My normal...
December 17, 2003 at 2:22 pm
Might try something like this:
select substring(convert(char(30),getdate(),109),13,8) +
' ' + substring(convert(char(30),getdate(),109),25,2)
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a...
December 17, 2003 at 1:11 pm
Some other options for doing what you want can be found my article posted here:
http://www.sqlservercentral.com/columnists/glarsen/sequentialnumbering.asp
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here:...
December 17, 2003 at 1:04 pm
You might also look into using the "Batch Requests/sec" in smaster..sysperfinfo table
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here: http:www.sqlservercentral.com/bestof/purchase.asp
Need SQL Server...
December 17, 2003 at 10:36 am
Viewing 15 posts - 106 through 120 (of 907 total)