Viewing 15 posts - 16 through 30 (of 30 total)
sqldmo example. i got some kind of null error. probably pretty easy to fix, but i just tossed some error resume statements in there
strServer = inputbox("enter server name")
strDatabase = inputbox("enter...
April 28, 2005 at 4:02 pm
you simply need to put the popd command in there.
if you wanted to do something like... get the current drive mapping (the one that was mapped by pushd) ,...
April 28, 2005 at 1:26 pm
'display all db sizes in mb for a server
Option Explicit
dim objDB
with CreateObject("SQLDMO.SQLServer")
.LoginSecure = TRUE
.Connect "."
for each objDB in .Databases
wscript.echo objDB.Name & vbtab & objDB.Size
next
end with
April 27, 2005 at 8:36 am
or a possibly faster route may be to create a dts package that performs all your dumps in parallel to seperate files, then have a script merge them all together...
April 27, 2005 at 8:23 am
how does your 'quick and dirty' vbscript perform the operation?
you could use a 'for xml' query to get xml data out into an ado stream and write it to a...
April 27, 2005 at 8:19 am
not sure why the ')' all show up as smileys.
April 26, 2005 at 4:58 pm
Here's my script:
select
so.id as [OBJECT_ID],
so.name as [OBJECT_NAME],
coalesce(j_rows.rows,0) as [ROWCOUNT],
coalesce(j_ru.sum_reserved,0) * cast(m.low as dec) / 1024 as [RESERVED (KB)],
d.data * cast(m.low as dec) / 1024 as [DATA (KB)],
(coalesce(j_ru.sum_used,0) - d.data) *...
April 26, 2005 at 4:56 pm
xp_cmdshell 'net use \\server\share password /user:domain\user & copy \\server\share\* c:\wherever & net use \\server\share /d'
not good practice, but if you need to do it once. it works fine.
April 26, 2005 at 3:40 pm
in dts you would just create a source and destination text file. then create a transform task between them. then you can perform whatever actions you need on a column...
April 26, 2005 at 3:33 pm
assuming you have to analyze the query results given, dynamic sql is your friend. there may be a better way to get the numbers you want if you posted the...
April 14, 2005 at 5:14 pm
have the dts package dynamically add the sql script in to drop and refresh the triggers.
this function returns the drop and create sql for all triggers on a table. if...
April 13, 2005 at 9:26 am
assuming nothing else needs to change but the connections with a datasource of "oldservername" the following might do what you want.
strPackageName = "my package name"
arrServerNames = array("s1","s2","s3","s4")
for each strServerName in...
April 13, 2005 at 8:37 am
gzip is free.
exec master.dbo.xp_cmdshell 'gzip -d ... file'
exec master.dbo.xp_cmdshell 'bcp ... file'
April 13, 2005 at 8:21 am
I believe it would technically need to be a between statement to ensure that there are no future dates included in the query.
ie. BETWEEN DATEADD(m,-6,DATEDIFF(d,0,GETDATE())) AND GETDATE()
if you want todays...
April 12, 2005 at 4:37 pm
and yet another way. get the values from whatever and just call the sub. Don't forget to add the success constant to the main function. I've always been partial to datediff.
'Strict
Option...
April 7, 2005 at 8:30 pm
Viewing 15 posts - 16 through 30 (of 30 total)