Showing posts with label specified. Show all posts
Showing posts with label specified. Show all posts

Tuesday, March 27, 2012

can i grant all privilege to user?

it is possible to grant all privilege (CRUD) to specified table to user. But, now, i want to grant all privilege (CRUD) of all tables, views, sp, ... of database to the user. is it possible?

regards,

Yes you can try the link below for SQL Server object permissions. It can get complex but the link below can get you started. You have the option of doing it with T-SQL or with GUI with Management Studio. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms188371.aspx

|||Now, i assign a role(db_owner) to the user. Because i don't know the different permissions of the different role, i just assign as db_owner. In my case, the only needed is DDL, CRUD DML, stored procedure. That's all. So, is there any other more suitable role. As i can't find the way that assign all these privilege only one command, i just assign a role. I don't know whether is it good or not.

Any idea?|||

You have two options dbcreator and db_ddladmin roles both are less than dbo and may do what you need because a of service pack3 in SQL Server 2000 dbcreator cannot change ownership of a database. The links below will help with more details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms175892.aspx

http://msdn2.microsoft.com/en-us/library/ms189121.aspx

|||thx for ur kindness.|||I am glad I could help.sql

Monday, March 19, 2012

Can i apply any conditon on Replication ,before publishing the data?

i want to use Replication in sql server 2000 at specified condtion ,mean if any condition is satisfied then the data is publish to subscriber database?Extracted from BOL:


Filtering Published Data

Filtering data during replication allows you to publish only the data or partitions of data that are needed at the Subscriber. You can filter data to create partitions that include only the columns and/or only the rows that you specify for replication.
With all types of replication, you can choose to copy and distribute complete tables, or data filtered horizontally or vertically with static filters. Merge replication (mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL% 20Server\80\Tools\Books\replsql.chm::/replintro_0odv.htm#sql:merge_replication) is especially strong in filtering options, and you can use dynamic filters to customize the filter based on a property of the Subscriber receiving the data.
Filtering data horizontally allows you to publish only the data that is needed, partition data to different sites, avoid conflicts (because Subscribers will be viewing and updating different subsets of data), and manage publications based on user needs or applications.
Additionally, you have the option of employing user-defined functions in your static and dynamic filters and leveraging the power of customized functions.|||Thanks Tomh,i got the idea what you are trying to say, this can be done from filtering horizontally or vertically option when we Select Yes, I will define data filters, enable anonymous subscriptions, or customize other properties.

i am explaining what i want to do,i want to apply condition let suppose:

if users.usersId between 10 and 20
begin

-- replication perform

end

and u said in ur comments we can also use or apply user defined function can u give me example of it and where should i call this UDF.

thanks in advance :)|||I've never had to use UDFs to filter, so I don't have an example to give you.

I would suggest you do two things:

1. Experiment ... set up a test replication and work thru simple horizontal (your userid example) and vertical filtering (column subset), then when you have that working, try incorporating functions into the filtering.

2. Search the microsoft.public.sqlserver groups for more information, as well as use GOOGLE to search for user written articles to help lead you to your final result.

You will notice that most of the answers on this forum come from members working thru real life situations that have been overcome by testing and finding the many different ways things don't work before finding the one that does.

Join us and be part of the solution!|||I think a horizontally filtered replication (either merge or transactional) would work just fine for you in this situation. It seems that it would be a bit simpler since it's not dynamic (or it does not appear to be from your description).

As tomh suggested, set up a test environment and practice with it. Replication can be tedious and very involved. Learn all you can, test variouse scenarios, document the test conditions and outcomes and develop your plans accordingly.

Regards,

hmscott|||if users.usersId between 10 and 20
begin

-- replication perform

end

if users.usersId between 10 and 20
begin

exec msdb..sp_start_job 'replicationJobName'
end|||Hy guys it works when i did sample example to test data for (merge replication), from row filter and dynamic row filter we can apply conditions (like where clause)

Thnx to all u guys ur guidance very valueable for me thnx to all once again

one thing which would i want to know is that like cfr want to say to write UDF in a specific condition ,i am unable to do like this Guys do u have any idea? where i should call UDF ?

can i add a column to an article in transactionalreplication

hi
how can i add a column to the table at some specified location after publishing the article in transactional replication.is there any procedure or method.please explain
thanks®ards
reddy
Reddy,
sp_repladdcolumn is the standard way to add a column to replication. However
this will not permit you to place the column at a specific position in the
table. This is not normally an issue, as TSQL is not usually written in a
way that makes it order dependant - columns are referred to by name and not
by position. If this is a requirement for you, you'll need to drop the
publication, add the column then recreate the publication.
HTH,
Paul Ibison
|||paul,
thank you.
in transactional replication on subscriber side we have to set autoid property to no.now i am setting this manually.
we have script to set the autoid 'not for replication',like that any script you have to set the autoid property NO for all tables in a replication.please help.
thanks®ards
reddy
|||Reddy,
I haven't used this myself, but Hilary has posted up a
reference to a script he uses:
http://communities2.microsoft.com/co.../newsgroups/en
-us/default.aspx?
dg=microsoft.public.sqlserver.replication&mid=2239 a0b8-
d572-4d86-ac92-5109662bef6b
This updates to Yes - Not for Replication. However, you
could modify this script for your use. You'll still need
to alter the script for each table though.
Also I'd like to know a little more about why the
subscriber columns were originally set to have an identity
attribute and now it's being removed - (it's normally the
opposite :-)).
Regards,
Paul Ibison
|||paul,
first i will explain the way how i am doing transactional replication.first i will change the autoid column of publisher to not for replication.then i will restore the same in subscriber and set the auto id property to no.why means in transactional publis
her it self handles the autoid property so no need in subscriber.
is there any mistake in the above process please reply
thanks & regards
reddy
|||Reddy,
this is correct for a nosync initialization for standard
transactional replication (RO subscribers).
Regards,
Paul Ibison
|||paul
thanks
regards
reddy

Sunday, March 11, 2012

Can dump file naming convention be specified using Maintence Plan

Hi,
For a 'complete backup' using Maintenance Plan the naming convention
now is
DBNAMEmo.dy.yr_hr_sc
Can this changed or is it hardcoded?
TIA
-Roman
Management Console 2.0
SQL Enterpise Manager 8.0To the best of my knowledge, it is hardcoded. Only thing you can change is extension of the files.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<romandvoskin@.gmail.com> wrote in message
news:1150912826.206544.128420@.i40g2000cwc.googlegroups.com...
> Hi,
> For a 'complete backup' using Maintenance Plan the naming convention
> now is
> DBNAMEmo.dy.yr_hr_sc
> Can this changed or is it hardcoded?
> TIA
> -Roman
> Management Console 2.0
> SQL Enterpise Manager 8.0
>

Can dump file naming convention be specified using Maintence Plan

Hi,
For a 'complete backup' using Maintenance Plan the naming convention
now is
DBNAMEmo.dy.yr_hr_sc
Can this changed or is it hardcoded?
TIA
-Roman
Management Console 2.0
SQL Enterpise Manager 8.0To the best of my knowledge, it is hardcoded. Only thing you can change is e
xtension of the files.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<romandvoskin@.gmail.com> wrote in message
news:1150912826.206544.128420@.i40g2000cwc.googlegroups.com...
> Hi,
> For a 'complete backup' using Maintenance Plan the naming convention
> now is
> DBNAMEmo.dy.yr_hr_sc
> Can this changed or is it hardcoded?
> TIA
> -Roman
> Management Console 2.0
> SQL Enterpise Manager 8.0
>|||To the best of my knowledge, it is hardcoded. Only thing you can change is e
xtension of the files.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<romandvoskin@.gmail.com> wrote in message
news:1150912826.206544.128420@.i40g2000cwc.googlegroups.com...
> Hi,
> For a 'complete backup' using Maintenance Plan the naming convention
> now is
> DBNAMEmo.dy.yr_hr_sc
> Can this changed or is it hardcoded?
> TIA
> -Roman
> Management Console 2.0
> SQL Enterpise Manager 8.0
>