Mssql ошибка 2812

SQL Server 2016 Developer — duplicate (do not use) SQL Server 2016 Enterprise — duplicate (do not use) SQL Server 2016 Enterprise Core — duplicate (do not use) SQL Server 2016 Standard — duplicate (do not use) More…Less

Symptoms

Consider the following scenario:

  • You use Transactional Replication publication environment in the following SQL Server versions:

    • Version before Cumulative Update 3 (CU3) for SQL Server 2016 Service Pack 2 (SP2)

    • Version before Cumulative Update 6 (CU6) for SQL Server 2017

  • You configure this server as a distributor and create a distribution database.

  • You add this server or another server as a publisher to this distributor server, but don’t create publication.

  • Later, you upgrade SQL Server to Cumulative Update 3 for SQL Server 2016 SP2 or later versions, or you upgrade SQL Server to Cumulative Update 6 for SQL Server 2017 or later versions.

In this scenario, when you remove publisher server from distributor, you may receive error messages that resemble the following:

Msg 2812, Level 16, State 62, Procedure sp_dropdistpublisher, Line LineNumber

Could not find stored procedure.

When you enable database for publication, you may receive error messages that resemble the following:

Msg 20028, Level 16, State 1, Procedure ProcedureName, Line LineNumber

The Distributor has not been installed correctly. Could not enable database for publishing.

The replication option ‘publish’ of database ‘DatabaseName‘ has been set to false.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

Resolution

This issue is fixed in the following cumulative updates for SQL Server:

  • Cumulative Update 14 for SQL Server 2017

  • Cumulative Update 6 for SQL Server 2016 SP2

About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

  • Latest cumulative update for SQL Server 2017

  • Latest cumulative update for SQL Server 2016

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

SQL Server 2016 Developer — duplicate (do not use) SQL Server 2016 Enterprise — duplicate (do not use) SQL Server 2016 Enterprise Core — duplicate (do not use) SQL Server 2016 Standard — duplicate (do not use) Еще…Меньше

Проблемы

Рассмотрим следующий сценарий.

  • Подразделение » Y»Использование среды публикации репликации транзакций в следующих версиях SQL Server:

    • Версия, предшествующая накопительному обновлению 3 (CU3) для SQL Server 2016 с пакетом обновления 2 (SP2)

    • Версия, предшествующая накопительному обновлению 6 (CU6) для SQL Server 2017

  • Вы настраиваете этот сервер как распространитель и создаете базу данных распространителя.

  • Вы добавляете этот сервер или другой сервер в качестве издателя на этот сервер распространителя, но не создавайте публикацию.

Нужна дополнительная помощь?

Нужны дополнительные параметры?

Изучите преимущества подписки, просмотрите учебные курсы, узнайте, как защитить свое устройство и т. д.

В сообществах можно задавать вопросы и отвечать на них, отправлять отзывы и консультироваться с экспертами разных профилей.

  • Remove From My Forums
  • Question

  • I had an error free transactional replication running between MSSQL 2000 (pub) and MSSQL 2008 R2 (sub). Because schema changes were disabled, I needed to delete the subscription and publication to add a new column to one of the replicated tables. I recreated
    the publication and added the subscriber. The snapshot was recreated. Now when the distribution agent runs it fails with error 2812. The Distribution DB is on the 2008 R2 box and the subscribers are pull subscriptions.

    I ran a trace on the subscriber and found that the replcmd that was failing is ‘exec sp_MSins_z2t_Activity;2’. NOTE the ‘;2’.

    I review the snapshot data and the replcmd script has CREATE PROCEDURE sp_MSins_z2t_Activity *without* ‘;2’. Hence the subscriber database as sp_MSins_z2t_Activity.

    I deleted and recreated the pub/sub a couple of times with a *new* INS/DEL/UPD cmds and still get a ‘;2’ when the distribution agent runs. I understand the use of the ‘;2’, but it unnecessary.

    So how can I fix this??

    SteveB.


  • September 24, 2010 at 12:37 pm

    #238776

    I am able to run the stored procedure in management studio.

    when i create a dataset in BIDS, the metadata came up, but when i execute the stored procedure in a dataset, its giving me the following error.

    «Could not find stored procedure. SQL Server error 2812»

    Thanks for your help guys.

    Satish

  • Luke L

    SSC-Dedicated

    Points: 35547

    Make sure the user you are using to connect to the database has permissions to that stored procedure. Also, depending on the version of SQL you are using make sure that you’re using the correct owner/schema to call the stored procedure if it’s needed.

    I.E. in 2000 and the owner is not DBO or the user callign the procedure you must specify the owner Exec owninguser.myprocedure

    in 2005+ make sure you are specifying the schema if it’s not in the default schema of the user attempting to execute the procedure.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • SatishAyyar

    SSCrazy

    Points: 2823

    All the permissions are good.Thanks for the reply.

    I found the soultion. Its really crazy, I do not know why and how but it worked.

    I droped the procedure and recreated and it worked like that.

    Thanks

    Satish

  • Luke L

    SSC-Dedicated

    Points: 35547

    Were you the one that originally created the procedure? IF not, and this is a SQL 2000 instance, you were not the owner, therefor you would have needed to specify the owner. Since you dropped and recreated the procedure, you are now the owner and do not need to specify the owner, but other users will need to.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • SatishAyyar

    SSCrazy

    Points: 2823

    I created the sp first and then I gave exec permissions to other person. so the other person got the error which I pasted. we tried and tried but worked only after I recreated the proc. I was the one who created the proc the first time and the second time also.

  • SatishAyyar

    SSCrazy

    Points: 2823

  • Luke L

    SSC-Dedicated

    Points: 35547

    satishseth143 (9/24/2010)


    Its SQL2008

    Thanks for finally posting the version number. Sorry I assumed this was 2000 as that’s what the largest majority of articles I could find on this error number were dealing with. Glad you got it sorted.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

Viewing 7 posts — 1 through 6 (of 6 total)

I ran your code using a table from the AdventureWorks2012 database.

create procedure SEL_STUDENT
as
begin
select * from [Person].[Person]
end
go

execute SEL_STUDENT

And it works fine.

Although I have moved GO above execute SEL_STUDENT that is not the issue here as @CoOl points out because you specifically say you execute the stored procedure after your block of code.

The only possible explanation would be that you are querying execute SEL_STUDENT on the wrong database.

Try the following code —

USE [DatabaseName] 
GO

execute SEL_STUDENT

Here, [DatabaseName] is the database where the stored procedure SEL_STUDENT table is stored.

Make sure your table is also stored in the same database or else you would have to modify select * from student to select * from [DatabaseName].[SchemaName].[student]

Additionally, you can use the Object Explorer to identify where your stored procedure has been saved. I am unable to post a snapshot of how to do this as my reputation is below 10.

EDIT : Now that my reputation is in two digits —

enter image description here

Kindly note that [dbo] is the default schema in SQL Server.

Понравилась статья? Поделить с друзьями:
  • Mssql журнал ошибок
  • Mssql try catch текст ошибки
  • Mssecflt sys windows 10 ошибка при загрузке
  • Mspst32 dll ошибка outlook 2016
  • Mspeech ошибка runtime error 217 at 00692077