Консультация № 140592
23.07.2008, 21:30
0.00 руб.
0 3 2
Здравствуйте!
На ПК был устаговлен WINDOWS2003 SERVER, SQL2005 SERVER, 1С:"Бухгалтерия". После создания домена , при запуске 1С , во время верификации процедур 555, стало выходить сообщение:
SQL State: 42000
Native: 7202
Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Не удалось найти сервер "NORDCOM_BER"(НАЗВАНИЕ НАШЕГО СЕРВЕРА) в таблице sysservers. Выполните sp_addlinkedserver, чтобы добавить сервер в таблицу sysservers.
Вопрос, как и где выполнить комманду sp_addlinkedserver? В SQL я полный профан. Помогите пожалуйста кто чем может.

Обсуждение

Неизвестный
24.07.2008, 07:57
общий
это ответ
Здравствуйте, KuchumHan!
Версия 1с 7.7 плохо работает с sql 2005. Поэтому когда создаете базу на сервере Compatiblity level должно быть sql server 2000(80) это устанавливается в свойствах базы данных(по умалчанию сервер устанавливает 90). Владельцем базы данных должен быть тот логин под которым Вы подключаетесь к серверу из 1с. И самое главное при подключении из 1с выйти из менеджера SQL т.к. 1с требует только единственное подключение.
По поводу хранимой процедуры sp_addlinkedserver не знаю для чего 1с ее требует т.к. это создание связи между связанными серверами.
На всякий случай высылаю справку.

Приложение:
Updated: 1 February 2007

Creates a linked server. A linked server allows for access to distributed, heterogeneous queries against OLE DB data sources. After a linked server is created by using sp_addlinkedserver, distributed queries can be run against this server. If the linked server is defined as an instance of SQL Server, remote stored procedures can be executed.

Transact-SQL Syntax Conventions

Syntax

sp_addlinkedserver [ @server= ] 'server' [ , [ @srvproduct= ] 'product_name' ]
[ , [ @provider= ] 'provider_name' ]
[ , [ @datasrc= ] 'data_source' ]
[ , [ @location= ] 'location' ]
[ , [ @provstr= ] 'provider_string' ]
[ , [ @catalog= ] 'catalog' ]


Arguments
[ @server = ] 'server'
Is the name of the linked server to create. server is sysname, with no default.

[ @srvproduct = ] 'product_name'
Is the product name of the OLE DB data source to add as a linked server. product_name is nvarchar(128), with a default of NULL. If SQL Server, provider_name, data_source, location, provider_string, and catalog do not have to be specified.

[ @provider = ] 'provider_name'
Is the unique programmatic identifier (PROGID) of the OLE DB provider that corresponds to this data source. provider_name must be unique for the specified OLE DB provider installed on the current computer. provider_name is nvarchar(128), with a default of NULL; however, if provider_name is omitted, SQLNCLI is used. SQLNCLI is the SQL Native Client OLE DB provider. The OLE DB provider is expected to be registered with the specified PROGID in the registry.

[ @datasrc = ] 'data_source'
Is the name of the data source as interpreted by the OLE DB provider. data_source is nvarchar(4000). data_source is passed as the DBPROP_INIT_DATASOURCE property to initialize the OLE DB provider.

[ @location = ] 'location'
Is the location of the database as interpreted by the OLE DB provider. location is nvarchar(4000), with a default of NULL. location is passed as the DBPROP_INIT_LOCATION property to initialize the OLE DB provider.

[ @provstr = ] 'provider_string'
Is the OLE DB provider-specific connection string that identifies a unique data source. provider_string is nvarchar(4000), with a default of NULL. provstr is either passed to IDataInitialize or set as the DBPROP_INIT_PROVIDERSTRING property to initialize the OLE DB provider.

When the linked server is created against the SQL Native Client OLE DB provider, the instance can be specified by using the SERVER keyword as SERVER=servernameinstancename to specify a specific instance of SQL Server. servername is the name of the computer on which SQL Server is running, and instancename is the name of the specific instance of SQL Server to which the user will be connected.

Note:
To access a mirrored database, a connection string must contain the database name. This name is necessary to enable failover attempts by the data access provider. The database can be specified in the @provstr or @catalog parameter. Optionally, the connection string can also supply a failover partner name. For more information, see Making the Initial Connection to a Database Mirroring Session.



[ @catalog = ] 'catalog'
Is the catalog to be used when a connection is made to the OLE DB provider. catalog is sysname, with a default of NULL. catalog is passed as the DBPROP_INIT_CATALOG property to initialize the OLE DB provider. When the linked server is defined against an instance of SQL Server, catalog refers to the default database to which the linked server is mapped.

Return Code Values
0 (success) or 1 (failure)

Result Sets
Неизвестный
24.07.2008, 08:02
общий
это ответ
Здравствуйте, KuchumHan!
Откройте SQL Server Enterprise Manager и проверьте, зарегистрирован ли Ваш сервер в группе SQL Server Group. Если нет, то выполните его регистрацию (правой кнопкой на SQL Server Group - New SQL Server Registration...).
Если Ваш сервер зарегистрирован, тогда необходимо выполнить хранимую процедуру sp_addlinkedserver. Для этого откройте SQL Query Analyzer, наберите следующую команду:
USE master
GO
EXEC sp_addlinkedserver @server='NORDCOM_BER', @srvproduct='',
@provider='SQLOLEDB', @datasrc='LocalServer'
GO
Значения параметров могут быть другими. Очень подробно о применении этой процедуры написано в SQL Server Books Online (в том же SQL Query Analyzer - HELP - Transact-SQL help...). Мне на на практике не приходилось использовать эту процедуру, на надеюсь, что помог Вам хоть чем-нибудь.
Удачи!

Неизвестный
24.07.2008, 12:21
общий
всё стало видится, но.............выходит сообщение другое:

SQL State: 42000
Native: 7411
Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Сервер "Name server" не настроен для data acces.
Форма ответа