June 7, 2011 at 7:46 am
I figured out
Thank you
June 7, 2011 at 8:19 am
Krasavita (6/7/2011)
Can someone please explain this codefor me, this code is under sql jobs and selected under certain db and I don't understand why, it is under user db and not under master.Thank you
That code just checks to see if a file named SQLExtract_DONOTTOUCH.txt exists in the specified path.
Then, if the file exists, it renames the file.
I would normally expect some sort of an import process to happen next - are there parts of the code missing?
-Ki
June 7, 2011 at 8:45 am
But
June 7, 2011 at 9:14 am
there's more to the job than you posted...this is all that was in the docx file you posted:
set nocount on
declare @ppdate datetime
declare @sqlcmd nvarchar(4000)
declare @cmdTxt nvarchar(4000)
DECLARE @i int
EXEC master..xp_fileexist '\\YourServerPath\SQLExtract_DONOTTOUCH.txt', @i out
IF @i = 1
begin
exec master..xp_cmdshell 'rename \\YourServerPath\SQLExtract_DONOTTOUCH.txt SQLExtract_Complete.txt'
end
there's no code in THAT that references anything in a specific database...so as Kiara said, your not providing us with everything to diagnose the issue.
I'd bet there is more code or an additional step that looks for a specific table in a specific database, that you took offline,s o it cannot work any more....
[/code]
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply