How can I replicate a source table that doesn't have any primary keys?

We have transactional replication setup in our workplace.
In the source database, there are some tables that do not have any primary key.
1) How can I get these tables to replicate in the current scenario?
2) Is it possible to introduce foreign elements in a replicated instance of the database?
Example, additional records in a table that don't exist in the source or additional tables in the database?

1) You need to add a primary key to this table. There must be a criteria that the app uses to identify which row it wants to up date or delete. If not you might be able to add an identity column to the table and then add a primary key to it. If this is not
possible you might want to use snapshot replication or CDC to do change tracking and then something like SSIS or service broker to move the change to the destination server.
2) yes, but be careful. They should not modify the schema or the data of tables which are being replicated.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

Similar Messages

  • Can EJB 3.0 beans be used with tables that do not have a primary key?

    Can a EJB 3.0 persistence bean be used with tables that do not have a primary key defined? I am building a test application based on the HowTo - Building EJB 3.0 Faces App paper posted after Openworld (schalk). The issue I am running into when trying to run the application is: Exception Description: Entity class [class com.persistence.Rpthead] has no primary key specified. Note: I get a simular error when using toplink directly.
    The tables I am binding to do not have primary keys defined. They use unique constraints to manage the table integrity.
    Is it possible to use EJB 3.0 on tables without a primary key? If not, are there plans to support this in the future?

    The spec requires a primary key Id annotation. I will take your suggestion to EJB 3.0 expert group.
    Can you also send an email to [email protected] with your requirement?
    -Debu

  • How do you find a table that doesn't have a specific word in it.

    I have two questions.
    questions 1
    How do you find a table that doesn't have a specific word in it by using a query on the whole database?
    questions 2
    How would i list all of my cars names in my database not showing duplicates?
    I have tried, tried and tried some more to get both of these, but I guess i don't know how to query a specific word.
    I also don't know how to query everything in just 1 column name.
    If anyone could help with these that would be great I have been trying queries for over an hour now and no luck.
    Thanks

    798837 wrote:
    I tried the all_tab_columns, just like you did it, however that just gives me the column name I am looking for what is not in a column.
    For example I need to find all the tables where mustang is not = 'red' but using a single query i need to find all of the tables.
    As for number 2
    I am looking for something like this
    select distinct column_name
    from all_tab_columns
    where column_name ='AcertainColumn';Now I'm even more confused. In your example, is MUSTANG a column name? Or is it the value of a MODEL column in the CARS table? And how could that possibly relate to something that exists in multiple tables?
    If your data model is at all reasonable, I would expect that you would just want
    SELECT *
      FROM cars
    WHERE model = 'Mustang'
       AND color != 'Red'but I can't see how this would relate to data stored in multiple tables.
    Justin

  • HT4623 how can i update my iphone 4 that does not have the update option in the settings?

    How can i update my iphone 4 that does not have the update option in the settings?

    From the article you linked, scroll down to the section "Update your device using iTunes"

  • A gap between letters started to show in my indesgn files. tried to undo with tracking, the paragraph settings. nothing helped. it ruins the fluent view of the document. how can i restore the program so that doesn't happen?

    a gap between letters started to show in my indesign files. tried to undo with tracking, then with the paragraph settings. nothing helped. it ruins the fluent view of the document. how can i restore the program so that doesn't happen?
    for example: say i write a paragraph. then, in a weird some sort of way an involuntary gap suddenly appears between different letters of random words(i did not recognize any pattern to the gap appearing) throughout the entire paragraph. once i've double clicked on that paragraph, and made a minor change, lets say tapped a 'space' key, and then clicked ctrl+z to undo, it has aligned(or fixed) the entire paragraph and made it look ok again. i've tried numerous ways to undo the entire thing, but cannot find the reason. i've been working for a few years and there's no reason why this thing all of a sudden should happen right now.
    if anyone has stumbled on something like that and can advise, i would welcome it.
    MNS-KG
    Vadim

    yep...i'm typing with hebrew. i'll make a printscreen with the settings you've asked for@:
    if you look closely you'll see that almost every line has a single letter apart. in hebrew there is no usually a singe letter structured words.

  • HT1918 My granddaughter accidentally purchased an app.  How can I secure my device so that doesn't happen?

    My granddaughter likes to play games and I only download the free ones for her because she only uses them briefly.  How can I secure my device so that doesn't happen?

    Depending upon what version of iOS that you have it on, you might have a Settings > General > Restrictions > Require Password setting which you can set to 'Immediately' - there should also be an 'In-App Purchases' setting on the Restrictions screen which you can set to 'off' so as to prevent in-app purchases bein made.

  • How can i do this, Check to see if you have any network monitoring software that might be using your iCloud account

    How can i do this, Check to see if you have any network monitoring software that might be using your iCloud account to automatically send messages, such as firewalls or internet security software configured to send an alert when a potential security issue

    you can try:
    *Wireshark: http://www.wireshark.org/download.html

  • How can I delete a Downloaded book that doesn't go away ?

    How can I delete a Downloaded book that doesn't go away ?

    Back up all data.
    Triple-click anywhere in the line below on this page to select it, then copy it to the Clipboard by pressing the key combination command-C:
    ~/Library/Safari/Bookmarks.plist
    Quit Safari.
    Select
    Go ▹ Go to Folder
    from the Finder menu bar. Paste into the text box that opens (command-V), then press return.
    A folder window should open with a file named "Bookmarks.plist" selected. Move the selected file to the Desktop, leaving the folder open.
    Relaunch Safari. It will open with the default set of bookmarks. Delete them all. Select
    File ▹ Import Bookmarks
    from the Safari menu bar. Import from the bookmarks file you moved to the Desktop. Arrange the bookmarks as you wish.
    If Safari now performs normally, you can delete the old bookmarks file. Otherwise, quit Safari again and put back the file you moved, replacing the newer one with the same name. Close the Finder window and post again.

  • My PC with iTunes on it got fried (lightning).  I have a 2nd PC with iTunes on it.  How can I move my devices to that iTunes (I have recovered data from the drive)

    I had a primary PC that had iTunes on it that got fried by lightning strike a few months ago.  I have several devices (1 iPod, 1 iPad, 3 iPhones) that were synched with that iTunes install.  I had a secondary PC with a separate iTunes installation on it (separate music library.)  I recovered the hard drive so I can move the music to the secondary PC, but how can I sync my devices with that 2nd installation of iTunes without losing all of the information on those devices?  (I haven't saved or synched those devices since the summer.)  Can I keep the playlists from from the first PC?
    Thanks in advance for any and all help.

    Sorted it out. If anyone has this problem i reccommend visiting http://forums.ilounge.com/ipod-classic-ipod-5g-video/237546-ipod-classic-80gb-fr eezes-itunes-need-restore-plz-help-2.html#post1403546 there's some pretty good advice on it. have to go into control panel and re-format iPod into NTFS file. good luck.

  • How do you delete a purchased song that doesn't have a delete option when swiping?  This was a freebie when I first purchased my pad

    How do you delete a purchased song that doesn't give you the delete option when swiping?  This was a free song when I first got my pad. Now I can't delete it. I only get the play option, or to download it again.  The song is "Twinkling Lights", I think that's right.
    Any help with this would be greatly appreciated.
    Thanks!

    I think it is in the cloud, so how do I delete it?  Also, I have IOS 7.1.1

  • How to create entity for the table which is not having the primary key

    Hi,
    Is it possible to create an entity for the table which is not having the primary key.
    I have to write a method in my session bean and that method must use this entity.
    any websites for this.

    If you are talking about processes launched from a JVM (running outside), Process is available.
    If you are talking about processes already running outside of a JVM, you could roll-your-own class to provide similar functionality as Process. This approach would be platform dependent, backed by the platform's I/O scripting and therefore limited to what the platform supports for process manipulation, e.g. Linux/Unix capabilities far exceed Windows.

  • HT1688 Hello, my husband and myself share an email address.  Therefore all of our iCloud information goes to each others devices.  How can we fix this problem so that we both have seperate i Cloud accounts now that this is already established?

    Hello, my husband and myself use the same e mail address.  When I signed up for the icloud with an update, it combined all of our information on both of our iPhones.  How can I get these two phones and information seperate again? 
    Thank you

    Get separate IDs
    RECEIVING MESSAGES INTENDED FOR OTHER DEVICES
    This occurs if you are sharing the same Apple ID for imessages.
    If you are receiving imessages intended for other devices you can fix this by going to Settings>Messages>Send & Receive and do one of the following:
    Uncheck the email address shown under "You can be reached by iMessage at" on both devices if they are iPhones; or
    On one of the devices go to Settings>Messages>Send & Receive, tap the Apple ID, sign out, then sign in with a different Apple ID.  Note: you can continue to share an Apple ID for the iTunes & App store for purchasing if you wish; it does not need to be the same as the ID you use for iMessage, FaceTime, iCloud and other services.
    To prevent merging of your calendars and contacts when syncing calendars and contacts if you are using the same Apple ID for the iCloud account, be sure to set up separate iCloud accounts on each phone with separated IDs.  Remember that if you change your ID in iTunes & App store, that apps and other purchased content is  forever linked to the ID that was used to download the apps and the apps  can only be updated with the ID that was originally used to download them.  To download content purchased previously downloaded with a particular ID then that ID needs to be used to download past purchases.  If you want all apps to be connected with the same ID you need to delete those apps downloaded with the old ID and download them again with your current and if the apps in question were paid apps then you need to pay again.
    Read http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    If you wish to share an Apple ID with family members then read: http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/

  • How can I reset a locked ipad that doesn't react anymore?

    Hey guys!
    i have a problem:
    Yesterday all of a sudden my iPad didn't work properly anymore. At first it was flashing ins stripes with different colours. I tried to fix it by shutting the iPad down, but since it was flashing to much it was not possible to click on "shut down". Therefore i just locked it.
    After a while I wanted to try again, but as i pressed the home button, the screen got a little lighter, but it didn't turn completely on. (The screen was almost black and you couldn't see any buttons or anything else). And now it even stays completely black and doesn't react to anything anymore.
    I wanted to reset the iPad to get to know if it's a hardware or a software problem, but it is locked with a code and since it's not reacting anymore i can't enter it.
    By now I've also never synchronised my iPad with my computer. 
    What can I do? Does anyone have an advice for me?
    How can I reset my iPad without entering the Code in the iPad itself?
    Thank you for your help everybody!

    Hopefully you should be able to reset your iPad, therefore try this: Press and hold both Sleep/Wake and Home buttons until the Apple logo appears.
    The Apple logo ought to appear after about 10 seconds.
    If you don't see the Apple logo, then this could be bad news.
    Normally, the following instructions will resolve a forgotten passcode:
    http://support.apple.com/kb/HT1212
    But if you can't see anything on the screen, then it's bad news again.
    If you have never synced your iPad with iTunes nor with iCloud, then you won't have a backup of your iPad either. Yes, more bad news, because the data on your iPad is most likely lost.
    Try to get at least some life back into your iPad in order to save the data of your device via a backup.
    Good luck!

  • How can i compare 2 internal table's data which have  same structure ?

    hi friends,
    i want to know how  to compare 2 internal table's data which have  same structure

    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA: ITAB LIKE TABLE OF LINE,
    JTAB LIKE TABLE OF LINE.
    DO 3 TIMES.
    LINE-COL1 = SY-INDEX.
    LINE-COL2 = SY-INDEX ** 2.
      APPEND LINE TO ITAB.
    ENDDO.
    MOVE ITAB TO JTAB.
    LINE-COL1 = 10. LINE-COL2 = 20.
    APPEND LINE TO ITAB.
    IF ITAB GT JTAB.
    WRITE / 'ITAB GT JTAB'.
    ENDIF.
    APPEND LINE TO JTAB.
    IF ITAB EQ JTAB.
    WRITE / 'ITAB EQ JTAB'.
    ENDIF.
    LINE-COL1 = 30. LINE-COL2 = 80.
    APPEND LINE TO ITAB.
    IF JTAB LE ITAB.
    WRITE / 'JTAB LE ITAB'.
    ENDIF.
    LINE-COL1 = 50. LINE-COL2 = 60.
    APPEND LINE TO JTAB.
    IF ITAB NE JTAB.
    WRITE / 'ITAB NE JTAB'.
    ENDIF.
    IF ITAB LT JTAB.
    WRITE / 'ITAB LT JTAB'.
    ENDIF.
    The output is:
    ITAB GT JTAB
    ITAB EQ JTAB
    JTAB LE ITAB
    ITAB NE JTAB
    ITAB LT JTAB
    This example creates two standard tables, ITAB and JTAB. ITAB is filled with 3 lines and copied to JTAB. Then, another line is appended to ITAB and the first logical expression tests whether ITAB is greater than JTAB. After appending the same line to JTAB, the second logical expression tests whether both tables are equal. Then, another line is appended to ITAB and the third logical expressions tests whether JTAB is less than or equal to ITAB. Next, another line is appended to JTAB. Its contents are unequal to the contents of the last line of ITAB. The next logical expressions test whether ITAB is not equal to JTAB. The first table field whose contents are different in ITAB and JTAB is COL1 in the last line of the table: 30 in ITAB and 50 in JTAB. Therefore, in the last logical expression, ITAB is less than JTAB.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • How can I use a mySQL database schema with numeric auto increment primary key instead of GUID?

    Hello!
    I'm using the TestStand "MySQL Insert (NI)" database schema with GUID as primary key. So everything works fine.
    But I prever using numeric values as primary key, because the database is in conjunction with another database which uses numeric values as primary key.
    Is this possible?
    Has anyone an idea how I can modify the "Generic Recordset (NI)" for use with MySQL?
    Thanks!
    Configuration:
    Microsoft Windows XP
    TestStand 3.1
    MySQL 4.1.12a
    MySQL ODBC 3.51 Driver
    Brosig

    Adam -
    The TestStand Database Logging feature does not allow you to run a separate SQL command after executing the command for a statement(table), so I do not think that you can use an auto incrementing column for the tables. There is just no way to get it back in a generic way. One option that I tried is something similar to the Oracle schema where you call a store procedure to return a sequence ID for each record that you want to add.
    So you would have to create the following sequence table in MySQL:
    CREATE TABLE sequence (id INT NOT NULL);
    INSERT INTO sequence VALUES (0);
    Then create a stored procedure as shown below that will increment the sequence value and return it in a recordset:
    CREATE PROCEDURE `getseqid`()
    BEGIN
            UPDATE sequence SET id=LAST_INSERT_ID(id+1);
            SELECT LAST_INSERT_ID();
    END
    Then update the MySQL tables to use INT primary and foreign key values, so the TestStand MySQL SQL file to create all tables would have text like this:
    CREATE TABLE UUT_RESULT
     ID    INT  PRIMARY KEY,
    ~
    CREATE TABLE STEP_RESULT
     ID    INT  PRIMARY KEY,
     UUT_RESULT   INT  NOT NULL,
    ~
    Then update the schema primary and foreign key columns in the TestStand Database Options dialog box to be INT to match the table. For the primary key columns, you will have to set the Primary Key Type to "Get Value from Recordset" and set the Primary Key Command Text to "call getseqid()". This will call the stored procedure to determine the next value to use as the ID value.
    Hope this helps...
    Scott Richardson
    National Instruments

Maybe you are looking for