Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Monday, March 12, 2012

Pull Subscription Continues to Run Indefinitely

I have a publication that is being pulled and when I execute a UPDATE command
example: UPDATE Oils SET Description = 'This is a description'
The SQL Query Analyzer completes the command successfully.
I am receiving confirmation that more than 30,0000 rows have been updated
when I run this command.
When I go to the Replication Manager and view the Subscription it continues
to run indefinitely.
In some cases more than 8 hrs.
Are there some parameters that might need to be set when running this
process?
Any feedback is appreciated.
Thank you
open up profiler on the subscriber and see if there is any activity from the
replication process.
"BSandia" <BSandia@.discussions.microsoft.com> wrote in message
news:2B137D55-AD5A-4E61-9D77-9CB0DDF5C1B9@.microsoft.com...
>I have a publication that is being pulled and when I execute a UPDATE
>command
> example: UPDATE Oils SET Description = 'This is a description'
> The SQL Query Analyzer completes the command successfully.
> I am receiving confirmation that more than 30,0000 rows have been updated
> when I run this command.
> When I go to the Replication Manager and view the Subscription it
> continues
> to run indefinitely.
> In some cases more than 8 hrs.
> Are there some parameters that might need to be set when running this
> process?
> Any feedback is appreciated.
> Thank you
>
>
>
|||There are several optimization techniques for transactional replication one
half is to create a new distribution agent profile with a lower amount of
transactions set per commit, and the second half is to add [-MaxCmdsInTran
10000] to the log reader agent where 10000 is the maximum number of commands
per transaction. With this switch added to the execution command in the
actual log reader agent you will only send 10000 commands down the
replication pipe per transaction. The combination of these two performance
enhancements will reduce that 8 hour run to quite a bit smaller.
"BSandia" wrote:

> I have a publication that is being pulled and when I execute a UPDATE command
> example: UPDATE Oils SET Description = 'This is a description'
> The SQL Query Analyzer completes the command successfully.
> I am receiving confirmation that more than 30,0000 rows have been updated
> when I run this command.
> When I go to the Replication Manager and view the Subscription it continues
> to run indefinitely.
> In some cases more than 8 hrs.
> Are there some parameters that might need to be set when running this
> process?
> Any feedback is appreciated.
> Thank you
>
>
>
|||Thank you for your responsive posts I will give them a try.
Brett
"Richard S. Hale" wrote:
[vbcol=seagreen]
> There are several optimization techniques for transactional replication one
> half is to create a new distribution agent profile with a lower amount of
> transactions set per commit, and the second half is to add [-MaxCmdsInTran
> 10000] to the log reader agent where 10000 is the maximum number of commands
> per transaction. With this switch added to the execution command in the
> actual log reader agent you will only send 10000 commands down the
> replication pipe per transaction. The combination of these two performance
> enhancements will reduce that 8 hour run to quite a bit smaller.
> "BSandia" wrote:

pull subscription

My name is Tech guy,
I want to use window script program to execute a pull subscription installed on SQL 2005 express edition. Because it free for downloand.
is there a script that can call an existing pull subscription execution.I want to use window script program to execute a pull subscription installed on SQL 2005 express edition.
Do you mean VB or Java script...?

Using Enterprise Manager you can generate a SQL script.

select Pull Subscription -> Press Right Hand Key -> Generate SQL Script.

Modify script for subscriber name, subscriber DB etc.|||thanks Rajesh for replying my question.
Here is the problem. I created a pull subscription and pull subscription script file in SQL 2005 Management express. but the express does not have option to run a schedule job. I want to create a vb script to run that pull subscription script file. I cannot find a command for execute the pull subscription package in vb script.
example:
dim objserver
set objserver = createobject("SQLDMO.SQLserver")
obvjserver.loginsecure = true
objserver.connect "."
objserver.script, "myPullSubscription.sql"
set objserver = nothing

I need a vb command to execute mypullscubscription.sql because the one I used above does not work.|||You could launch osql.exe (or sqlcmd.exe in 2005) to execute any .sql script from a shell script.|||Can you give me an example script using osql to execute a pull subscription file. do I need to log on SQL management in order to run qsql?|||there are many resources on the net for osql. just google "osql syntax". Here's an example:

http://www.sql-server-performance.com/rd_osql.asp

it's a console app that you can use to execute arbitrary scripts. If you are on 2005, use sqlcmd.exe though. it's better. :)|||Using osql you can run any TSQL script, it's command prompt utility. You can refer Books OnLine from Query Analyzer.

Monday, February 20, 2012

Public Role for SQL 2000

For SQL 2000, I see that the Public role has some privileges like SELECT,
UPDATE, DELETE, & EXECUTE, permissions for some User's database objects
(Tables, views, &Stored procedures .)
Is that a security concern?
What will happen if I remove these privileges or revoke them?
Will that effect the rest of the users?
I read many threads on the internet, but no one could tell me the answers
for the 3 questions above.
Thanks in advance.wit1 (wit1@.hotmail.com) writes:
> For SQL 2000, I see that the Public role has some privileges like SELECT,
> UPDATE, DELETE, & EXECUTE, permissions for some User's database objects
> (Tables, views, &Stored procedures .)
That is not the default.

> Is that a security concern?
It does not sound like the best security to me.

> What will happen if I remove these privileges or revoke them?
Impossible to tell as it depends on the application using the database.

> Will that effect the rest of the users?
Again, that depends on the application using the database.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi, I too have same questions.
I tried to drop this public role but not able to drop.
I tried to Revoke Select permission but not able to do that. It is not
giving any error but not working as expected. Any urgent reply will be
gratly appreciated.
Thank,
Tushar Vaja
"wit1" <wit1@.hotmail.com> wrote in message
news:%23DBcPkqiHHA.1244@.TK2MSFTNGP04.phx.gbl...
> For SQL 2000, I see that the Public role has some privileges like SELECT,
> UPDATE, DELETE, & EXECUTE, permissions for some User's database objects
> (Tables, views, &Stored procedures .)
>
> Is that a security concern?
> What will happen if I remove these privileges or revoke them?
> Will that effect the rest of the users?
>
> I read many threads on the internet, but no one could tell me the answers
> for the 3 questions above.
> Thanks in advance.
>
>|||> Hi, I too have same questions.
> I tried to drop this public role but not able to drop.
> I tried to Revoke Select permission but not able to do that. It is not
> giving any error but not working as expected. Any urgent reply will be
> gratly appreciated.
> Thank,
> Tushar Vaja
>
> "wit1" <wit1@.hotmail.com> wrote in message
> news:%23DBcPkqiHHA.1244@.TK2MSFTNGP04.phx.gbl...
>|||Tushar (tushar_vaja@.yahoo.co.in) writes:
> I tried to drop this public role but not able to drop.
> I tried to Revoke Select permission but not able to do that. It is not
> giving any error but not working as expected. Any urgent reply will be
> gratly appreciated.
You could try DENY, but since everyone is in public, this could have
the undesired effect that no one can access anything.
But maybe there is some misunderstanding? Could you clarify more precisely
what tables that are accessible to users who should not get there?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi, thanks for reply. My problem is below:
Whenever user run my exe on his system, my app will create two DB on his
local system. 1 DB contain general info and second DB contain some very
confidenmt info. Now i do not want user(the person who has installed my app)
to access the second DB but he can access 1st DB if he wants.
I do not knwo how to implemet this thing. Please help.
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns99337CC774783Yazorman@.127.0.0.1...
> Tushar (tushar_vaja@.yahoo.co.in) writes:
> You could try DENY, but since everyone is in public, this could have
> the undesired effect that no one can access anything.
> But maybe there is some misunderstanding? Could you clarify more precisely
> what tables that are accessible to users who should not get there?
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Tushar (tushar_vaja@.yahoo.co.in) writes:
> Whenever user run my exe on his system, my app will create two DB on his
> local system. 1 DB contain general info and second DB contain some very
> confidenmt info. Now i do not want user(the person who has installed my
> app) to access the second DB but he can access 1st DB if he wants. I do
> not knwo how to implemet this thing. Please help.
Presumably the user who installed the application will have admin rights
on the machine, and you cannot hide anything from an administrator.
You can of course, store the data in the database encrypted, and then
your application could decrypt the data as needed. But since the
application would have to hide the encryption key somewhere, it's not
safe from a user who is dead set from accessing the data, but at least
it protects you from the stray wanderer.
In any case, you need to cover this situation in the license agreement,
and explicitly say that disclosing the data in the database is not
permitted.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi,
The following excerpt is taken from Chapter 5 - Microsoft SQL Server 2000
Security of Microsoft SQL Server 2000 Administrator's Pocket Consultant (ISB
N
0-7356-1129-7):
public is the default role for all database users. Users inherit the
permissions and privileges of the public role, and this role represents
their minimum permissions and privileges. Any role that you assign to a
user, beyond the public role, add permissions and privileges. If you want
all database users to have specific permissions, assign the permissions to
the public role.
The following excerpt is taken from Chapter 8 - Managing SQL Serer 2005
Security of Microsoft SQL Server 2005 Administrator's Pocket Consultant:
The guest user is a special user that you can add to a database to allow
anyone with a valid SQL Server login to access the database... Before using
the guest user, you should not the following information about the account:
The guest user is a member of the public server role and inherits the
permissions of this role.
The guest user must exist in a database before anyone can access it as a
guest.
The guest user is used only when a user account has access to SQL Server
but does not have access to the database through this user account.
Other topics around public server role that may be of interest include:
http://www.microsoft.com/technet/pr...in/sqlops3.mspx
http://www.microsoft.com/technet/pr...n/sp3sec01.mspx
http://www.microsoft.com/technet/pr...ploy/mysql.mspx
10 Steps to help Secure SQL Server 2000
https://www.microsoft.com/sql/prodi...n/sp3sec04.mspx
SQL Server 2000 SP3 Security Features and Best Practices: Implementation of
Server Level Security and Object Level Security
http://www.microsoft.com/technet/pr...n/sp3sec02.mspx
SQL Server 2005 (BOL) - Security Considerations for a SQL Server Installatio
n
http://msdn2.microsoft.com/en-us/library/ms144228.aspx
Regards,
Keith Wilson
Disclaimer: this posting is provided "as is" without implied or express
warranties.
"Tushar" wrote:

>
>