Preserve ROWGUID Column During Publication Delete

Apr 30, 2007

Hello,



I am looking to preserve the ROWGUID column that is created automatically when a table is added to a publication as I have noticed that the column is removed and readded (with new values) each time the publication is deleted and recreated. We are planning on using the values in the rowguid column for a non-replication purpose, and don't wish the column to be removed or the values to be reset in the event the 'owning' publication is dropped for whatever reason. I've done some research and have identified the preserve_rowguidcol column of the sysmergearticles table as a candidate for achieving the desired goal. Before moving forward, I wanted to ask for input regarding this. Are there any best practices I've overlooked on this topic? Neither Google nor this forum's search results yield any real discussion on this topic.



Thanks!



DanD

View 7 Replies


ADVERTISEMENT

Determine Rowguid In Column And Edit Column Information ASP.NET 1.1 C#

Dec 19, 2006

What query should I run? 
1. To determine whether a column is a rowguid or not using C# .NET 1.1
2. To add/modify column information and be able to set/change:
- Primary key
- Column Name
- Data Type
- Length
- Allow Null
- Default value
- Precision
- Scale
- Identity
- Identity Seed
- Identity Increment
- Row guid
 
Thanks a lot!

View 6 Replies View Related

Invalid Column Name 'rowguid'

Nov 29, 2006

Hi all and I appreciate any help

I recently been assigned to a project that has an ms-access front end and sql server 2000 sp4 as the database engine.
The database was replicated (merge replication) but for some reason they drop replication and when they tried to put it back on they got allot of problems and so they paused it.
My task now is to make it work again. After allot of reading I desided to clean the database and start from the beginning. Using some scripts and instructions on a copy of the database I cleaned all the tables related to merge replication but when I went back to ms-access to update a record I got an error
"invalid column name 'rowguid'" . I checked all my tables in my database but I find not such column as it was dropped using the scripts.
Any ideas that I can use?

Thanks allot,
George

View 1 Replies View Related

Invalid Column Name 'rowguid'

Nov 29, 2006

Hi all,

I'm new to replication and database management so I will like some understanding and guiding as this is a new task for me.

I was given a copy of a database with merge replication on it and doing allot of reading and using some scripts I cleaned replication (or so Im thinking) and tryed to use it again on the ms-access front end. When I try to update some data I get "invalid column name 'rowguid'" , but no such column exist in my database as it was dropped.

Any help on this?

thanks George.

View 10 Replies View Related

Invalid Column Name 'rowguid'

Feb 23, 2007

I'm trying to set up a merge publication in MSSQL 2005 SP1.

I have a database which I have successfully made into a merge publication.  When I run the snapshot agent, several articles are processed successfully, then I encounter an error with the following: Invalid column name 'rowguid'

Note that none of the tables contain 'rowguid' columns before this process - I let MSSQL automatically create these as needed.

The replication monitor details the following error:

Error messages:
·          Message: Invalid column name 'rowguid'.
Command Text: sp_MSpublicationview
Parameters:    @publication = RelMS Publication

Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
   at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
   at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
   at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate)
   at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.MakePublicationViews()
   at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoRegularMergeSnapshotPreparations()
   at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoPreArticleFilesGenerationProcessing()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
   at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
   at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 4615)
Get help: http://help/4615
·          Server [XXXXXXXXXX], Level 16, State 1, Procedure , Line 1
Invalid column name 'rowguid'. (Source: MSSQLServer, Error number: 4615)
Get help: http://help/4615
Can anyone shed further light on this?
Thanks.

View 9 Replies View Related

Undesired ROWGUID Column

Sep 30, 2005

Hello Everyone,

View 4 Replies View Related

After Merge Replication - Wanted To Remove Rowguid Column

Jul 28, 2001

Hi all,

After I setup the merge replication in SQL SERVER 7.0, there is a rowguid column (datatype uniqueidentifier) inserted into each table in the both the source and destination database.

I need to get rid of the rowguid column in all tables. I deleted the replication, but the column still existed.

Is there an easy way to get rid of all the rowguid column in the database? Thanks for your reponse in advanced.

View 2 Replies View Related

Delete A Merge Replication Publication

Mar 15, 2007

I tried to drop a merge replication publication and it is giving me an invalid object name dbo.ms_mergeagents message. I tried to drop using:

SSMS
sp_dropmergepublication
sp_replicationdboption

I got the last two from Microsoft KB article 324401. The subscription was never created because it gave another error invalid object_name msmerge_subscriptions. I can create new publications but not drop the existing ones.

Please assist...

View 1 Replies View Related

Invalid Column Name 'rowguid'. Error When Generating Snapshot For Merge Replication SQL Server 2005

May 15, 2007

Hi there,



I have setup merge replication which successfully synchronizes with a group of desktop users using SQL Compact Edition.



However now I have setup Article Filters and when I attempt to regenerate the snapshot I get the following error:



Invalid column name 'rowguid'.

Failed to generate merge replication stored procedures for article 'AssignedCriteria'.



When I look at publication properties at the Articles page.. All my tables have the rowguid uniqueidentifier successfully added to tables and selected as a compulsory published column, apart from the table above "AssignedCriteria".. Even when I attempt to select this column in the article properties page and press ok, when I come back it is deselected again. ( The Rowguid column is however physically added to the table)



I have scripted the publication SQL and then totally reinstalled from scratch, including the database but for some reason it doesn't like this table. I remove the article filters, but still this "rowguid" is never "selected" in article properties.



We are using Uniqueidentifiers in other columns as well for historical reasons, but this doesn't appear to be a problem in other tables..



DDL For this problematic table is as follows



CREATE TABLE [dbo].[AssignedCriteria](

[AssignedCriteria] [uniqueidentifier] NOT NULL,

[CriteriaName] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

[TargetScore] [numeric](5, 0) NULL,

[HRPlan] [uniqueidentifier] NULL,

[ActualScore] [numeric](18, 0) NULL,

[Criteria] [uniqueidentifier] NULL,

[Employee] [uniqueidentifier] NULL,

[IsActive] [bit] NULL,

[addDate] [datetime] NULL,

[totalscore] [numeric](5, 0) NULL,

[isCalc] [bit] NULL,

[Weight] [decimal](18, 2) NULL,

[ProfileDetail] [uniqueidentifier] NULL,

[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [MSmerge_df_rowguid_7FF25DF903B6415FBFF24AC954BC88E4] DEFAULT (newsequentialid()),

CONSTRAINT [PK_AssignedCriteria] PRIMARY KEY CLUSTERED

(

[AssignedCriteria] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



Thanks.



View 5 Replies View Related

Can Not Delet A Publication In SQL Server 2005: The Publication Does Not Exist [SQL Server Error: 20026]

Sep 21, 2007

Hi, everyone,
I am new in SQL server 2005. I had setup SQL server 2005 P2P replication. Somehow it did not work one of two way replication. I tried to delete the publication. However I could not do it. have the same problem. When I tried to delete the publication, I got the publication " " does not exist.[SQL server error: 20026]. I tried to use sp_droppublication, it gave me error "the database is not enabled for publication". Nevertheless, I can see the publication in MS SQL Management Studio and Publication monitor with OK status. I could not find the distribution database either.

Could you anyone has ideas to delete this publication? I am sorry I am not a programmer. Please give me more detail explanation if you can. Thanks.

View 6 Replies View Related

How To Preserve Entire Database

Jul 12, 2005

Hi, I'm a noob who sucks at programming, and sucks even more when it comes to database.

I'm operating a small website with an SQL Server database that drives my shopping cart. I want to close this website down, but I don't want to lose all the data in the database in case I want to do something in the future.

How do you backup the entire database into a file so i might be able to import it at later times? Do I have to do this with SQL, T-SQL, or the manager?

View 3 Replies View Related

Datatypes That Preserve Rich Text

Feb 1, 2007

Hey there - I have a textbox (C# 1.1 OR 2.0) that I want to take it's contents and post to a datatype of some sort in SQL2k5 and have it preserve the breaks (return keystrokes) so when the data is presented, it can hold a paragraph form. Is this possible?something like this: <asp:TextBox id="txtContent" runat="server" TextMode="MultiLine" Rows="10"></asp:TextBox>Right now, I'm using nvarchar(4000) as the datatype but if I were to type, say 3 paragraphs, the data returned in the datagrid I bind that data to shows only one long string of data. For the time being, I have been puttting HTML formatting tags in the content I'm posting to the DB, but ultimately don't want to have to do that. I don't want to have to use a Text Editor (like FTB or FCKeditor) if necessary because they seem very much involved for the simple need I have which is to preserve paragraph formatting.So, is there another datatype in SQL2k5 that I should be using? Or are there simple code snippets I can utilize that will recognize a carriage return as a </p><p> tag?I'm trying to migrate to 2.0 as much as possible, so any C# code would be greatly appreciated in 2.0!Thanks for your help!iSheahan 

View 1 Replies View Related

How To Preserve Users When Restoring A Database

Jul 20, 2005

Hi,I restored a database 2 months ago. After the restore, I lost all my"users" for that database. It has been a while, so I don't rememberthe detail of what I did.How can I reserve all the users when restoring a database from a file?Did I do something wrong?Thank you in advance,Eddy

View 1 Replies View Related

Preserve SQL Format In Query Editor?

Dec 11, 2007

Not exactly a TSQL question. Query Editor in Management Studio keeps reformatting my sql code every time I hit save, making the code much harder to read. Is there a way to preserve line breaks and indentation in the SQL when creating a view? Thanks.

View 1 Replies View Related

How To Delete Data When Column Have Depency With Other Column?

Dec 2, 2007

in Table A Column is 
PriKey             No       Name
1                      1        Apple
2                      2       Orange
3                      3        Juicy
in Table B column is
Prikey             ColumnA           Price
1                         1                     10
2                          3                     2
3                          2                     5
 
TableA.Prikey have Depency with TableB.ColumnA    
 
when I am trying to Delete data from Table A , I got error message becaue the depency
how to delete data when there have depency?
 
I just know when table have trigger , we can disable trigger before delete Data, and enable trigger when data deleted
does there have a way to disable depency and then enable ?
 
thank you

View 14 Replies View Related

Usage Of ROWGUID

Feb 27, 2004

Is it a good Practice to use Rowguid for creating unique identifiers within a table

View 1 Replies View Related

Rowguid/ Uniqueidentifier

Jun 7, 2007

hi. im new in using rowguid, i want to know how long can this datatype can hold. and is there a chance that value can be duplicate or the sql is checking it already before it create a new one.

and what will happen if i select yes in isrowguid.
thnx

View 2 Replies View Related

How Do I Move Data And Preserve Foreign Key Relationships

Feb 21, 2005

How do I move data from one server and append to the same table structure on a second server and preserve the foreign key relationships. In other words TableB.TableA_ID references TableA.ID. The IDENTITY ID numbers themselves will change but they must continue to match up on the destination server the way they did on the source server.

I can do this using procedural programming but that is usually not the way to go.

(btw, this is a cleaned up version of a question I tacked on to another thread)

View 7 Replies View Related

Installing SQLServer2005 But Preserve Current SQLServer2000

Oct 1, 2006

I have a default installation of SQLServer2000 on a host runningWin2003. I want to install SQLServer2005 on the same machine, butpreserve the original SQLServer2000 installation. How do I do this --install into new directory? new directory and named instance? justnew named instance? What stumbling blocks could I run into?

View 2 Replies View Related

T-SQL Create Table Is Rowguid

May 2, 2006

I have the following to create a table in sql server......
CREATE TABLE [dbo].[myTable] (
Id VARCHAR(50) NOT NULL,
fldDate SMALLDATETIME,
guid uniqueidentifier NOT NULL PRIMARY KEY

)
GO
I can't seem to find the right syntax to make the uniqueidentifier a rowguid.
Thanks,
Zath

View 1 Replies View Related

@@identity Equivilant With ROWGUID

Mar 17, 1999

How can I convert this to use GUIDs in SQL 7

Create Procedure sp_sfAddressNameAdd
@AddressName varchar(100)
As

DECLARE @AddressNameID int
INSERT INTO sfAddressName (AddressName)
VALUES (@AddressName)

SELECT @AddressNameID = @@IDENTITY
return @AddressNameID

AddressNameID is set to uniqueidentifier with newid() as default

Thank you,
Craig

View 1 Replies View Related

Prob With Rowguid Using Newid() Fn

Apr 23, 2006

hi guys

cant find the prob, please help

ALTER TABLE [dbo].[tblUserDetails]
ALTER COLUMN [UserDetailRowGUID] [uniqueidentifier] set default newid()
go

error:Incorrect syntax near the keyword 'default'.

cm

View 2 Replies View Related

Merge Replication Without Rowguid

Jul 20, 2005

hi,I have a database that has Primary Key constraints on every table. Yetwhen I run the replication wizard and try to configure mergereplication the wizard notifies me that it will create a rowguid onthe tables even though they already have a primary key.anybody know how to avoid the rowguid column from being created?regards,Doron

View 1 Replies View Related

Return Autoassigned Rowguid

Jan 16, 2008



Hello,

I've a table with one column specified as rowguid.
An insert into this table is done in a stored procedure, which should return the new rowguid by an output parameter.
How can I obtain the autoassigned rowguid of the inserted record?
is there something like ident_current which is used for identity-columns?

Thanks in advance
Raimund

View 3 Replies View Related

SQL Server 2012 :: How To Preserve Tags In Varchar Output

May 6, 2015

I have following XQuery:

declare @xmldoc as xml
select @xmldoc = '<Text>This is firstline<Break />This is second line<Break />This is third line</Text>'
select @xmldoc.value('(/Text)[1]','varchar(max)')Result is: "This is firstlineThis is second lineThis is third line"

My problem is, that the <Break /> tags within the text are removed in the conversion to varchar. How to preserve the such tags in the varchar output? Or to get the <Break /> tags "translated" to e.g. CHAR(10)?

View 2 Replies View Related

Preserve Leading And Trailing White Spaces On Report

Dec 27, 2007

I spent huge amount of time figuring out how to preserve lading and trailing white spaces on report display without success. Can anyone help me here?

My problem is I have data with leading and or trailing white spaces and I need to show it as is. In designer preview it shows correct values. As soon as report is published and accessed on web, it truncates the whitespaces . I had a look at source, it shows values are correctly fetched(with spaces) but are ignored while rendering. I also tried replacing blank space with &nbsp;, however it reads this as &amp;nbsp;.

I am using asp.net 2.0 and SQL serer 2005 reporting services.

View 4 Replies View Related

OPENROWSOURCE Need To Preserve CR/LF While Importing Text File To Varchar(max)

May 14, 2008

I have the following code tha imports the contents of a text file into a varchar(max) field.

Unfortunately the CR/LF are stripped out when I look at the field.

How can I preserve them?





Code Snippet
DECLARE @obj VARCHAR(MAX)
SELECT @obj=BulkColumn
FROM
OPENROWSET(BULK 'C:qsiObjectCreation.sql',SINGLE_CLOB) AS ExternalFile
insert into scriptor (script) values (@obj)

View 2 Replies View Related

What Is The Usage Of RowGUID Under SQL Server 2005?

Apr 16, 2008

Hi All
What is the usage of Row Guid under SQL Server 2005? It seems not much information state the main purpose of it?
Regards
Alex
 
 

View 21 Replies View Related

[*-)]how To Delete All Columns Except One Column For The Corresponding Column Name......?

Jul 15, 2007

hi friends,          i've a table with (columns) username, content,data,........... i need to delete all column names(i.e.,content,data,........) except username for the specified username. eg: consider username=mahendran. i've to delete the values in the content,data,...............for the username=mahendran. but username should exist.how to do that?pls help me...... 

View 3 Replies View Related

Transact SQL :: Preserve And Return NULL For Non Matching Values From A Table Valued Function

Jun 29, 2015

I have tables and a function as representated by the code below. The names  for objects here are just for representation and not the actual names of objects. Table RDTEST may have one or multiple values for RD for each PID. So the function GIVERD will return one or multiple values of RD for each value of PID passed to it.

When I run the following query, I get the required result except the rows for CID 500 for which PID is NULL in table T1. I want the rows for CID 500 as well with PID values as NULL.

SELECT  A.CID, 
A.ANI,
A.PID,
B.RD
FROM T1 AS A CROSS APPLY GIVERD(A.PID) B

CREATE TABLE [DBO].[RDTEST](
[PID] [INT] NULL,
[RD] [INT] NULL
)

[Code] ....

View 4 Replies View Related

Delete/Remove Column

Oct 18, 2000

Hello people

Can someone tell me if, and then how I can delete/remove a column from a table in SQL6.5. (I know how to add a column)


Regards
De Waal

View 2 Replies View Related

Delete Partial From Column

Jan 30, 2006

Guys, i have a table that one of the columns (Email To) is
a concatenated list of email addresses separated by semi colons ";".

i.e.:

rrb7@yahoo.com;richard.butcher@sthou.com;administr ator@sthou.com

etc like that.
each row varies with one exception. administrator@sthou.com is in each one.

is there a simple way thru sql or T-SQL to delete that "administrator@sthou.com" part? or should i call each row individually into say, a VB.net form using a split with the deliminator ";"
and then looping thru and updating each row?

thanks again for any easy answer
rik

View 7 Replies View Related

Delete A Column Value With Respect To Other

Jul 5, 2007

Hi
I have to delete the value of acktitle where ackby = null
I tried using update but its not helping me i tried doing

update incidents(table name)
set acktitle = null where ackby = null

its not giving me any results thats why i thought of delecting but delete syntax removes the whole row
How should i go about it

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved