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...
Gregory A. Larsen, MVP
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:...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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. ...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
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:...
Gregory A. Larsen, MVP
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...
Gregory A. Larsen, MVP
December 17, 2003 at 10:36 am
Viewing 15 posts - 106 through 120 (of 907 total)