Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

  1. @ECHO OFF
  2. IF EXIST %0.txt (DEL %0.txt)
  3. ECHO Microsoft (R) UDDI Services Database Backup Utility
  4. ECHO Copyright (C) Microsoft Corporation 2003. All rights reserved.
  5. IF '%1%' == '/?' GOTO PARMERROR
  6. SET SERVER=(local)\%1
  7. IF '%SERVER%' == '(local)\' SET SERVER=(local)
  8. SET BACKUPFILE=%~Dp0%uddi.database.bak
  9. IF NOT EXIST %BACKUPFILE% GOTO STARTBACKUP
  10. ECHO Preparing to delete old backup file %BACKUPFILE%
  11. ECHO Press Ctrl-C to cancel...
  12. PAUSE
  13. DEL %BACKUPFILE%
  14. :STARTBACKUP
  15. ECHO Backing up UDDI database on %SERVER%
  16. SET CMDBATCH=BACKUP DATABASE UDDI TO DISK='%BACKUPFILE%'
  17. OSQL -S%SERVER% -E -Q"%CMDBATCH%" -dmaster
  18. GOTO END
  19. :PARMERROR
  20. ECHO Backs up the UDDI database on a local SQL Server / MSDE instance
  21. ECHO -
  22. ECHO Usage:
  23. ECHO uddi.database.backup [instance]
  24. ECHO -
  25. ECHO instance: Instance name of the local MSDE or SQL Server where UDDI is installed
  26. ECHO -
  27. ECHO Note: Brackets indicate optional parameters
  28. ECHO -
  29. ECHO Example 1 (Backs up UDDI Database on local UDDI instance of MSDE or SQL Server):
  30. ECHO uddi.database.backup.cmd UDDI
  31. ECHO -
  32. ECHO Example 2 (Backs up UDDI Database on local default instance of MSDE or SQL Server):
  33. ECHO uddi.database.backup.cmd
  34. ECHO -
  35. :END
  36. ECHO Run %0% /? for help