2012 Oct 04 3:21 PM
Can we delete Primary Key fields of a transparent table which is already having the data in Production Server?
If Yes, could you help me out with the procedure
2012 Oct 04 3:24 PM
You can not do it in Production directly, rather u need to do in development server and transport , transport request to production.
once transport request is in production, run SE14 to adjust the database table.
You can not do it in Production directly, rather u need to do in development server and transport , transport request to production.
once transport request is in production, run SE14 to adjust the database table.
2012 Oct 04 3:24 PM
You can not do it in Production directly, rather u need to do in development server and transport , transport request to production.
once transport request is in production, run SE14 to adjust the database table.
2012 Oct 04 3:32 PM
Deleting primary key fields will most likely lead to duplicate keys, so you will lose data when adjusting the table as suggested above.
Make sure you know what you are doing, search for additional information and documentation.
Thomas
2012 Oct 10 7:20 AM
Hi,
Yes you can delete pk's but one pk is mandatory and after deleting the pk u can adjust the table in tcode : SE14 without lose of data/records.
Regards
Mahesh
2012 Oct 10 12:36 PM
Hi,
Yes you can delete the primary key of a transparent table but you should not do it in production server
because once you delete the primary key field, system will ask you to activate and adjust the table again, you can do it through SE14 tcode by selecting activate and adjuct option, but there are chnces
of table data might be deleted.
Regards
Pankaj
2013 Jan 08 10:38 AM
Hi Kalyan,
The Primary key field can be removed , also the primary key field can be deleted irrespective of the table being present in Production / Dev server.
Since, the transparent table is present in Production, it can be risky do make any major changes without proper approvals.
Please make sure to make adjustments in Table definition from Database Utility.
Utilities - > Database Object -> Database Utility
Regards
Vivek Batta
2013 Jan 09 1:29 PM
you cannot delete primary key fields of table which have data. create another table in dev, and move to production and copy data...and then delete table. Note: table name should update all objects which have used this table.
2013 Jan 10 2:35 PM
The way suggested above .... is a good procedure one should follow ( especially in Dev / Prod ) server.
However, I once tried deleting the primary key field in sandbox server and was able to keep the data intact after deleting the primary key field. After making the changes, the DB structure was adjusted using DB utility
I feel, there might be a difference in how we approach the scenario here.
2013 Jan 10 8:31 PM
In your example, you did not lose data because the combined values in the remaining primary key fields were still unique. Suppose you remove FATHER_NAME as well, then you would lose one of the two EID = "2" / ACC_NO = "112" rows after adjusting the table.
Thomas
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |