LIULIHUA
asked on
Cannot add rows to sysdepends for the current stored procedure
Hi experts,
Is anyone knows what the probolm of this scripts ? It won't executing because "Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'usp_copy'. The stored procedure will still be created."
Please advice. thanks.
/***Copy files***/
USE MASTER
IF OBJECT_ID ('dbo.usp_copy') IS NOT NULL
DROP PROC dbo.usp_copy
GO
CREATE PROCEDURE USP_COPY AS
DECLARE @cmd VARCHAR(5000)
SET @cmd = 'mkdir c:\data\WeeklyData_'+ REPLACE(CONVERT(varchar(11 ),GETDATE( ),100),' ','')
exec master..xp_cmdshell @cmd
set @cmd = 'copy c:\data\FTP_DOWNLOAD\*.zip c:\data\WeeklyData_'+ REPLACE(CONVERT(varchar(11 ),GETDATE( ),100),' ','')
exec master..xp_cmdshell @cmd
set @cmd = 'copy c:\data\FTP_DOWNLOAD\*.Z c:\data\WeeklyData_'+ REPLACE(CONVERT(varchar(11 ),GETDATE( ),100),' ','')
exec master..xp_cmdshell @cmd
EXEC usp_copy
GO
Is anyone knows what the probolm of this scripts ? It won't executing because "Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'usp_copy'. The stored procedure will still be created."
Please advice. thanks.
/***Copy files***/
USE MASTER
IF OBJECT_ID ('dbo.usp_copy') IS NOT NULL
DROP PROC dbo.usp_copy
GO
CREATE PROCEDURE USP_COPY AS
DECLARE @cmd VARCHAR(5000)
SET @cmd = 'mkdir c:\data\WeeklyData_'+ REPLACE(CONVERT(varchar(11
exec master..xp_cmdshell @cmd
set @cmd = 'copy c:\data\FTP_DOWNLOAD\*.zip
exec master..xp_cmdshell @cmd
set @cmd = 'copy c:\data\FTP_DOWNLOAD\*.Z c:\data\WeeklyData_'+ REPLACE(CONVERT(varchar(11
exec master..xp_cmdshell @cmd
EXEC usp_copy
GO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
The problem has been solved, just sapareated each of the command line as a singal sp. thanks.
The problem has been solved, just sapareated each of the command line as a singal sp. thanks.
ASKER
When I call the precedure outside the procedure works, the folder is created and all the files are copied, EXCEPTE it goes loop, the procedure goes nonstop.....