Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2004.08.29;
Скачать: [xml.tar.bz2];

Вниз

MSSQL 2000 Не могу добавить поле в таблицу из-за репликации   Найти похожие ветки 

 
KAA   (2004-08-04 11:46) [0]

Есть база, которая реплицируется на другой сервер, вернее там сделана репликация, но в данный момент она не запущена. В одной из таблиц мне понадобилось добавить текствовое поле, но он сохраняет новую таблицу только если длина поля будет 50 символов (не больше не меньше), и это поле будет последним в таблице. В противном случае выдает ошибку:
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table "dbo.Descript" because it is being used for replication.В чем может быть проблема? Как изменить таблицу?


 
Nikolay M. ©   (2004-08-04 12:08) [1]

Попробуй порыться в
http://www.mcse.ms/archive95-2004-5.html
Еще, возможно, не хватает прав у подписчика для пересоздания таблицы?
И вот выдрано с одного форума, суть сводится к тому, что репликацию таки придется пересоздавать:

Unable to drop a table even after removing replication. I"m getting the following errors, when I try to drop or alter the table:
Server: Msg 3724, Level 16, State 2, Line 1
Cannot drop the table "t1" because it is published for replication.
Server: Msg 4931, Level 16, State 1, Line 1
Cannot add columns to table "t1" because it is being published for merge replication.
Is there a way out?

To avoid this situation, you should always remove replication in the following order:

- Delete the subscriptions
- Delete the publications
- Disable publishing

Deleting publications without unsubscribing or disabling publishing without deleting publications results in this situation.

Anyways, if you are seeing the above mentioned errors, try any or all of the below workarounds one after another in the order described below.

1. EXEC sp_removedbreplication "your_database_name"

2. Execute the following procedure on the problematic database and pass the table name as the parameter:

EXEC sp_msunmarkreplinfo "your_table_name"

3. You may not need this method, but take this as a last resort.

EXEC sp_configure "allow",1
go
reconfigure with override
go
use your_database_name
go
update sysobjects set replinfo = 0 where name = "your_table_name"
go
EXEC sp_configure "allow",0
go
reconfigure with override
go

NOTE: If you don"t follow the proper replication removal order, you may see the same problem with replicated stored procedures!

(Same problem can occur with replicated stored procedures)



Страницы: 1 вся ветка

Форум: "Базы";
Текущий архив: 2004.08.29;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.041 c
3-1091519205
Labert
2004-08-03 11:46
2004.08.29
OCI, Parse, Prepare, курсоры и т.п.


1-1092402136
Лёня
2004-08-13 17:02
2004.08.29
Функция GetCurrentThread


4-1089823106
webpauk
2004-07-14 20:38
2004.08.29
WM_MENUSELECT


6-1087489328
NLO
2004-06-17 20:22
2004.08.29
ICQ Server


14-1092054589
gn
2004-08-09 16:29
2004.08.29
В Японии хотят сделать SMS-игру «Ночной дозор»





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский