I also have another 2 servers that can copy 100 packages between each
other in seconds:
DECLARE @srcServer as VARCHAR(24) -- Source server name
DECLARE @destServer VARCHAR(24) -- Destination server name
DECLARE @srcUser VARCHAR(24) -- SQL Server login used to connect
to the source server
DECLARE @srcPassword VARCHAR(24) -- Password of the SQL Server login
on the source server
DECLARE @destUser VARCHAR(24) -- SQL Server login used to connect
to the destination server
DECLARE @destPassword VARCHAR(24) -- Password of the SQL Server login
on the destination server
DECLARE @SQL VARCHAR(4096)
SET @destServer = 'SERVER2'
SET @srcServer = 'SERVER1'
SET @srcUser = ''
SET @srcPassword = ''
SET @destUser = ''
SET @destPassword = ''
DECLARE curExecSQL Cursor
FOR
-- Copy SSIS packages
select 'EXEC [master].[sys].[xp_cmdshell] ''dtutil /Quiet /COPY SQL;'
+
case foldername when '' then '"' + [name] + '"' else '"' + foldername
+ '\' + [name] + '"' end
+ ' /SQL ' + case foldername when '' then '"' + [name] + '"' else '"'
+ foldername + '\' + [name] + '"' end
+ ' /SOURCESERVER ' + @srcServer
+ case @srcUser when '' then '' else ' /SourceUser ' + @srcUser + ' /
SourcePassword ' + @srcPassword end
+ ' /DESTSERVER ' + @destServer
+ case @destUser when '' then '' else ' /DestUser ' + @destUser + ' /
DestPassword ' + @destPassword end + ''''
from
msdb.dbo.sysdtspackages90 pkg join msdb.dbo.sysdtspackagefolders90
fld
on pkg.folderid = fld.folderid
OPEN curExecSQL
Fetch NEXT FROM curExecSQL INTO @SQL
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'Executing' + CHAR(10) + @SQL + CHAR(10) + '---------------'
EXEC(@SQL)
FETCH NEXT FROM curExecSQL INTO @SQL
END
CLOSE curExecSQL
DEALLOCATE curExecSQL
GO
I am not sure why this should take so long.
Have you checked that the routing and network performance between the two
servers is not an issue?
If you created a batch file from the script how long does that take to run
from a command prompt?
Are you short of resources for processes other than SQL Server?
John
Zero load on two 16-way box each with 128GB of RAM, both in the same
switch. I have tried copying and pasting the commands outside the
cursor and I get the same performance; about 1 min 45 seconds per
transfer. Also, both server pack 3 (Build 4.0.4035).
Erik
"Erik G" <in...@onlyhd.tv> wrote in message
news:14c39068-8426-4ee1...@u16g2000pru.googlegroups.com...
Hi Erik
How does SQLCMD perform?
Have you tried a tracert and ping to determine network performance?
John
Thanks
Erik
That sounds like the network is ok?
An time it takes to connect with SQLCMD?
Has the machine changed name?
John