Showing posts with label define. Show all posts
Showing posts with label define. Show all posts

Thursday, March 29, 2012

Alternate snapshot for push subscribtion

Can I define an alternate snapshot file location for a push subscriber?
How?
Have a look at the agent profile parameters - http://msdn.microsoft.com/library/de...trib_2f09.asp.
EG for the distribution agent there is a property -AltSnapshotFolder
Regards,
Paul Ibison
|||right click on your publication, select publication properties, select
snapshot location. Then select on the Generate snapshots in the following
location, and enter a new snapshot location. Then restart your snapshot
agent, and your distribution agent.
"Humam" <anonymous@.discussions.microsoft.com> wrote in message
news:490BF15E-9BC5-4042-BEC4-A98383BBFF18@.microsoft.com...
> Can I define an alternate snapshot file location for a push subscriber?
> How?
>
|||That is right, but I need to transfer the snapshot files
to where the subscriber resides (on CD's).
How can I configure the push subscriber to use the
snapshot files located at the subscriber?
Thanks for your help.

>--Original Message--
>right click on your publication, select publication
properties, select
>snapshot location. Then select on the Generate snapshots
in the following
>location, and enter a new snapshot location. Then restart
your snapshot
>agent, and your distribution agent.
>"Humam" <anonymous@.discussions.microsoft.com> wrote in
message
>news:490BF15E-9BC5-4042-BEC4-A98383BBFF18@.microsoft.com...
push subscriber?
>
>.
>
|||Run your snapshot agent. Copy the snapshot path from repldata on down to
your subscriber.
Then when you pull your subscriber go through the prompts using the wizard
until you get to the Snapshot Delivery dialog. Select the Use snapshot files
from the following folder and point to the repldata folder you have copied
from your publisher. Then click on next and continue to build your pull
subscription.
"Humam" <anonymous@.discussions.microsoft.com> wrote in message
news:1621e01c41711$30106440$a301280a@.phx.gbl...
> That is right, but I need to transfer the snapshot files
> to where the subscriber resides (on CD's).
> How can I configure the push subscriber to use the
> snapshot files located at the subscriber?
> Thanks for your help.
> properties, select
> in the following
> your snapshot
> message
> push subscriber?

Thursday, February 16, 2012

Allow NULL or Define DEFAULT Value

I am designing a new table with a few columns that may or may not have
a value on each row that is inserted.

What issues determine whether to allow a NULL value to be inserted for
that column or define a default value to be used?

I want to think through the repercussions of this decision before I get
into production.binder wrote:

Quote:

Originally Posted by

I am designing a new table with a few columns that may or may not have
a value on each row that is inserted.
>
What issues determine whether to allow a NULL value to be inserted for
that column or define a default value to be used?
>
I want to think through the repercussions of this decision before I get
into production.


Quote:

Originally Posted by

>From a programmatic standpoint, if I have a column that may or may not


have a value, is it better to insert a default value that indicates no
value was entered, such as 0 for a userid, or insert a NULL value?|||binder (rgondzur@.gmail.com) writes:

Quote:

Originally Posted by

binder wrote:

Quote:

Originally Posted by

>I am designing a new table with a few columns that may or may not have
>a value on each row that is inserted.
>>
>What issues determine whether to allow a NULL value to be inserted for
>that column or define a default value to be used?
>>
>I want to think through the repercussions of this decision before I get
>into production.


>
From a programmatic standpoint, if I have a column that may or may not
have a value, is it better to insert a default value that indicates no
value was entered, such as 0 for a userid, or insert a NULL value?


Programmatic? That's the wrong standpoint to look at it. You should look
at what it means.

Say that you have a column called whotoblameusrid, and no explicit value
is inserted. If you let it be NULL, means that in this case there is
no one to blame. (After all, anyone who is acquainted with Elvis Costello's
early material knows that Accidents can Happen.) If you use a default
value of 0 and 0 is Cain's user id, this mean that we Blame it on
Cain when no one else is at fault. (Costello fans know what I'm talking
about.)

But must 0 be a certain user? Yes, because good database design says
that a userid should be a foreign key to a table that defines users,
so there must be a user with id 0.

This also applies to non-key columns. Say a column that represents
an amount, for instance the cost for something. NULL would indicate
that the price is unknown (and we probably should not sell it). 0
means that the goods is for free.

That is not to say that default values should not be used. For instance
if you open a new account, it makes perfect sense to have default of
0 for the holdingsamt column, because you start with 0 and you may
not make a deposit immediately.

Simply, having NULL or a default value depends on what not entering a
value means. And by the way, a column could permit NULLs, but still have
a default value, because it's only exceptional that the value is not
known. For instance, a column "citizenof" could very well have the
default value of SE for a Swedish system, but the column must permit
NULL to account for stateless persons.

--
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|||Erland Sommarskog wrote:

Quote:

Originally Posted by

>
Programmatic? That's the wrong standpoint to look at it. You should look
at what it means.
>
Say that you have a column called whotoblameusrid, and no explicit value
is inserted. If you let it be NULL, means that in this case there is
no one to blame. (After all, anyone who is acquainted with Elvis Costello's
early material knows that Accidents can Happen.) If you use a default
value of 0 and 0 is Cain's user id, this mean that we Blame it on
Cain when no one else is at fault. (Costello fans know what I'm talking
about.)
>
But must 0 be a certain user? Yes, because good database design says
that a userid should be a foreign key to a table that defines users,
so there must be a user with id 0.
>
This also applies to non-key columns. Say a column that represents
an amount, for instance the cost for something. NULL would indicate
that the price is unknown (and we probably should not sell it). 0
means that the goods is for free.
>
That is not to say that default values should not be used. For instance
if you open a new account, it makes perfect sense to have default of
0 for the holdingsamt column, because you start with 0 and you may
not make a deposit immediately.
>
Simply, having NULL or a default value depends on what not entering a
value means. And by the way, a column could permit NULLs, but still have
a default value, because it's only exceptional that the value is not
known. For instance, a column "citizenof" could very well have the
default value of SE for a Swedish system, but the column must permit
NULL to account for stateless persons.
>
--
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


Don't forget the third option: decompose the optional attribute(s) into
another table. To extend Erland's example, the WhoToBlameUsrID can go
in a table along with any other columns that relate only to Blame.

CREATE TABLE Who (WhoID INT NOT NULL PRIMARY KEY /* ... The required
attributes for the Who table ... */);

CREATE TABLE Blame (WhoID INT NOT NULL PRIMARY KEY REFERENCES Who
(WhoID), WhoToBlameUsrID INT NOT NULL /* ... The optional "Blame"
attributes ... */);

The principle at work here is that an entity is determined by its
unique set of attributes. If you analyse the functional dependencies
you find you have more entities than you currently have tables for -
that's what tells you to decompose.

In SQL Server this approach has one special advantage. SQL Server's
UNIQUE constraint treats nulls like values. The constraint doesn't
permit nulls to be duplicated, which means that unique constraints are
of limited use for optional attributes. So if an optional column may
need to be part of a unique constraint you should certainly consider
the decomposition approach.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--

Monday, February 13, 2012

All Users are being IDed as 'dbo'

We have a SQL Server 2005 database set up. We are trying to add new users to one of four define roles. Even though we are creating new login, then assigning each new login to one of the four roles. The server is returning 'dbo' as the user no matter who is logging in. Is there some setting that is causing this behavior?

Thanks of any help.

Can you post more information about the roles you mentioned and the commands you used to create the logins and assign them role memberships?

Thanks
Laurentiu

|||We have created 4 roles with permission to a select set of stored procedures. When one of the front end applications opens, it runs a procedure that gets the USER id and which of one or more roles that user has. On the test system, each of the users are properly ID and shown the correct roles. But on the Production system, all of the login/users return the 'dbo' USER ID, thus the roles are not indicated correctly. We believe that using "SQL Server Management Studio 2005", is setting all the logins to 'dbo' even though when we look at the settings, it shows the proper roles for each login.|||

One likely possibility is that in your production system, the client is using credentials with SYSADMIN privileges (i.e. the login they are using is a member of the server fixed role SYSADMIN). Members of SYSADMIN will always have a user-identity of “dbo” in any database in the system.

-Raul Garcia

SDE/T

SQL Server Engine