Is there a way i can know the rows that where synchronised in the
publisher after some updates are done on subcriber and synchronised
to publishers?
Example say i update a table1 in subcriber and click synchronise and
the data is updated in publisher.
But on publisher side i need to know what rows were added either
through trigger,jobs or columns in system merge tables
Not sure if this helps...but with Merge Replication, there are triggers
(Insert, Update and Delete) set up for tables that particpate in the
replication. Perhaps you could hook into these existing triggers some way?
"vk" wrote:
> Is there a way i can know the rows that where synchronised in the
> publisher after some updates are done on subcriber and synchronised
> to publishers?
> Example say i update a table1 in subcriber and click synchronise and
> the data is updated in publisher.
> But on publisher side i need to know what rows were added either
> through trigger,jobs or columns in system merge tables
>
2012年3月11日星期日
2012年2月23日星期四
Any idea why the update won't run?
I have this store proc that ends at the update command. No matter where I
move it to, the whole thing seems to quit there.
CREATE PROCEDURE sp_LPModUser
@.ModFName NVarChar(100),
@.ModLName NVarChar(100),
@.ModLogon NVarChar(100),
@.ModPassword NVarChar(100),
@.ModLPUserID Int,
@.ModPageAccess Int,
@.ModChangePW Int,
@.Database NVarChar(100)
AS
Declare @.OldLogon nvarchar(100)
set @.OldLogon = (Select Login from LPUsers where lpuserid = @.ModLPUserID)
Declare @.Check integer
Set @.Check = (select Count(*) from master.dbo.sysxlogins where name =
@.ModLogon)
if @.Check = 0
Begin
exec sp_addlogin @.ModLogon, @.ModPassword, @.Database
exec sp_grantdbaccess @.ModLogon
exec sp_addrolemember 'db_datareader', @.ModLogon
exec sp_addrolemember 'db_datawriter', @.ModLogon
End
If @.OldLogon != @.ModLogon
Begin
exec sp_revokedbaccess @.OldLogon
exec sp_droplogin @.OldLogon
End
Begin
exec sp_password NULL, @.ModPassword, @.ModLogon
update lpusers set fname = @.ModFName, lname = @.ModLName, login = @.Modlogon,
[password] = @.ModPassword,
PageAccess = @.ModPageAccess, ChangePW = @.ModChangePW where lpuserid =
@.ModLPUserID
print 'test'
endNevermind, I got it.
"Shawn" <shawn.camner@.ccci.org> wrote in message
news:uXUEsGg6FHA.564@.TK2MSFTNGP10.phx.gbl...
>I have this store proc that ends at the update command. No matter where I
>move it to, the whole thing seems to quit there.
> CREATE PROCEDURE sp_LPModUser
> @.ModFName NVarChar(100),
> @.ModLName NVarChar(100),
> @.ModLogon NVarChar(100),
> @.ModPassword NVarChar(100),
> @.ModLPUserID Int,
> @.ModPageAccess Int,
> @.ModChangePW Int,
> @.Database NVarChar(100)
> AS
> Declare @.OldLogon nvarchar(100)
> set @.OldLogon = (Select Login from LPUsers where lpuserid = @.ModLPUserID)
> Declare @.Check integer
> Set @.Check = (select Count(*) from master.dbo.sysxlogins where name =
> @.ModLogon)
> if @.Check = 0
> Begin
> exec sp_addlogin @.ModLogon, @.ModPassword, @.Database
> exec sp_grantdbaccess @.ModLogon
> exec sp_addrolemember 'db_datareader', @.ModLogon
> exec sp_addrolemember 'db_datawriter', @.ModLogon
> End
> If @.OldLogon != @.ModLogon
> Begin
> exec sp_revokedbaccess @.OldLogon
> exec sp_droplogin @.OldLogon
> End
> Begin
> exec sp_password NULL, @.ModPassword, @.ModLogon
> update lpusers set fname = @.ModFName, lname = @.ModLName, login =
> @.Modlogon, [password] = @.ModPassword,
> PageAccess = @.ModPageAccess, ChangePW = @.ModChangePW where lpuserid =
> @.ModLPUserID
> print 'test'
> end
>
move it to, the whole thing seems to quit there.
CREATE PROCEDURE sp_LPModUser
@.ModFName NVarChar(100),
@.ModLName NVarChar(100),
@.ModLogon NVarChar(100),
@.ModPassword NVarChar(100),
@.ModLPUserID Int,
@.ModPageAccess Int,
@.ModChangePW Int,
@.Database NVarChar(100)
AS
Declare @.OldLogon nvarchar(100)
set @.OldLogon = (Select Login from LPUsers where lpuserid = @.ModLPUserID)
Declare @.Check integer
Set @.Check = (select Count(*) from master.dbo.sysxlogins where name =
@.ModLogon)
if @.Check = 0
Begin
exec sp_addlogin @.ModLogon, @.ModPassword, @.Database
exec sp_grantdbaccess @.ModLogon
exec sp_addrolemember 'db_datareader', @.ModLogon
exec sp_addrolemember 'db_datawriter', @.ModLogon
End
If @.OldLogon != @.ModLogon
Begin
exec sp_revokedbaccess @.OldLogon
exec sp_droplogin @.OldLogon
End
Begin
exec sp_password NULL, @.ModPassword, @.ModLogon
update lpusers set fname = @.ModFName, lname = @.ModLName, login = @.Modlogon,
[password] = @.ModPassword,
PageAccess = @.ModPageAccess, ChangePW = @.ModChangePW where lpuserid =
@.ModLPUserID
print 'test'
endNevermind, I got it.
"Shawn" <shawn.camner@.ccci.org> wrote in message
news:uXUEsGg6FHA.564@.TK2MSFTNGP10.phx.gbl...
>I have this store proc that ends at the update command. No matter where I
>move it to, the whole thing seems to quit there.
> CREATE PROCEDURE sp_LPModUser
> @.ModFName NVarChar(100),
> @.ModLName NVarChar(100),
> @.ModLogon NVarChar(100),
> @.ModPassword NVarChar(100),
> @.ModLPUserID Int,
> @.ModPageAccess Int,
> @.ModChangePW Int,
> @.Database NVarChar(100)
> AS
> Declare @.OldLogon nvarchar(100)
> set @.OldLogon = (Select Login from LPUsers where lpuserid = @.ModLPUserID)
> Declare @.Check integer
> Set @.Check = (select Count(*) from master.dbo.sysxlogins where name =
> @.ModLogon)
> if @.Check = 0
> Begin
> exec sp_addlogin @.ModLogon, @.ModPassword, @.Database
> exec sp_grantdbaccess @.ModLogon
> exec sp_addrolemember 'db_datareader', @.ModLogon
> exec sp_addrolemember 'db_datawriter', @.ModLogon
> End
> If @.OldLogon != @.ModLogon
> Begin
> exec sp_revokedbaccess @.OldLogon
> exec sp_droplogin @.OldLogon
> End
> Begin
> exec sp_password NULL, @.ModPassword, @.ModLogon
> update lpusers set fname = @.ModFName, lname = @.ModLName, login =
> @.Modlogon, [password] = @.ModPassword,
> PageAccess = @.ModPageAccess, ChangePW = @.ModChangePW where lpuserid =
> @.ModLPUserID
> print 'test'
> end
>
Any idea where SQL store the synonyms? thanks
I need read defination of my synonyms, but I could not find which system
table it stores, I know they get one entry in sysobjects table, but I have
no idea where is the defination.
Thanks!
The sys.synonyms catalog view returns the base_object_name on which the
synonym is based. Is that what you're looking for?
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"davidw" <davidw@.affinisys.com> wrote in message
news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
>I need read defination of my synonyms, but I could not find which system
> table it stores, I know they get one entry in sysobjects table, but I have
> no idea where is the defination.
> Thanks!
>
|||Nice!
That is exactly what I am looking for.
I only searched on sys tables, didn't think about sys view.
thanks!
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OX2781aOGHA.1288@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> The sys.synonyms catalog view returns the base_object_name on which the
> synonym is based. Is that what you're looking for?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> "davidw" <davidw@.affinisys.com> wrote in message
> news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
have
>
table it stores, I know they get one entry in sysobjects table, but I have
no idea where is the defination.
Thanks!
The sys.synonyms catalog view returns the base_object_name on which the
synonym is based. Is that what you're looking for?
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"davidw" <davidw@.affinisys.com> wrote in message
news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
>I need read defination of my synonyms, but I could not find which system
> table it stores, I know they get one entry in sysobjects table, but I have
> no idea where is the defination.
> Thanks!
>
|||Nice!
That is exactly what I am looking for.
I only searched on sys tables, didn't think about sys view.
thanks!
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OX2781aOGHA.1288@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> The sys.synonyms catalog view returns the base_object_name on which the
> synonym is based. Is that what you're looking for?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> "davidw" <davidw@.affinisys.com> wrote in message
> news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
have
>
Any idea where SQL store the synonyms? thanks
I need read defination of my synonyms, but I could not find which system
table it stores, I know they get one entry in sysobjects table, but I have
no idea where is the defination.
Thanks!The sys.synonyms catalog view returns the base_object_name on which the
synonym is based. Is that what you're looking for?
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"davidw" <davidw@.affinisys.com> wrote in message
news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
>I need read defination of my synonyms, but I could not find which system
> table it stores, I know they get one entry in sysobjects table, but I have
> no idea where is the defination.
> Thanks!
>|||Nice!
That is exactly what I am looking for.
I only searched on sys tables, didn't think about sys view.
thanks!
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OX2781aOGHA.1288@.TK2MSFTNGP09.phx.gbl...
> The sys.synonyms catalog view returns the base_object_name on which the
> synonym is based. Is that what you're looking for?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> "davidw" <davidw@.affinisys.com> wrote in message
> news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
have[vbcol=seagreen]
>
table it stores, I know they get one entry in sysobjects table, but I have
no idea where is the defination.
Thanks!The sys.synonyms catalog view returns the base_object_name on which the
synonym is based. Is that what you're looking for?
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"davidw" <davidw@.affinisys.com> wrote in message
news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
>I need read defination of my synonyms, but I could not find which system
> table it stores, I know they get one entry in sysobjects table, but I have
> no idea where is the defination.
> Thanks!
>|||Nice!
That is exactly what I am looking for.
I only searched on sys tables, didn't think about sys view.
thanks!
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OX2781aOGHA.1288@.TK2MSFTNGP09.phx.gbl...
> The sys.synonyms catalog view returns the base_object_name on which the
> synonym is based. Is that what you're looking for?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> "davidw" <davidw@.affinisys.com> wrote in message
> news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
have[vbcol=seagreen]
>
Any idea where SQL store the synonyms? thanks
I need read defination of my synonyms, but I could not find which system
table it stores, I know they get one entry in sysobjects table, but I have
no idea where is the defination.
Thanks!The sys.synonyms catalog view returns the base_object_name on which the
synonym is based. Is that what you're looking for?
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"davidw" <davidw@.affinisys.com> wrote in message
news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
>I need read defination of my synonyms, but I could not find which system
> table it stores, I know they get one entry in sysobjects table, but I have
> no idea where is the defination.
> Thanks!
>|||Nice!
That is exactly what I am looking for.
I only searched on sys tables, didn't think about sys view.
thanks!
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OX2781aOGHA.1288@.TK2MSFTNGP09.phx.gbl...
> The sys.synonyms catalog view returns the base_object_name on which the
> synonym is based. Is that what you're looking for?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> "davidw" <davidw@.affinisys.com> wrote in message
> news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
> >I need read defination of my synonyms, but I could not find which system
> > table it stores, I know they get one entry in sysobjects table, but I
have
> > no idea where is the defination.
> >
> > Thanks!
> >
> >
>
table it stores, I know they get one entry in sysobjects table, but I have
no idea where is the defination.
Thanks!The sys.synonyms catalog view returns the base_object_name on which the
synonym is based. Is that what you're looking for?
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"davidw" <davidw@.affinisys.com> wrote in message
news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
>I need read defination of my synonyms, but I could not find which system
> table it stores, I know they get one entry in sysobjects table, but I have
> no idea where is the defination.
> Thanks!
>|||Nice!
That is exactly what I am looking for.
I only searched on sys tables, didn't think about sys view.
thanks!
"Gail Erickson [MS]" <gaile@.online.microsoft.com> wrote in message
news:OX2781aOGHA.1288@.TK2MSFTNGP09.phx.gbl...
> The sys.synonyms catalog view returns the base_object_name on which the
> synonym is based. Is that what you're looking for?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> "davidw" <davidw@.affinisys.com> wrote in message
> news:OTeJq6YOGHA.964@.tk2msftngp13.phx.gbl...
> >I need read defination of my synonyms, but I could not find which system
> > table it stores, I know they get one entry in sysobjects table, but I
have
> > no idea where is the defination.
> >
> > Thanks!
> >
> >
>
订阅:
博文 (Atom)