Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Автозапуск SQLServerAgent под Win98 (Desktop) - как ? / 4 сообщений из 4, страница 1 из 1
17.05.2002, 06:49:08
    #32030491
БезИмени
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автозапуск SQLServerAgent под Win98 (Desktop) - как ?
Как это можно сделать (подчеркиваю - из Windows 9x) ?
...
Рейтинг: 0 / 0
17.05.2002, 07:28:24
    #32030499
Glory
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автозапуск SQLServerAgent под Win98 (Desktop) - как ?
Только из командной строки

sqlagent -c [-v]

Arguments-c

Indicates that SQL Server Agent is running from the command prompt and is independent of the Windows NT Service Control Manager. When -c is used, SQL Server Agent cannot be controlled from either the Services application in Control Panel or SQL Server Service Manager.

-v

Indicates that SQL Server Agent runs in verbose mode and writes diagnostic information to the command-prompt window. The diagnostic information is the same as the information written to the SQL Server Agent error log.
...
Рейтинг: 0 / 0
17.05.2002, 10:04:59
    #32030522
БезИмени
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автозапуск SQLServerAgent под Win98 (Desktop) - как ?
Это я знаю, но все равно спасибо.
...
Рейтинг: 0 / 0
22.05.2002, 15:01:07
    #32030997
Glory
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автозапуск SQLServerAgent под Win98 (Desktop) - как ?
Если еще актуально, то данный скрипт создает процедурe, которая будет стартовать при запуске сервера и в свою очередь запускать SQLServerAgent

\nuse master
go
if exists (select * from sysobjects where id = object_id(N'[dbo].[sp_autostart_sqlagent]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_autostart_sqlagent]
GO
SET QUOTED_IDENTIFIER OFF
SET ANSI_NULLS ON
GO
create procedure dbo.sp_autostart_sqlagent
as
declare @retcode int
declare @local int

exec @retcode = sp_OACreate 'SQLDMO.SqlServer', @local OUT
if @retcode<>0
return -1

EXEC @retcode = sp_OAMethod @local, 'Connect', NULL, '(local)'
if @retcode<>0
return -1

declare @js int
EXEC @retcode = sp_OAMethod @local,'JobServer' , @js OUT
return -1

EXEC @retcode = sp_OAMethod @js,'Start'
if @retcode<>0
return -1

return 0
GO
SET QUOTED_IDENTIFIER OFF
SET ANSI_NULLS ON
GO
exec master..sp_procoption 'sp_autostart_sqlagent','startup',true
go
...
Рейтинг: 0 / 0
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Автозапуск SQLServerAgent под Win98 (Desktop) - как ? / 4 сообщений из 4, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]