Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Monday, March 26, 2012

MSDE 2000 Replication Conflict

I am using MSDE 2000 for my replication. the problem is that althought at time creating publication it inserts GUID into every table but if one table in 2 nodes has same primary key, it inserts only one row ( accorrding to prority ). there are some Conflict Reslover methods that can be used for this purpose. i wanted to ask that is there any other way for me to resolve this conflict. i am asking for a new way because my database schema has been created and a lot of coding behalf of that schema has been done.

I'd be thankful if you guide me.
Regards,

Are you trying to insert the same primary key at both nodes? In your case, conflict resolver won't work for you because although you have inserted at both nodes, they are treated as different rows with different rowguid. What are you trying to achieve in this scenario? Do rows with same primary key stand for the same thing in your business scenario?

You can also refer to this post to see if you have the same problem: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=509453&SiteID=1

Hope it helps

Wanwen

|||Dear Wanwen.

i have a scenario as follows.

I have one publisher and two subscribers. a table called "Companies" is my article. That "Companies" table has a primary key column called CompanyId which is an Identity Row. Now when i insert data into subscribers i will have two rows with same Primary key. For Example two rows with CompanyId 1. Now at time of merging data, i want both companyIds ( both rows with Pk 1 ) be present in publisher. But at reality it does not happen.

What should i do?! because i need both rows at publisher .

Note: i have to mention that at time of creating Subscription GUID is included by SQL Server. So why is it not working?!

Regards,|||

In your case, you need to use identity range management. Please refer to BOL topic: Replicating Identity Columns. Basically, to use identity columns in a replication topology that has updates at more than one node, each node in the replication topology must use a different range of identity values, so that duplicates do not occur. You could use auto for Identity Range Management Option and specify @.pub_identity_range, @.identity_range and @.threshold.

Rowguid column added by replication is for change tracking, conflict detecting and resolving, not for failure to apply changes due to constraint.

Hope it helps.

Wanwen

sql

Friday, March 23, 2012

MSDE 2000 installation

Hi,
I'm creating an install disk that our company is distributing to a selected
group of our immediate direct customers. We are using the SQL server database
in house and we are creating a program that these customers can enter
contract data at their own PC, print the data in a report format and then
send us the contracts with the remittance report. We are developing an
executable program that uses a SQL server database with 6 tables in house.
I'm using installshield to create a disc that the user will load onto their
own PC. We want to be able to populate these tables by having the user's log
onto our web site and doing a update for the latest table updates. So far
I've been pursuing the idea of using MSDE 2000 for the user's PC's, however,
is this the wisest decision. Would it be better (simpler) to use a different
database on the user's PC's and use a driver to import data from our SQL
server tables to the database on the PC. If MSDE 2000 is the best bet, where
does MDAC version 2.6 come in the picture or does it. I know this is fairly
lengthy message, but I could use some direction on this
MSDE is an alternative for MS Access. It is more robust and can scale up to
SQL Server SE or EE. It has royalty free re-distribution rights; however,
the caveat is that you can not use the SQL Server Administrative tools. You
must code your own administrative features into your application yourself.
It can be more complex; however, it may be worth your time.
MDAC automatically gets installed when you install MSDE onto the client.
Sincerely,
Anthony Thomas

"Randers" <Randers@.discussions.microsoft.com> wrote in message
news:B5893843-1A3D-4207-94BF-8480B9FEB5AF@.microsoft.com...
Hi,
I'm creating an install disk that our company is distributing to a selected
group of our immediate direct customers. We are using the SQL server
database
in house and we are creating a program that these customers can enter
contract data at their own PC, print the data in a report format and then
send us the contracts with the remittance report. We are developing an
executable program that uses a SQL server database with 6 tables in house.
I'm using installshield to create a disc that the user will load onto their
own PC. We want to be able to populate these tables by having the user's log
onto our web site and doing a update for the latest table updates. So far
I've been pursuing the idea of using MSDE 2000 for the user's PC's, however,
is this the wisest decision. Would it be better (simpler) to use a different
database on the user's PC's and use a driver to import data from our SQL
server tables to the database on the PC. If MSDE 2000 is the best bet, where
does MDAC version 2.6 come in the picture or does it. I know this is fairly
lengthy message, but I could use some direction on this

MSDE 2000 installation

Hi,
I'm creating an install disk that our company is distributing to a selected
group of our immediate direct customers. We are using the SQL server database
in house and we are creating a program that these customers can enter
contract data at their own PC, print the data in a report format and then
send us the contracts with the remittance report. We are developing an
executable program that uses a SQL server database with 6 tables in house.
I'm using installshield to create a disc that the user will load onto their
own PC. We want to be able to populate these tables by having the user's log
onto our web site and doing a update for the latest table updates. So far
I've been pursuing the idea of using MSDE 2000 for the user's PC's, however,
is this the wisest decision. Would it be better (simpler) to use a different
database on the user's PC's and use a driver to import data from our SQL
server tables to the database on the PC. If MSDE 2000 is the best bet, where
does MDAC version 2.6 come in the picture or does it. I know this is fairly
lengthy message, but I could use some direction on thisMSDE is an alternative for MS Access. It is more robust and can scale up to
SQL Server SE or EE. It has royalty free re-distribution rights; however,
the caveat is that you can not use the SQL Server Administrative tools. You
must code your own administrative features into your application yourself.
It can be more complex; however, it may be worth your time.
MDAC automatically gets installed when you install MSDE onto the client.
Sincerely,
Anthony Thomas
"Randers" <Randers@.discussions.microsoft.com> wrote in message
news:B5893843-1A3D-4207-94BF-8480B9FEB5AF@.microsoft.com...
Hi,
I'm creating an install disk that our company is distributing to a selected
group of our immediate direct customers. We are using the SQL server
database
in house and we are creating a program that these customers can enter
contract data at their own PC, print the data in a report format and then
send us the contracts with the remittance report. We are developing an
executable program that uses a SQL server database with 6 tables in house.
I'm using installshield to create a disc that the user will load onto their
own PC. We want to be able to populate these tables by having the user's log
onto our web site and doing a update for the latest table updates. So far
I've been pursuing the idea of using MSDE 2000 for the user's PC's, however,
is this the wisest decision. Would it be better (simpler) to use a different
database on the user's PC's and use a driver to import data from our SQL
server tables to the database on the PC. If MSDE 2000 is the best bet, where
does MDAC version 2.6 come in the picture or does it. I know this is fairly
lengthy message, but I could use some direction on this

MSDE 2000 installation

Hi,
I'm creating an install disk that our company is distributing to a selected
group of our immediate direct customers. We are using the SQL server databas
e
in house and we are creating a program that these customers can enter
contract data at their own PC, print the data in a report format and then
send us the contracts with the remittance report. We are developing an
executable program that uses a SQL server database with 6 tables in house.
I'm using installshield to create a disc that the user will load onto their
own PC. We want to be able to populate these tables by having the user's log
onto our web site and doing a update for the latest table updates. So far
I've been pursuing the idea of using MSDE 2000 for the user's PC's, however,
is this the wisest decision. Would it be better (simpler) to use a different
database on the user's PC's and use a driver to import data from our SQL
server tables to the database on the PC. If MSDE 2000 is the best bet, where
does MDAC version 2.6 come in the picture or does it. I know this is fairly
lengthy message, but I could use some direction on thisMSDE is an alternative for MS Access. It is more robust and can scale up to
SQL Server SE or EE. It has royalty free re-distribution rights; however,
the caveat is that you can not use the SQL Server Administrative tools. You
must code your own administrative features into your application yourself.
It can be more complex; however, it may be worth your time.
MDAC automatically gets installed when you install MSDE onto the client.
Sincerely,
Anthony Thomas
"Randers" <Randers@.discussions.microsoft.com> wrote in message
news:B5893843-1A3D-4207-94BF-8480B9FEB5AF@.microsoft.com...
Hi,
I'm creating an install disk that our company is distributing to a selected
group of our immediate direct customers. We are using the SQL server
database
in house and we are creating a program that these customers can enter
contract data at their own PC, print the data in a report format and then
send us the contracts with the remittance report. We are developing an
executable program that uses a SQL server database with 6 tables in house.
I'm using installshield to create a disc that the user will load onto their
own PC. We want to be able to populate these tables by having the user's log
onto our web site and doing a update for the latest table updates. So far
I've been pursuing the idea of using MSDE 2000 for the user's PC's, however,
is this the wisest decision. Would it be better (simpler) to use a different
database on the user's PC's and use a driver to import data from our SQL
server tables to the database on the PC. If MSDE 2000 is the best bet, where
does MDAC version 2.6 come in the picture or does it. I know this is fairly
lengthy message, but I could use some direction on this

Monday, March 19, 2012

MSDE (SQL Server 2000) does not return @@Identity

Hi All,
I'm creating an appplication with some stored procedures. The stored
procedure needs to return the @.@.Identity of the table's new record. The
function has no errors and compiles without any warnings. The function
does work fine some times (returning value). But most of the calls are
failing and the function does not return proper value.
CREATE PROCEDURE CreateNewCourse
@.CourseName NVARCHAR(256),
@.Duration Int,
@.Contents NVarChar(500),
AS
DECLARE @.Identity int
INSERT into CourseMaster
(
CourseName,Contents,
Duration
)
VALUES
(
@.CourseName,
@.Contents,
@.Duration
)
SET @.Identity = SCOPE_IDENTITY()
return @.Identity
Any suggestions?
TIA.Hi
Can you show us how you call the SP ?
To reproduce your problem please post DDL+ sample data?
"Anbu" <t_anbazhagan2001@.yahoo.co.in> wrote in message
news:1143606553.333820.230400@.t31g2000cwb.googlegroups.com...
> Hi All,
> I'm creating an appplication with some stored procedures. The stored
> procedure needs to return the @.@.Identity of the table's new record. The
> function has no errors and compiles without any warnings. The function
> does work fine some times (returning value). But most of the calls are
> failing and the function does not return proper value.
> CREATE PROCEDURE CreateNewCourse
> @.CourseName NVARCHAR(256),
> @.Duration Int,
> @.Contents NVarChar(500),
> AS
> DECLARE @.Identity int
> INSERT into CourseMaster
> (
> CourseName,Contents,
> Duration
> )
> VALUES
> (
> @.CourseName,
> @.Contents,
> @.Duration
> )
>
> SET @.Identity = SCOPE_IDENTITY()
> return @.Identity
> Any suggestions?
> TIA.
>|||I'm trying to execute the function from Visual Studio .NET IDE (through
Database Explorer). Normally it will return the output in the "output"
window of VS .NET IDE.|||"Anbu" <t_anbazhagan2001@.yahoo.co.in> wrote in message
news:1143613779.111998.71180@.g10g2000cwb.googlegroups.com...
> I'm trying to execute the function from Visual Studio .NET IDE (through
> Database Explorer). Normally it will return the output in the "output"
> window of VS .NET IDE.
>
Don't use RETURN to ouptut results. Use OUTPUT parameters and keep RETURN
for what it is intended, i.e. error status. Make sure you set NOCOUNT ON.
Try:
CREATE PROCEDURE CreateNewCourse
@.CourseName NVARCHAR(256),
@.Duration Int,
@.Contents NVarChar(500),
@.Identity INT OUTPUT
AS
SET NOCOUNT ON
DECLARE @.result INT
INSERT into CourseMaster
(
CourseName,Contents,
Duration
)
VALUES
(
@.CourseName,
@.Contents,
@.Duration
)
SET @.result =@.@.ERROR
IF @.result > 0
BEGIN
/* Error handling? */
EXEC usp_error_handler @.result, ... ;
END
SET @.Identity = SCOPE_IDENTITY()
RETURN @.result
GO
DECLARE @.i INT
EXEC CreateNewCourse
@.CourseName = '',
@.Duration = 0,
@.Contents = '',
@.Identity = @.i OUTPUT
SELECT @.i
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/ms130214(en-US,SQL.90).aspx
--|||It seem's it's a problem with the IDE and MSDE connection, or the way
the IDE returns the data from MSDE. I could run the same Stored Proc
from an application and retrieve the results in the return value.
Thanks,|||Does the table have an identity column?
"Anbu" <t_anbazhagan2001@.yahoo.co.in> wrote in message
news:1143606553.333820.230400@.t31g2000cwb.googlegroups.com...
> Hi All,
> I'm creating an appplication with some stored procedures. The stored
> procedure needs to return the @.@.Identity of the table's new record. The
> function has no errors and compiles without any warnings. The function
> does work fine some times (returning value). But most of the calls are
> failing and the function does not return proper value.
> CREATE PROCEDURE CreateNewCourse
> @.CourseName NVARCHAR(256),
> @.Duration Int,
> @.Contents NVarChar(500),
> AS
> DECLARE @.Identity int
> INSERT into CourseMaster
> (
> CourseName,Contents,
> Duration
> )
> VALUES
> (
> @.CourseName,
> @.Contents,
> @.Duration
> )
>
> SET @.Identity = SCOPE_IDENTITY()
> return @.Identity
> Any suggestions?
> TIA.
>

Monday, February 20, 2012

msdb database problem with MS SQL Server 6.5

Hi
I have a problem creating a backup in SQL Server 6.5. Although, the
backup produced does restore ok, I want to stop this error message
appearing everytime I make a backup. The error message is:

"
[SQL Server ]Can't allocate space for object 'sysbackupdetail' in
database 'msdb' because the 'default' segment is full. If you ran out
of space in Syslogs, dump the transaction log. Otherwise, use ALTER
DATABASE or sp_extendsegment to increase the size of the segment.
"

this articles appears to describe the problem and the solution:

http://support.microsoft.com/defaul...kb;EN-US;152354

It recommends creating a stored procedure to delete old entries. The
stored procedure cannot be created due tro a memory problem. What I
was wondering, although the article doesn't mention it, can a new
device be created and added to the msdb database. This should fix the
problem or is there problems doing this ?

Thanks in advance"John Mullan" <smurf010@.hotmail.com> wrote in message
news:92554ef7.0402040935.6fce79f1@.posting.google.c om...
> Hi
> I have a problem creating a backup in SQL Server 6.5. Although, the
> backup produced does restore ok, I want to stop this error message
> appearing everytime I make a backup. The error message is:
> "
> [SQL Server ]Can't allocate space for object 'sysbackupdetail' in
> database 'msdb' because the 'default' segment is full. If you ran out
> of space in Syslogs, dump the transaction log. Otherwise, use ALTER
> DATABASE or sp_extendsegment to increase the size of the segment.
> "
> this articles appears to describe the problem and the solution:
> http://support.microsoft.com/defaul...kb;EN-US;152354
> It recommends creating a stored procedure to delete old entries. The
> stored procedure cannot be created due tro a memory problem. What I
> was wondering, although the article doesn't mention it, can a new
> device be created and added to the msdb database. This should fix the
> problem or is there problems doing this ?
> Thanks in advance

I think (from memory) SQL6.5 already has a system stored procedure to clean
up the history for you - look for one called sp_purgehistory or something
similar, and check what the code does. Otherwise, extending the device
should work.

Simon