Showing posts with label t-sql. Show all posts
Showing posts with label t-sql. Show all posts

Wednesday, March 28, 2012

RMO Equivalent for Merge Replication T-SQL Procedures

We want to have some information about RMO (Replication Management Objects in SQL Server 2005) equivalent for the following Merge Replication T-SQL procedures.

sp_changemergearticle
sp_helpmergearticleconflicts
sp_helpmergeconflictrows
sp_helpmergedeleteconflictrows
sp_deletemergeconflictrow

Since I was not aware of these RMO properties, here is a response from someone who has that knowledge.

Changing properties in MergeArticle object should be calling sp_changemergearticle.

Replicationdatabase.EnumCOnflcitTables should be equivalent to sp_hlepmergecarticleConflicts.

I don’t think we have any RMO methods that are equivalent to the last 3 proc calls

|||Thanks Mahesh, for your information. We will check that, if you can find any equivalent implementation for other three methods or any work around in order to use the other three methods that would be great ful.

Thanks
VDeevi.|||Sure, I will let you know.
Meanwhile, cant you wrap the other calls as a sql statement and make the calls?Also, you could add your logic in that! wouldnt that work for you?|||Thanks for your information. We will try to build the components based on the sproc calls to these stored procedures using ADO.Net. Once again thanks for your help.

Thankssql

Tuesday, March 20, 2012

Revoking permission to view SQL Stored procs

Hi
Is there a way which I can revoke a users ability to view SQL stored procs,
but still have the ability to execute?
I want to do this via T-SQL, and without just considering the 'WITH
ENCRYPTION' option
Thanks
hi Paul,
Paul Aspinall wrote:
> Hi
> Is there a way which I can revoke a users ability to view SQL stored
> procs, but still have the ability to execute?
> I want to do this via T-SQL, and without just considering the 'WITH
> ENCRYPTION' option
> Thanks
every database user is allowed to view the definition of stored procedures,
and you can not change this behaviour... unfortunately, as you already
pointed out, you can only consider the WITH ENCRYPTION option
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||What about granting only EXECUTE permissions and not CREATE, ALTER or
DROP ?
|||hi,
bd wrote:
> What about granting only EXECUTE permissions and not CREATE, ALTER or
> DROP ?
every database user has implicit permission to script objects, so he/she
will be able to access the object definition and DDL
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Wednesday, March 7, 2012

returning temp tables, t-sql stored procedures

Hi, im a bit of a beginner here and need to know how to call stored procedures from another sp and how can I return a temp table that I need to use in the calling sp's where clause?
Some code would b great.
CheersAre you looking for something like this?

create proc proc2
as
insert #tmp
select 1,'Q'
go
create proc proc1
as
create table #tmp(id int, code varchar(10))
exec proc2
select * from #tmp
go
exec proc1

or

alter proc proc2
as
select 1,'Q'
go
alter proc proc1
as
create table #tmp(id int, code varchar(10))
insert #tmp
exec proc2
select * from #tmp
go
exec proc1

or ?|||cheers thats all that is required