How To Determine If A Record Is Not Sync'd

Aug 10, 2007

Hello.


I'm not sure if this is possible, but I was hoping to get an answer
here. I'm creating a Windows Mobile 5.0 Smartphone program which
uses SqlCeResultSets as its data objects.





I was wondering if there is
anyway to easily tell if there are records which have been inserted
into the local DB but have not been sync'd up to the publisher yet.





I use merge replication to sync the device with the host and I know
that the merge replicator obviously can tell the difference. Is there
any special field or flag that I can check to see if the record is
only local, on the subscriber side??









Thanks!
SMP

View 1 Replies


ADVERTISEMENT

Determine When A New Record Is Added To A Database

Dec 31, 2007

I have a SQL database that gets populated by another program. Is there a way to determine when a new record is added to that database?

Thanks

View 4 Replies View Related

Determine Which User Has Locked A Record

Jul 23, 2005

I'm trying to determine which user has locked a given record from VB6.I know I can use sp_lock and sp_who, and match up the data to determinewhich users have locked records in my database, however I haven't seen a wayto match the specific user to the specific record. What am I missing here?Thanks!*David*

View 5 Replies View Related

How To Determine Which Record Was Updated Using A Update Trigger?

May 8, 2008



Im using a trigger to check updates on particular table and execute a email. it works but it doesnt show the right record
im looking into one table called SiteInfo.
here is my code
Im using sql 2005, can someone look at my code or the select statement.


SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

-- =============================================

-- Author: <Author,,Name>

-- Create date: <Create Date,,>

-- Description: <Description,,>

-- =============================================

CREATE TRIGGER TTSUpdate

ON SiteInfo

FOR UPDATE

AS

declare @SiteID varchar(10)

declare @Body2 varchar(2000)

declare @Sitename varchar(50)

declare @TTSCreate varchar(30)

declare @TTSCreator varchar(50)

declare @Subject2 varchar (100)



SELECT @SiteID = SiteID,@Sitename = AccountName,@TTSCreator = TTSOwner,@TTSCreate = TTSCreatedDate

from SiteInfo



SET @Body2 = 'New TTS site created: ' + @Sitename + ' With TTS Site ID:' + @SiteID + ' TTS was created on: ' + @TTSCreate + ' By:' + @TTSCreator

SET @subject2 = 'New TTS site created: ' + @Sitename

EXEC msdb.dbo.sp_send_dbmail

@profile_name = 'TTSAdmin',

@recipients = 'email address here',

@subject = @subject2,

@body = @body2

GO

View 3 Replies View Related

TOUGH INSERT: Copy Sale Record/Line Items For Duplicate Record

Jul 20, 2005

I have a client who needs to copy an existing sale. The problem isthe Sale is made up of three tables: Sale, SaleEquipment, SaleParts.Each sale can have multiple pieces of equipment with correspondingparts, or parts without equipment. My problem in copying is when I goto copy the parts, how do I get the NEW sale equipment ids updatedcorrectly on their corresponding parts?I can provide more information if necessary.Thank you!!Maria

View 6 Replies View Related

How To Create An Copy Of A Certain Record Except One Specific Column That Must Be Different &&amp; Insert The New Record In The Table

Sep 1, 2006

Hi
I have a table with a user column and other columns. User column id the primary key.

I want to create a copy of the record where the user="user1" and insert that copy in the same table in a new created record. But I want the new record to have a value of "user2" in the user column instead of "user1" since it's a primary key

Thanks.

View 6 Replies View Related

Ways To Make This Work: Several Selectable Related Record For One Main Record.

Apr 6, 2007

Hey all!



Sorry for the less then descriptive post title but I didn't find a better way to describe it. I'm developing an app in the express editions of VB and SQLserver. The application is a task/resource scheduler. The main form will have a datepicker or weekly overview and show all tasks scheduled per day. The problem is, I've got one or more people assigned to tasks and I wonder what's the best way to design this. Personally, I'd go for one Task table, a People table and a table that provides a link between them (several record per task, one for each person assigned linking TaskID and PplID). However, I don't see a nice way of showing this data to the end user, allowing him to edit/add etc on ONE screen.

To fix that the only way I see is just add columns to the Task table for every person with select boxes. This way everything can be done on one simple screen. This obviously does present some future issues.

On top of this, which people are available on a day varies and there should be an option to allow a user to set who is available on a specific day. Which would lead me to my first idea and add another table that would provide this. but then I'm having design issues again for the form.



I'm kinda stuck atm, can anyone shed some light on this. I'm sure there is an elegant way of doing this but I'm failing at finding it.



Thanks in advance,

Johan

View 5 Replies View Related

Query Timeouts When Updating A Record Retrieved Through A Websphere JDBC Datasource - Possible Record Locking Problem

Apr 7, 2008

Hi,

We're running a Sage CRM install with a SQL Server 2000 database at the back end. We're using the Sage web services API for updating data and a JDBC connection to retrieve data as it's so much quicker.

If I retrieve a record using the JDBC connection and then try and update the same record through the web services, the query times out as if the record is locked for updates. Has anyone experienced anything similar or know what I'm doing wrong? If I just use DriverManager.getConnection() to establish the connection instead of the datasource, and then continue with the same code I don't get these record locking problems. Please find more details below.

Thanks,
Sarah

The JDBC provider for the datasource is a WebSphere embedded ConnectJDBC for SQL Server DataSource, using an implementation type of 'connection pool datasource'. We are using a container managed J2C authentication alias for logging on.

This is running on a Websphere Application Server v6.1.

Code snippet - getting the record thru JDBC:


DataSource wsDataSource = serviceLocator.getDataSource("jdbc/dsSQLServer");
Connection wsCon = wsDataSource.getConnection();


// wsCon.setAutoCommit(false); //have tried with and without this flag - same results

Statements stmt = wsCon.createStatement();


String sql = "SELECT * FROM Person where personID = 12345";
ResultSet rs = stmt.executeQuery(sql);


if(rs.next()){
System.out.println(rs.getString("lastName"));
}

if (rs != null){
rs.close();
}
if (stmt != null) {

stmt.close();
}
if (wsCon != null) {

wsCon.close();
}

View 1 Replies View Related

SSIS: Multi-Record File Extract With 9 Record Types

Feb 26, 2008

I am attempting to create a multi-record file (as described in my last thread) and have found the following set of instructions very helpful:
http://vsteamsystemcentral.com/cs21/blogs/steve_fibich/archive/2007/09/25/multi-record-formated-flat-file-with-ssis.aspx

I have been able to create a sample file with two of my record types.

I now need to build on this further, because I have 9 record types in total that need to be extracted to a single flat file.

does anyone have any ideas how I might extend the example above to include more record types or know of another means of achieving this?

Thanks in advance for any help you might be able to provide.


View 3 Replies View Related

Add Date To Record In SQL Server Each Time Record Is Added

Mar 1, 2006

Hi
 
Can anyone advise me as to how I can add the date and time to 2 columns in the sql server database for each record that is added. I'd prefer not to use the webform. Can sql server add the date automatically to the row?
thanks

View 6 Replies View Related

Restrict Inserting Record If Record Already Exist In Table

Apr 17, 2014

Is that possible to restrict inserting the record if record already exist in the table.

Scenario: query should be

We are inserting a bulk information of data, it should not insert the row if it already exist in the table. excluding that it should insert the other rows.

View 2 Replies View Related

Delete Record Based On Existence Of Another Record In Same Table?

Jul 20, 2005

Hi All,I have a table in SQL Server 2000 that contains several million memberids. Some of these member ids are duplicated in the table, and eachrecord is tagged with a 1 or a 2 in [recsrc] to indicate where theycame from.I want to remove all member ids records from the table that have arecsrc of 1 where the same member id also exists in the table with arecsrc of 2.So, if the member id has a recsrc of 1, and no other record exists inthe table with the same member id and a recsrc of 2, I want it leftuntouched.So, in a theortetical dataset of member id and recsrc:0001, 10002, 20001, 20003, 10004, 2I am looking to only delete the first record, because it has a recsrcof 1 and there is another record in the table with the same member idand a recsrc of 2.I'd very much appreciate it if someone could help me achieve this!Much warmth,Murray

View 3 Replies View Related

Switch Record Background Color With Each Record In Report

Jan 14, 2008

Hi Everyone-

i have a matrix report
and i want to switch the record background color with each record in the value column in that matrix report
e.g 1st record background color is gray and next record background color is white
and then the next record background color is gray ... and so on

can anyone help?

thanx
Maylo

View 8 Replies View Related

Sync Two Tables

Feb 22, 2008

Hi Forum, Ive been unsuccessfully trying to copy data from one table to another, very simple scenerio!
Table1 ID(PK), FirstName, Mobile, Date.
Table2 FirstName, Mobile.
The first question I have is should I fill Table2 at the insert stage OR should/do I update Table2 from Table1 as the users details are entered. ie create some kind of relationship.
Really appreciate good advice! cheers P
 

View 7 Replies View Related

Sync DBs On Different Servers

Apr 18, 2005

I have two db instances on different SQL Servers. One is my test db and the other the prod. db. Each has two tables that hold lookUp values for the entire application. I would like to keep these tables in sync. in both dbs. The prod. db would be the master. I was trying to design a trigger to insert, update, or delete the appropriate records in the test db as they were added or deleted from the prod db.
I'm getting too many prefixes errors on the script when trying to reference the table on the test db using four part naming convention.
Any ideas on how to resolve this issue? Do I need to set up a linked server to accomplish this functionality? If so, how do I setup security for a linked server?
Thanks in advance.
Oscar

View 1 Replies View Related

Out Of Sync User IDs

Jan 31, 2000

I have a SQL 7 backup file that I restored onto a new server. All the objects within the database are not owned by dbo, instead they are owned by a db user. When I tried to login to the db it said that it wasn't a valid user. So I added the login to the system. Now when I login it says it is not a valid db user. I have attempted to sync the id's but don't know how. In 6.5 I could run an ad-hoc query to match the SUID's for the system and the database. In 7.0 I can not because the suid for the db is computed. Any ideas on how to sync the user ID's so that I can login to the server using the target db as my default and can query the table with prefacing the owner(I can get in if I give my login SA privelages but then I have to preface all the objects with the owners name)?

Thanks in advance for any help that you can offer.

View 2 Replies View Related

Best Way To Sync Database.

Feb 20, 2003

hi,

we currently have a web server/db on-site and a similar backup machine across the country. we're using a pretty bad backup strategy. we zip up a backup file, thats done on the main server every night, then ftp over to the back up server then run a restore.

lately ive been having problems with the main server. i would like to have the machines sync'd up as close as possible.

ive searched the threads and noticed replication and log shipping to be the most practical, but im assuming most of the machines are on the same domain.

what would be my best bet for machines connected over the internet, no vpn?

also the db on the main machine get queried/inserts all day from 7am - 6:30pm

thoughts?

thx

View 1 Replies View Related

Sync Between Two Systems

Mar 18, 2007

I need to syncronize two separate databases. One is SQL Server the other is MySql. I don't have a lot of experience with MSSQL and need a little advice on how best (in terms of speed especially) to gather records that have been added since the last sync and any that have been modified. The table in question has datetime fields for both, the time each record was created (CreatedTime) and the time that the record was last modified (ModifiedTime). Sync will happen daily.

I have worked out a few ways I might do this with DATEADD or DATEDIFF, but my question is, what is the most effecient way? Currently I'm just looking for a way to get inserted and updated records from SQL Server to MySQL. I may have to do a two way sync of some sort later.

View 2 Replies View Related

3 Sql 2000 Sync

Mar 19, 2006

I need to make a sync between 3 or more SQL Servers. We have 3 Small Business server with sql server 2000. In all the 3 locations, branch and headquarters we've the same databate data.
For sync with 2 there's no problem. I need to make it with three and then at the end of the year with four.
Can anyone help me?

Cheers

João Almeida

View 1 Replies View Related

Sync Procedure

Jul 23, 2007

how do i write a sync procedure that syncs both tables and ensures that Table_2 keeps all services that are listed in Table_1

how do i write a procedure for the sync between both tables, and put this procedure into the package

so basically there have to be two sync parts: First is INSERT of what is not yet existing, second one is UPDATE on the appropriate attributes.

How would i write this sync procedure?

View 1 Replies View Related

Sync Procedure

Jul 23, 2007

how do i write a sync procedure that syncs both tables and ensures that Table_2 keeps all services that are listed in Table_1

how do i write a procedure for the sync between both tables, and put this procedure into the package

so basically there have to be two sync parts: First is INSERT of what is not yet existing, second one is UPDATE on the appropriate attributes.

How would i write this sync procedure?

View 2 Replies View Related

Sync Tables

Sep 24, 2007

Hi all,

I have three tables and i want to bring all tables into sync.
My problem is that the difference in the amount of records is huge.

CORE -- 85659 This table doesnt have a PK
CRF -- 59895 This table has a composite key (MIN,MAX)
DS -- 58595 This table also has a the same composite key (MIN,MAX)

All the tables have their own UIDs. Additionally CRF has a column which stores the UID of CORE table and DS has a column which stores UID of the CRF table.

CORE --> CRF --> DS
UID --> UID,CORE_UID --> UID,CRF_UID

I have only 3 columns (UID, MIN, MAX) that can be used to sync all the tables. Can anybody help me...?

Thanks in advance....

View 3 Replies View Related

Sync Database

Jan 17, 2008

I want to synchronize two databases. Is there a query or a tool to synchronize them?

View 3 Replies View Related

Sync'ing 2 Databases

Jul 20, 2005

Hello,I've got 2 databases (both on MS-SQL Sever2k). One of them (remote)contains table which is often updated. For various reasons I'd like tomaintain a copy on local MSSQLServer. Is there any built-in mechanism whichallows to do such things?! I can do this manually, by examining the remotetable contents, and downloading new stuff (local table cannot be modified inany other way), but I guess that there is a smarter way. Any ideas?!ThanksPiotrek

View 1 Replies View Related

Log Shipping - Out Of Sync

Jul 20, 2005

I have tried to set up log shipping for one of our databases - firsttime. Using EM I was able to create the job and maintenance plansucessfully. I wasn't able to find any errors in any logs. In themonitor server, when I look at job history, everything is gettingcopied and loaded sucessfully, yet the STATUS in the log shippingmonitor states it is out of sync.How do I get this into sync? I have set the out of sync threshold to45 minutes. I have made changes in our production database and thosechanges are showing up in the standby database, so it all appears tobe working.Thanks.

View 1 Replies View Related

Data Sync

Feb 11, 2008



I have two databases data1(Express 2005) and data2( Enterprise 2005). Data1 is a subset of Data2. Now beginning from that state any changes to either database should be reflected on both of them.
Now what's my best solution to accomplish this considering one is the subset of other??

Thanks

View 3 Replies View Related

Wierless Sync

Feb 5, 2007

What is the best solution to run a disconnected database on a tablet pc and then sync wirelessly to a SQl Server database?

Thanks

View 1 Replies View Related

Log Shipping : Out Of Sync

Aug 29, 2006

I set up log shipping,

after a while the log shipping pair in LogShip Monitor is out of sync.

what cause this & how to solve this problems.



thx

View 5 Replies View Related

Log Shipping Out Of Sync

Dec 21, 2005

I have set up a database with log shipping to the backup server. I have actually set it up multiple times because it continues to get out of sync, and I do not know another way to get it back in sync (despite much effort to learn how). I have not found much documentation in BOL, nor in the on-line areas that I can find. I have not been able to discover why it keeps getting out of sync.

If there is anyone who may shed some light on this, I would be very greatful.

Particulars (both servers):

Windows ADV Server 2003
SQL 2000 (Enterprise Ed.)
Servers on a work group (not domain)


There is a separate database on the same servers that continues to have successful log shipping.

Thank you very much (in advance).

View 1 Replies View Related

Log Shipping, Out Of Sync

Aug 26, 2006

what is the work around for Out of Sync error?

What cause this problems ?



thx

View 1 Replies View Related

Web Sync Wizard On XP Box

Jan 14, 2007

I have (finally) successfully gotten through the maze and 'published' my database to a folder:

Physical path: I:SqlReplication

unc: WarrenassocSQLReplication

Since I'm running XP pro, I don't have the options of assigning specific read/write permissions to a folder.

However it appears the problem is with accessing the snapshot and the logon's there.



When I run the IIS Web Configure wizard I error out at the snapshot share permissions step (see report below)

Wizard Settings:

Click Finish to perform the following actions:


Modify a virtual directory immediately.

Copy the ISAPI dll 'sqlcesa30.dll" to 'I:SqlReplication" immediately.

Set NTFS permissions immediately.

The virtual directory 'SqlReplication' will be configured with the following options:


On server 'WARRENASSOC'.

Use 'SqlReplication' as the alias.

Use 'I:SqlReplication' as the physical path for the virtual directory.

Use 'Anonymous' as the authentication method(s).

Do not require secure channel.

Set user permissions to 'Execute'.

Clients can use 'http://WARRENASSOC/SqlReplication/sqlcesa30.dll' as the Internet URL.

'sqlcesa30.dll' will be copied from 'C:Program FilesMicrosoft SQL Server 2005 Mobile Editionserver' to 'I:SqlReplication'.



'WARRENASSOCEd Warren' will get the following NTFS permission:


'Read & Write' on physical path 'I:SqlReplication'.

'Read & Execute' on the ISAPI DLL 'I:SqlReplicationsqlcesa30.dll'.

'Read' on share physical path '\WarrenassocI$SqlReplication'.

'Read' on the share '\WarrenassocI$SqlReplication'.





- Modifying the virtual directory (Rolled back)

- Copying the ISAPI DLL (Rolled back)

- Setting the directory permissions (Rolled back)

- Setting the server agent permissions (Rolled back)

- Setting the snapshot directory permissions (Rolled back)

- Setting the snapshot share permissions (Error)



Messages

The operation completed successfully. (Exception from HRESULT: 0x80070000) (mscorlib)


- Modifying the Virtual Directory configuration file. (Stopped)







When I created the snapshot I used my personal logon (admin rights) at each step

I've tried all combinations of setting the permissions in the wizard from requiring a login and providing my personal login to no requirements and I get the same error.



I'm trying to set up to copy a database from my SQL Server 2005 --> SQl Server CE 31 RC1

to see it it meet my development needs.

I'm at a loss as to how to navigate the security maze!!

Thanks Edward Warren.









View 8 Replies View Related

Log Shipping Going Out-of-sync

Jan 24, 2006

Hello everyone:

I wanted to ask a question about log shipping going out of sync. We have a remote server in the UK that is our production server, and we are trying to set up log shipping with another server in the US. Our Log shipping monitor goes "out-of-sync" after about 8-10 hours. We changed the US server to have the same time as the server in the UK, but there still seems to be an out of syn error after 8 hours.

We are using Windows server 2000 and SQL server 2000.

SQL server will restore logs then after a few hours it stops restoring and goes out of sync. Was just wondering if someone knew the possibilities of why.

Thank you.

View 2 Replies View Related

Sdf Sync Query

May 6, 2008



Hi guys
Is there anyway to sync a sdf database on a device with a mdb database on a desktop

Thanks

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved