Wednesday, March 21, 2012
POSTING AGAIN Transaction Replication - Identity column
I am using transaction replication and the identity column is not included
for replication.
After creating the snapshot, i manually copying the data through stored
procedure from publishing database to subscription database. Then,if we run
the distribution agent,i am getting the following error. what will be the
process involved in applying the initial snapshot since i have already
copied the data. Will SQL server do bcp again? How can i avoid it?
Error Message: The process could not bulk copy into table '"hsassbtr"'.
Error Details:
Numeric value out of range
(Source: INFOSYS6 (ODBC); Error number: 22003)
Numeric value out of range
(Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
Unexpected EOF encountered in BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
key in object 'hsassbtr'.
(Source: INFOSYS6 (Data source); Error number: 2627)
Aritcle is added as follows:
--added all the columns
exec sp_articlecolumn @.publication = 'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = NULL,
@.operation = N'add',
@.force_invalidate_snapshot = 1
--dropped identity('DEX_ROW_ID') columns
exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = N'DEX_ROW_ID',
@.operation = N'drop',
@.force_invalidate_snapshot = 1
I have created the subscription as follows:
exec sp_addpullsubscription
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.independent_agent = N'true',
@.subscription_type = N'anonymous',
@.description = N'InfoSys POC Setup Table Publication',
@.update_mode = N'read only',
@.immediate_sync = 1
exec sp_addpullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.distributor = @.distributor,
@.subscriber_security_mode = @.security_mode,
@.distributor_security_mode = @.security_mode,
@.frequency_type = 8, --Weekly
@.frequency_interval = 1, --Sunday
@.frequency_recurrence_factor = 1, --Every Week
@.frequency_subday = 1, --Once a Day
@.active_start_time_of_day = 220000, --10 PM
@.enabled_for_syncmgr = N'false',
@.use_ftp = N'false',
@.publication_type = 0,
@.offloadagent = N'false'
Any help?
Thanks,
Vijay
Can you check and make sure the subscribing table is empty?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Vijay" <vijay@.infosysusa.com> wrote in message
news:OEiWoNSkFHA.2852@.TK2MSFTNGP15.phx.gbl...
Hi,
I am using transaction replication and the identity column is not included
for replication.
After creating the snapshot, i manually copying the data through stored
procedure from publishing database to subscription database. Then,if we run
the distribution agent,i am getting the following error. what will be the
process involved in applying the initial snapshot since i have already
copied the data. Will SQL server do bcp again? How can i avoid it?
Error Message: The process could not bulk copy into table '"hsassbtr"'.
Error Details:
Numeric value out of range
(Source: INFOSYS6 (ODBC); Error number: 22003)
Numeric value out of range
(Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
Unexpected EOF encountered in BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
key in object 'hsassbtr'.
(Source: INFOSYS6 (Data source); Error number: 2627)
Aritcle is added as follows:
--added all the columns
exec sp_articlecolumn @.publication = 'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = NULL,
@.operation = N'add',
@.force_invalidate_snapshot = 1
--dropped identity('DEX_ROW_ID') columns
exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = N'DEX_ROW_ID',
@.operation = N'drop',
@.force_invalidate_snapshot = 1
I have created the subscription as follows:
exec sp_addpullsubscription
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.independent_agent = N'true',
@.subscription_type = N'anonymous',
@.description = N'InfoSys POC Setup Table Publication',
@.update_mode = N'read only',
@.immediate_sync = 1
exec sp_addpullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.distributor = @.distributor,
@.subscriber_security_mode = @.security_mode,
@.distributor_security_mode = @.security_mode,
@.frequency_type = 8, --Weekly
@.frequency_interval = 1, --Sunday
@.frequency_recurrence_factor = 1, --Every Week
@.frequency_subday = 1, --Once a Day
@.active_start_time_of_day = 220000, --10 PM
@.enabled_for_syncmgr = N'false',
@.use_ftp = N'false',
@.publication_type = 0,
@.offloadagent = N'false'
Any help?
Thanks,
Vijay
|||Vyas,
Subscribing table has data because i have manually copied the data through
stored procedure from Publising database.
Thanks,
Vijay
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:OFnpAcSkFHA.3256@.TK2MSFTNGP12.phx.gbl...
> Can you check and make sure the subscribing table is empty?
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Vijay" <vijay@.infosysusa.com> wrote in message
> news:OEiWoNSkFHA.2852@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I am using transaction replication and the identity column is not
included
> for replication.
> After creating the snapshot, i manually copying the data through stored
> procedure from publishing database to subscription database. Then,if we
run
> the distribution agent,i am getting the following error. what will be the
> process involved in applying the initial snapshot since i have already
> copied the data. Will SQL server do bcp again? How can i avoid it?
>
> Error Message: The process could not bulk copy into table '"hsassbtr"'.
> Error Details:
> Numeric value out of range
> (Source: INFOSYS6 (ODBC); Error number: 22003)
> ----
--
> --
> Numeric value out of range
> (Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
> ----
--
> --
> Unexpected EOF encountered in BCP data-file
> (Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
> ----
--
> --
> Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
> key in object 'hsassbtr'.
> (Source: INFOSYS6 (Data source); Error number: 2627)
> ----
--
> --
> Aritcle is added as follows:
> --added all the columns
> exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
> @.article = @.table_name,
> @.column = NULL,
> @.operation = N'add',
> @.force_invalidate_snapshot = 1
> --dropped identity('DEX_ROW_ID') columns
> exec sp_articlecolumn @.publication =
> 'InfoSys_Point_of_Care_Master_Tables',
> @.article = @.table_name,
> @.column = N'DEX_ROW_ID',
> @.operation = N'drop',
> @.force_invalidate_snapshot = 1
>
> I have created the subscription as follows:
> exec sp_addpullsubscription
> @.publisher = @.publisher,
> @.publisher_db = @.publisher_db,
> @.publication = N'InfoSys_Point_of_Care_Master_Tables',
> @.independent_agent = N'true',
> @.subscription_type = N'anonymous',
> @.description = N'InfoSys POC Setup Table Publication',
> @.update_mode = N'read only',
> @.immediate_sync = 1
> exec sp_addpullsubscription_agent
> @.publisher = @.publisher,
> @.publisher_db = @.publisher_db,
> @.publication = N'InfoSys_Point_of_Care_Master_Tables',
> @.distributor = @.distributor,
> @.subscriber_security_mode = @.security_mode,
> @.distributor_security_mode = @.security_mode,
> @.frequency_type = 8, --Weekly
> @.frequency_interval = 1, --Sunday
> @.frequency_recurrence_factor = 1, --Every Week
> @.frequency_subday = 1, --Once a Day
> @.active_start_time_of_day = 220000, --10 PM
> @.enabled_for_syncmgr = N'false',
> @.use_ftp = N'false',
> @.publication_type = 0,
> @.offloadagent = N'false'
> Any help?
>
> Thanks,
> Vijay
>
>
|||Why did you copy data manually, when you are configuring replication with
automatic sync?
You should either subscrine with nosync option or delete the data from
subscriber before the snapshot is applied (if the snapshot is not configure
to truncate/delete table).
If there are any special requirements for this subscriber, pelase post the
complete info, and someone will be able to assist.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Vijay" <vijay@.infosysusa.com> wrote in message
news:uHJ%23ZgSkFHA.708@.TK2MSFTNGP09.phx.gbl...
> Vyas,
> Subscribing table has data because i have manually copied the data through
> stored procedure from Publising database.
> Thanks,
> Vijay
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:OFnpAcSkFHA.3256@.TK2MSFTNGP12.phx.gbl...
> included
> run
> --
> --
> --
> --
> 'InfoSys_Point_of_Care_Master_Tables',
>
Wednesday, March 7, 2012
possible to connect to SQL Server Mobile database
Is it possible to have a Windows applications (based on .NET Framework 2.0) connect to a SQL Server Mobile database?
I manually added the the System.Data.SqlServerCe.dll (retrieved from C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\\SQL Server\Mobile\v3.0\System.Data.SqlServerCe.dll) to my Windows Form project. When I start the app, it gives me an error message:
{"Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"}
TIA
K. I got this to work.
My problem was that I did not reference the dll from the correct location. The correct location of the SqlServerCe dll to reference is "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\System.Data.SqlServerCe.dll"
|||Thank god i found this, i tried what was said in
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=284483&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=367019&SiteID=1
that didnt work for we, some how it worked for other ppl it seems.
anyway, Thanks
|||Dear Stormin,
I took the dll from the right location as you specified. But now I get another error Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
|||Hi all,
I have been searching for weeks now trying to solve the same problem. I wrote a desktop application- and I waqnt this desktop application to access a sdf database. The correct system.data.SqlServerCe.dll is correctly referenced and it still gives me a "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error. If I can open the database from within the Dev environment and edit it from there, why can no one come up with a solution to this problem?
|||Have you installed the SQL CE runtime components on the machine? Have you tried to include all the SQL CE dlls with your app?|||Copy all seven sqlce...dll files from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE over to SYSTEM32 folder. This solved the problem for me. Check out the following link for details.
http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx
possible to connect to SQL Server Mobile database
Is it possible to have a Windows applications (based on .NET Framework 2.0) connect to a SQL Server Mobile database?
I manually added the the System.Data.SqlServerCe.dll (retrieved from C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\\SQL Server\Mobile\v3.0\System.Data.SqlServerCe.dll) to my Windows Form project. When I start the app, it gives me an error message:
{"Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"}
TIA
K. I got this to work.
My problem was that I did not reference the dll from the correct location. The correct location of the SqlServerCe dll to reference is "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\System.Data.SqlServerCe.dll"
|||Thank god i found this, i tried what was said in
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=284483&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=367019&SiteID=1
that didnt work for we, some how it worked for other ppl it seems.
anyway, Thanks
|||Dear Stormin,
I took the dll from the right location as you specified. But now I get another error Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
|||Hi all,
I have been searching for weeks now trying to solve the same problem. I wrote a desktop application- and I waqnt this desktop application to access a sdf database. The correct system.data.SqlServerCe.dll is correctly referenced and it still gives me a "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error. If I can open the database from within the Dev environment and edit it from there, why can no one come up with a solution to this problem?
|||Have you installed the SQL CE runtime components on the machine? Have you tried to include all the SQL CE dlls with your app?|||Copy all seven sqlce...dll files from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE over to SYSTEM32 folder. This solved the problem for me. Check out the following link for details.
http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx
possible to connect to SQL Server Mobile database
Is it possible to have a Windows applications (based on .NET Framework 2.0) connect to a SQL Server Mobile database?
I manually added the the System.Data.SqlServerCe.dll (retrieved from C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\\SQL Server\Mobile\v3.0\System.Data.SqlServerCe.dll) to my Windows Form project. When I start the app, it gives me an error message:
{"Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"}
TIA
K. I got this to work.
My problem was that I did not reference the dll from the correct location. The correct location of the SqlServerCe dll to reference is "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\System.Data.SqlServerCe.dll"
|||Thank god i found this, i tried what was said in
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=284483&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=367019&SiteID=1
that didnt work for we, some how it worked for other ppl it seems.
anyway, Thanks
|||Dear Stormin,
I took the dll from the right location as you specified. But now I get another error Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
|||Hi all,
I have been searching for weeks now trying to solve the same problem. I wrote a desktop application- and I waqnt this desktop application to access a sdf database. The correct system.data.SqlServerCe.dll is correctly referenced and it still gives me a "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error. If I can open the database from within the Dev environment and edit it from there, why can no one come up with a solution to this problem?
|||Have you installed the SQL CE runtime components on the machine? Have you tried to include all the SQL CE dlls with your app?|||Copy all seven sqlce...dll files from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE over to SYSTEM32 folder. This solved the problem for me. Check out the following link for details.
http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx
possible to connect to SQL Server Mobile database
Is it possible to have a Windows applications (based on .NET Framework 2.0) connect to a SQL Server Mobile database?
I manually added the the System.Data.SqlServerCe.dll (retrieved from C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\\SQL Server\Mobile\v3.0\System.Data.SqlServerCe.dll) to my Windows Form project. When I start the app, it gives me an error message:
{"Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"}
TIA
K. I got this to work.
My problem was that I did not reference the dll from the correct location. The correct location of the SqlServerCe dll to reference is "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\System.Data.SqlServerCe.dll"
|||Thank god i found this, i tried what was said in
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=284483&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=367019&SiteID=1
that didnt work for we, some how it worked for other ppl it seems.
anyway, Thanks
|||Dear Stormin,
I took the dll from the right location as you specified. But now I get another error Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
|||Hi all,
I have been searching for weeks now trying to solve the same problem. I wrote a desktop application- and I waqnt this desktop application to access a sdf database. The correct system.data.SqlServerCe.dll is correctly referenced and it still gives me a "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error. If I can open the database from within the Dev environment and edit it from there, why can no one come up with a solution to this problem?
|||Have you installed the SQL CE runtime components on the machine? Have you tried to include all the SQL CE dlls with your app?|||Copy all seven sqlce...dll files from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE over to SYSTEM32 folder. This solved the problem for me. Check out the following link for details.
http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx