Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JamesLean

    Error running batch file in scheduled task

    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...
  2. JamesLean

    Error running batch file in scheduled task

    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...
  3. JamesLean

    Odd behaviour - remote query timeout

    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...
  4. JamesLean

    Pipe character in SMTP addresses

    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...
  5. JamesLean

    Deleting large amount of files

    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
  6. JamesLean

    Deleting large amount of files

    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...
  7. JamesLean

    Replication and new tables

    If you add the new table to the existing publication then the snapshot agent will only snapshot that new table, not all the existing ones. --James
  8. JamesLean

    Stored Procedure help

    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
  9. JamesLean

    How to detach System DB in SQL 2000

    No, you cannot just detach the system dbs. What are you actually trying to achieve? --James
  10. JamesLean

    xp_cmdshell

    You need to check the permissions for the SQL Server service account as this is the context that xp_cmdshell runs under. --James
  11. JamesLean

    xp_cmdshell

    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
  12. JamesLean

    System table map not working

    Excellent - exactly what I needed! FYI, I just had to right-click the .chm file and click "unblock". --James
  13. JamesLean

    how to tell if db is in standby

    Use this: SELECT DATABASEPROPERTYEX('mydb', 'IsInStandBy') --James
  14. JamesLean

    System table map not working

    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...
  15. JamesLean

    MULTIPLYING BY A STOCK NUMBER

    SELECT SUM(price * stock) AS sumofprice FROM products --James
  16. JamesLean

    Triming Data

    Try this then: SELECT SUBSTRING(col, 3, LEN(col) - 3) --James
  17. JamesLean

    Triming Data

    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
  18. JamesLean

    select top not working

    Yes --James
  19. JamesLean

    select top not working

    Bingo! The TOP keyword is invalid in SQL 6.5. If possible, you should change the compat level to 80 to take advantage of full SQL 2000 syntax. --James
  20. JamesLean

    select top not working

    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

Part and Inventory Search

Back
Top