Interesting. I've added a "net use" to the top of the batch file and it does indeed now work, thanks.
However, I don't quite understand why this is needed. All three servers involved in this setup (two that are running sync script and one that they are syncing from) are on the same workgroup...
On a server running Windows Server 2003 SP2 I have a simple one line batch file that syncs the local time with a remote server:
net time \\172.20.49.10 /set /y
I can run this manually and it works fine. However, I have set up a scheduled task to run this file and it consistently fails with...
I'm experiencing some odd behaviour with a remote procedure call and was just wondering whether anyone could shed any light on it?
I have a job on ServerA that has a step which calls a proc on linked ServerB:
EXEC ServerB.MyDB.dbo.MyProc
Occasionally this step fails with the error:
Could not...
I wonder if anyone can shed any light on this seemingly strange "feature"?
We have recently started receiving spam emails through to various users where the email address is prepended with a pipe character (|), eg:
|my.user@myco.com
Because of this character the messages are being allowed...
Sorry, the key point of the question was that I only want to delete files older than 1 month. AFAIK the del command can't filter by date.
I was wondering whether anyone had a batch file or other script that could do this?
--James
I have a folder on a Windows 2003 SP2 server which has a large amount of files in it, probably a couple of hundred thousand, going back over a few years. I am trying to delete all the old files and just keep one month's worth.
If I try and just open the folder in explorer it just hangs. Does...
SET IDENTITY_INSERT test2.dbo.Department_Info ON
INSERT test2.dbo.Department_Info
select * from Department_Info where Is_Live = 1
SET IDENTITY_INSERT test2.dbo.Department_Info OFF
--James
You should see what's wrong if you look at the output when you print @cmd. The @cmd variable is too short so the filename is being truncated. Declare @cmd as varchar(150) and it should be fine.
--James
Has anyone else encountered a problem with the system table map help file, available at:
http://www.microsoft.com/sql/techinfo/productdoc/2000/systables.mspx
This is a very useful help file which displays the system tables in a graphical format.
I have downloaded the systbl.chm file but when...
What are the rules for which info you want to extract? From your example it could be "take off the first two digits and the last digit" or it could be "take 9 digits starting from the third digit".
--James
What version of SQL Server are you using?
What compatibility level is your database set at?
Chances are, the answer to one/both of these question is 6.5 - which means TOP is invalid.
--James
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.