Adding a new Big INT column to existing table in production, which holds 700 million records will impact anything in production?
Hi Guys,
I have to add a new Big INT column to existing table in production, which holds 700 million records and would like to know the impact?
I have been tolled by one of my colleagues that last time they tried adding a column to same table during working hour and it locked out the table and impacted the users.
Please suggest/share If any one had similar experience.
Thanks Shiven:) If Answer is Helpful, Please Vote
If you add a new column to a table using an ALTER TABLE ADD command and specify that the new column allows NULLs and you do not define a default value, then it will take a table lock. However, once it gets the table lock, it will essentially run instantly
and then free the table lock. That will add this new column as the last column in the table, for example
ALTER MyTable ADD MyNewColumn bigint NULL;
But if you your change adds a new column with a default value, or you do something like using table designer to add the new column in the middle of the current list of columns, then SQL will have to rewrite the table. So it will get a table lock, rewrite
the whole table and then free the table lock. That will take a considerable amount of time and the table lock will be held for that whole period of time.
But, no matter how you make the change, if at all possible, I would not alter a table schema on a production database during working hours. Do it when nothing else is going on.
Tom
Similar Messages
-
Adding a new item to an already existing BOM
Hi,
I am having a problem adding a new item to an already existing parent BOM.I excute the following code (as per the SDK).
Dim vProdTree As SAPbobsCOM.ProductTrees
Set vProdTree = vCmp.GetBusinessObject(oProductTrees)
'Set Values to the fields
vProdTree.TreeCode = "Item1"
vProdTree.TreeType = iProductionTree
'Set Values to the Assembly parts of the
'First Assembly
vProdTree.Items.ItemCode = Excel.Row(Cell1)
vProdTree.Items.Price = 20
vProdTree.Items.Quantity = 1
vProdTree.Items.Currency = "Eur"
'Adding the Product Tree
RetVal = vProdTree.Add
If (RetVal <> 0) Then
vCmp.GetLastError ErrCode, ErrMsg
MsgBox ErrCode & " " & ErrMsg
End If
If there is no parent BOM production tree with keycode Item1, then when the above code is run for the first time, it works.The issue occurs when I run change my excel, Cell1 to a different value and run the program again. The error states that the code already exists, which is correct, but does not append the item to the existing BOM.
I have tried vProdTree.Update, but this line overwrites the original child item in the BOM, rather than appending a new item, which is what I want it to do.
Any help is appreciated.
- Adrian.VYour issue here is how the "Items" (which is actually pointing to ProductTree_Lines object) works. It is a List of items, and when you get the object is always pointing at the first item in the list.
So for example, to add a BOM with two items you would need to set the details of the first Item and then add a line using vProdTree.Items.Add() before setting the values for that item.
e.g.:
Dim vProdTree As SAPbobsCOM.ProductTrees
Set vProdTree = vCmp.GetBusinessObject(oProductTrees)
'Set Values to the fields
vProdTree.TreeCode = "Item1"
vProdTree.TreeType = iProductionTree
'Set Values to the Assembly parts of the
'First Assembly
vProdTree.Items.ItemCode = Excel.Row(Cell1)
vProdTree.Items.Price = 20
vProdTree.Items.Quantity = 1
vProdTree.Items.Currency = "Eur"
'Add a second item to the BOM
vProdTree.Items.Add
vProdTree.Items.ItemCode = Excel.Row(Cell2)
vProdTree.Items.Price = 50
vProdTree.Items.Quantity = 1
vProdTree.Items.Currency = "Eur"
'Adding the Product Tree
RetVal = vProdTree.Add
If (RetVal 0) Then
vCmp.GetLastError ErrCode, ErrMsg
MsgBox ErrCode & " " & ErrMsg
End If
To do what you want to do, which is get the BOM and add a new item to it, you will need to do this:
Dim vProdTree As SAPbobsCOM.ProductTrees
Set vProdTree = vCmp.GetBusinessObject(oProductTrees)
'Get your BOM by key
vProdTree.GetByKey("Item1")
'Add a second item to the BOM
'First Item exists so you need to add a new row
vProdTree.Items.Add
vProdTree.Items.ItemCode = Excel.Row(Cell1)
vProdTree.Items.Price = 50
vProdTree.Items.Quantity = 1
vProdTree.Items.Currency = "Eur"
'Update the Product Tree
RetVal = vProdTree.Update
If (RetVal 0) Then
vCmp.GetLastError ErrCode, ErrMsg
MsgBox ErrCode & " " & ErrMsg
End If
Method one allows you to add multiple lines as you add the object (which makes more sense), method 2 allows you to get the object after it has been added and add multiple lines to it. This is similar to how the Document_Lines object works. -
Adding a new DB Node in the existing SharePoint 2007 Farm.
Hello,
Recently we got a requirement to add a new DB server (SQL Server 2007) to the existing MOSS 2007 Production Farm. Can any one please help me out to list out the steps that need to be followed for adding the new DB server to the existing Production Farm.
We are planning to use the new DB server only for holding Content DB's and no plan for any Config DB,SSP DB or Search DB.
Thanks in advance for your helpHi,
Also I am going to clone from Source app tier (RHEL4) to target app tier (RHEL5)?
Are there any issue with the platform version changing?There should be no issue -- Just make sure you have all the OS pre-req. software and packages installed on the RHEL5 node.
FAQ: Cloning Oracle Applications Release 11i [ID 216664.1] -- 13. Can I clone from one operating system version to another?
Oracle Applications 11i Installation on OEL5 or RHEL5 [ID 730444.1]
Oracle Applications Installation Update Notes, Release 11i (11.5.10.2) [ID 316806.1]
Thanks,
Hussein -
Best approach to publish new table or new column on existing table on MDW?
Hi,
I'm refering to Olite R3 without any patches. I don't use Java API, I use MDW.
if I have a new table or a new column on a existing table, what's the best approach to publish it?
I'm asking this because I've trying lots of approaches and the only solution was, step-by-step:
1) On MDW, drop the publication item
2) Add again the publication item
3) Associate the publication item to the publication
4) Save everything
5) File / Deploy (if I don't do it, it does not work)
6) Tools/Package... (that's where it's a problem: if I don't remove the app and create it again it does not work!)
7) on the client side, I perform a msync with "force refresh"
That's the only way I found to publish new items for sure. Any other action does not push the new table or new column to the client's embbeded DB.
Any comments?
Regards,
Maurício Américo Vernaschi.I do not use MDW, rather a mix of java and the final publish step you use, but
Adding new PIs should be easy, just add them and re-publish (no need to drop anything)
for changes, if you just have new columns and the sql statement is 'select * from' then you should just need to make the changes in the base schema objects, and run the publish with no changes and the updates should be picked up. If selecting specific columns, then update and re-publish.
When using MDW at the end you can save the application as a jar file, and then use this jar file to publish in the mobile manager - this is the best wayto publish.
Have a look at this jar file in winzip, and you will find it contains a web.xml file. This is the xml definition of the publication items, and for simple changes it is possible to just edit this file and republish via the mobile manager -
How to update (add new data in different tab) existing table from Excel
i've an existing table, for instance User Profile table, it consists of few tab in the table which contains different data... recently i've added new tab to the existing table and i would like to upload a particular data for this new tab... is there any way to upload (insert new data for the tab on existing data) this particular data into the existing table from Excel file?
could it be done by using lsmw?
Edited by: Yeong Kang Liew on Apr 5, 2010 4:35 AMCheck HELP on MODIFY & UPDATE statements.
-
How to add columns for existing table dynamically?
Hi,
I created table structure only. I want to add columns for this existing table. Columns are not fixed, according to the user choice i need to write code.
Plz give me reply asap.
Thanks
ShirishaHi Shirisha,
I think the following code snippet will help you.
int l_no_cols = 0;
//Get the number of columns in this variable, something like the following
//l_no_cols = wdContext().currentContextElement().get<Context_attribute_name>;
IWDTable l_tab;
IWDTransparentContainer l_tbl_cont = (IWDTransparentContainer)view.getElement("TableDataCont");//ID of Container
l_tab = (IWDTable)view.getElement("TableData");//ID of Table
l_tab.setVisible(WDVisibility.VISIBLE);
l_tab.bindDataSource(wdContext.nodeTable_Data().getNodeInfo());
for(int a = 1; a <=l_no_cols; a++)
//Creating the column
IWDTableColumn l_tab_col = (IWDTableColumn)view.createElement(IWDTableColumn.class,"COL"+a);
//Creating Caption for Column Header
IWDCaption l_tab_cap = (IWDCaption)view.createElement(IWDCaption.class,"Caption"+a);
l_tab_cap.setText("Col"+i);
l_tab_col.setHeader(l_tab_cap);
//Creating Table Cell Editor for column
IWDInputField l_tab_cell = (IWDInputField)view.createElement(IWDInputField.class,"CellEditor"+a);
//creating context node attribute for the column dynamically
wdContext.nodeTable_Data().getNodeInfo().addAttribute("Col"+i,"com.sap.dictionary.String");
l_tab_cell.bindValue(wdContext.nodeTable_Data().getNodeInfo().getAttribute("Col"+i));
l_tab_col.setTableCellEditor(l_tab_cell);
l_tab.addColumn(l_tab_col);
l_tbl_cont.addChild(l_tab);
Regards,
Alka -
Add additional column in existing table
Hello guys,
I need to add new columns to the existing table, but when I'm trying to add, nothing happens. Checked table itself and all Rows and Column fields are read-only. Can't see any property which indicates this locking behavior. I'm using ES2 LC.
Thanks,
UldisYou can use an APPEND function.
Append Structures (SAP Library - Tables) -
Adding a new Substitutable Field in OBBH - BKPF Table
Hi All,
I need to modify the content of the field BKPF-WWERT and BKPF-KURSF in Tcode OBBH using substitution logic.
I have even used user exit options to do so but my changes are reversed the moment once the user exit is over.
I know for a fact the fields which can be modifed are maintained in the table GB01.
Is there any way we can modify the table in Standard way using some Tcode?
Please help me out. This is very urgent.
Regards,
Binay AgarwalHi Dave,
Can this change result is some kind of problem in some SAP standard code somewhere? Any idea?
Please let me know. I will surely reward points. I have done the changes and it seems to work.
Regards,
Binay Agarwal -
Issue adding a new column to OBIEE presentation layer
Hi,
I am pretty new to OBIEE so this may be a silly question. I am facing some problems trying to add a new column from a physical table the OBIEE presentation layer.
Below are the steps I followed:
Task: add a product category set to the presentation layer.
Steps:
1) First verified that the product category set is being populated in the W_PROD_CAT_DH table in the datawarehouse. this was done by running the following sql
SELECT W_PROD_CAT_DH.TOP_LVL_PRODCAT_NAME
FROM W_PROD_CAT_DH, W_INVENTORY_PRODUCT_D
WHERE W_PROD_CAT_DH.integration_id = W_INVENTORY_PRODUCT_D.INV_PROD_CAT1
This sql gave the right category value.
2) created a "Alias" of the table W_PROD_CAT_DH in the OBIEE Admin tool physical layer. (done by right clicking W_PROD_CAT_DH >>New Object>> Alias)
3) named the Alias of W_PROD_CAT_DH as "Dim_W_INV_MKT_CAT" and created a key of the alias named "integration id" on the column "integration_id"
4) opened the pre-existing alias of W_INVENTORY_PRODUCT_D the alias was called "Dim_W_INVENTORY_PRODUCT_D" and added a key called "MKT_CAT" on the column "INV_PROD_CAT1" in this alias (Dim_W_INVENTORY_PRODUCT_D of the table W_INVENTORY_PRODUCT_D)
5) in the alias of the "W_INVENTORY_PRODUCT_D" called "Dim_W_INVENTORY_PRODUCT_D" added a "Foreign Keys" the expression of the key is following: ("Oracle Data Warehouse"."Catalog"."dbo"."Dim_W_INV_MKT_CAT"."INTEGRATION_ID" = "Oracle Data Warehouse"."Catalog"."dbo"."Dim_W_INVENTORY_PRODUCT_D"."INV_PROD_CAT1")
Logical layer
6) Opened the existing logical folder called "Dim - Inventory Product" and clicked on "Sources" tab then double clicked the source "Dim_W_INVENTORY_PRODUCT_D" and added a new mapping under "Map to these tables" under "General" tab. The column that was added was the physical alias "Dim_W_INV_MKT_CAT"
7) added a new column mapping to the same logical table source (Dim_W_Inventory_PRODUCT_D) this new mapping was a column from the alias "Dim_W_INV_MKT_CAT" (column name "TOP_LVL_PRODCAT_NAME")
Presentation Layer
8) dragged the newly added column (TOP_LVL_PRODCAT_NAME) from the logical layer "Dim - Inventory Product" to the presentation layer "Product" folder.
ISSUE
after adding everything and checking global consistency and save and checking-in my work when i login from the front end presentation services. I see the newly added column is showing under the "Product" folder. on dragging the column by itself to the Ad-Hoc analysis I can see the different values of the category. On adding a second column from the same logical folder (Dim - Inventory Product in logical layer) i still see the right product name and corresponding category. BUT when I drag any other column from any other folder (such as "Day" from "Time" or any fact values) the result does not fetch any data (message: The specified criteria didn't result in any data.)
I am not sure if I am missing any step but I know I am mapping the new table alias to the inventory_product_d since i see right results on creating analysis of columns in those two folders. but no other folders give me any data.
I also know that the logical folder "Dim - Inventory Product" is joined with other tables as I can see results when i do not add the newly added catagory column but other folder and other columns of "Dim - Inventory Product"
I would really appreciate any insight to this very much. we are using OBIEE 11.1.1.6 with the Oracle 11.5.10 Adaptor (SDE_ORA11510_Adopter)
I will try to upload some screenshots if needed but presently not sure if its something really simple.Hi Prassu,
thanks for the responce. and Apologies for the delay in getting back to you.
1) 1.First of all set the logging level to 3 in the admin tool save it.
You can get the SQL query from here
settings(Answers right top)-->Administration-->manage sessions-->view log
When I try to do this I get the following message. and no log files.
Error
Log Could Not Be Retrieved
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27002] Near <3790667783>: Syntax error [nQSError: 26012] . (HY000) -
Add the new Service Catalog Columns
Requirement: To add the new service catalog columns because of the new patient classes.
I have added the new service catalog columns. Price revision for all the services with the new time interval.
Service - xxxx has two intervals
1st Jan 2000 to 31st dec 2004 (10 columns prices maintained)
1st Jan 2005 to 31st dec 9999 (20 columns prices maintained)
from NT03 => I can see only the last time interval. It is a bug or the feature of SAP if the columns are different it shows the last time interval.
During the service upload, it doesn't enhance or adjust the service master columns for the first interval.
My customized solution is to edit the first interval and save it in the program, then it will adjust the columns.
1st Jan 2000 to 31st dec 2004 (20 columns prices maintained)
1st Jan 2005 to 31st dec 9999 (20 columns prices maintained)
My question are
1) Does SAP has any standard mechanism to auto adjust the columns for the previous intervals
2) Is it a standard or a bug that SAP shows last interval if the intervals has different columns.
3) When you add the new service catalog columns. Should the start date can be back dates to the original column start date or it should be the cutover date.
Thank you.
Rajeshfrom NT03 => I can see only the last time interval. It is a bug or the feature of SAP if the columns are different it shows the last time interval.
Please look at the content of the field Valid from. Depending on the date you choose the correct interval should be displayed.
The use case "add new validity period" to an already existing service (e.g. to reflect a basis price change) is quite well covered in the [Service Master documentation|http://help.sap.com/saphelp_erp60_sp/helpdata/en/3c/0ebc3959d39c39e10000000a114084/frameset.htm], chapter [Delimiting the validity of the Service Master|http://help.sap.com/saphelp_erp60_sp/helpdata/en/39/0b7b08df3011d189fc0000e829fbbd/content.htm] .
The handling of columns is documented [here |http://help.sap.com/saphelp_erp60_sp/helpdata/en/06/810a88dae311d28f330000e835340c/content.htm]as well.
Regards
Claudius -
Impact of Addition of New Value Fields in the existing Op. Concern-COPA
Hi All,
Want to know the steps of adding new value fields in the existing operating concern in COPA?
What is the overall impact of addition of New Value fields in the running Operating Concern?
How do we test the addition of new value fields?
Is the addition of New Value fields to the running Operating Concern advisable?
Your support and advice is highly anticipated and appreciated.
Thanks & Regards
9819528669
Ohter details are as follows...
VALUE FIELDS : Defines the Structure of your Costs & Revenues. (Op. Concern 120 Value Fields)
1) The client requires three new value fields to be created. Value fields for :
- Other Airport Charges - International
- Cargo Commission Cost
- Personal Cost (Direct)
2) What are the Steps involved in creation of new value fields? The steps are :
1) Before creating new value field we need to check whether we can use already existing UNUSED value fields (There are 62 value fields created for the op concern 1000, in production the value fields TBUL1-L7 i.e. to be used (I assume) screen shot1 provided. My predecessor has used value field VV291, VV292, VV380 original description being TBUL3, TBUL4, and TBUL1. I believe he has changed the description in development client and created a transport request ref screen shot 2)
2) You can create new value field thru T-Code KEA6 (4-5 characters beginning with VV) u2013 My predecessor has reused the value fields originally created he has not created new one I believe. please provide give your comments)
3) Specify whether this field is for Currency or Quantity (currency defined in attribute of op concern and quantity defined by its own field u2013 unit of measure) u2013 My predecessor has configured the three value fields as Currency.
4) Describe how the values in this field are aggregated over characteristics. (SUM, LAS, AVG) u2013 My predecessor has aggregated all the three value fields as SUM and they are in Active status.
5) After the value field is created you have to add the value field (active status only) to the operating concern by Editing the Data Structure. (I guess this is done in the next step)
6) Assign newly created Value fields to the Operating Concern u2013 T-Code KEA0 (In development client the value fields are assigned to the op concern 1000 refer screen shot 3. In the production client also those three value fields exist (does it mean they are assigned? your comments please.) As they have the original description TBUL3, TBUL4, and TBUL1 refer screen shot 4.
7) After the Data Structure is defined you need to activate them. (creates plan vs actual database) u2013 Go to the data structure tab and Choose Activate. The status in dev client is Active with correct description but in the production client it is Active with the OLD description. After addition of the value field you need to regenerate the operating concern. T-Code KEA0 u2013 right?
8) Condition Types are assigned to Value Fields? Donu2019t know u2013 T-Code KE45 (I think this is NOT required in our case u2013 Please give your comments)
9) Define and Assign Valuation Strategy u2013 Cost assigned to Value fields u2013 T-Code KE4U (I think this is also NOT required in our case)
10) Define PA Transfer Structure for Settlement u2013 T-Code KEI1 (This step is crucial u2013 I think I have to to include newly created value fields, but am not aware how to do it and what is the connectivity or what happens after this is done)
Note: My predecessor has created a Transport Request No# KEDK902167 for the value fields created by him.
3) Whether my predecessor has performed all the steps for value field creation? How to test it and check that?
4) If yes then, Do I need to perform additional configuration or can I proceed to transport it to Production?
5) What is COPA Allocation Structure & PA Transfer Structure? Where and Why It is used?
6) What are the different methods of cost and revenue allocations in SAP?
7) I have checked the status of the value fields across clients, It is as followsu2026
Value Field Value Field For Description Development Quality Production
1 VV291 Other Airport Charges International TBUL3 Exists DNE DNE
2 VV292 Cargo Commission Cost TBUL4 Exists DNE DNE
3 VV380 Personal Cost u2013 Direct TBUL1 Exists DNE DNE
#DNE : Does Not Exist (assumed since the description given to value field is not the same as in development client.)HI sree,
ofter creation value field and saving that time reqwest number appeare copy the reqwest number and go through the se01 select that reqwest number select and transport click the truck symbole, and draft a mail to basis guyw.
Thank You!
Best Regards,
pradheep. -
ADDING A NEW FIELD IN TABLE MAINTENENCE GENERATOR
I HAVE A REQUIREMENT OF ADDING A FIELD TO DATA BASE TABLE .
THAT ADDED FIELD SHOULD BE ABLE TO MAINTAIN IN TABLE MAINTANENCE GENERATOR WHICH IS ALREADY THERE.
CAN YOU GUYS TELL ME HOW TO ADD NEW FIELD IN TABLE MAINTENENCE GENERATOR.
PLEASE TELL ME HOW TO DO THIS .
I AM USING 4.6CHi
Add a field to existing table and delete the maintenance generator and re create the same
Regards
Shiva -
Adding a new key figure to Info Cube
Can I add a new key figure to an existing Info cube in which data is loaded?
Assume that In Info Cube we have the following.
Stu Id -- Characteristic
Maths , Physics , Chemistry -- Key figures
These are the info objects which are already available and transfer rules are already available for the same in the infosource.
Could any one let me know how to add one more new key figure (total ) , which is the sum of the three marks to the Info Cube and populate the data in to the same.
I have tried the following steps , but could not get the solution.
1). Create a new key figure info object (total).
2). Add the same to the communication and pull the same into transfer rules of the existing info source and activate the same.
3). Add the new key figure to the info cube.
4). Open transfer rules for the info cube and change the mode from NO updation to Addition for the particular key figure (total).
When I perform the 4th step it is giving a red symbol beside the key figure in update rules and I'm not able to activate the same.
Any help on how to add key figures to update rules and transfer rules is highly appreciated and points would be assigned.
Thanks1.add new Keyfigure to Infocube.
2.Go to Update rules> go to update type of that Keyfigure>selct formula in update method>create new formula>here you can add up your 3 keyfigures-->OK.
activate update rules and InfoProvider.Check all are active or not..
by using Export generate datasouce ,you populate data(historical data) to new keyfigure as well.Then you have to delete historical data requests.
or iyou can create formula in query designer as well as srinivas suggested.that would be better option. -
Adding a New Field to Ztable...Missing in SM30
I added a new key field to a Z table. When I do an SM30, or the already created custom transaction to maintain te table the key field is not there.
I even did an SE14 and did an "adjust" to the Ztable...No luck the key field is not there. However, when I do an SE16 to view the table, I see the added key field, blank of course.
What step did I miss?
Thank-YouHi,
You have to re-generate the Table maintenance..
Go to SE11..
Give the table name..Press change..
In the menu..UTILITIES -> TABLE MAINTENANCE GENERATOR..
Press change (pencil button)..
Press expert mode..Press select all..
Press enter.
It will re-generate the table maintenance..
Thanks,
Naren -
Hi,
Is there a documentation available which can help in adding a new field in OFR.
What should be kept in mind doing that etc..
Anything would be helpful.
-shashwatHi Vikrant,
I was going through the Oracle KB and found some info for adding a new filed @ 'How to Configure a Custom Field to Assign Meta-Data Value Using Part of Original Document File Name [ID 1258984.1'
Is this different ?
Regards
Shashwat
Maybe you are looking for
-
I have one that I use on my desktop PC right now, for the same image doubled and ran across my desk so when I turn around I can still see my screen. Let's I ran I connected the DVI to VGA adapater to my MBP then connected that to the Y-Splitter cable
-
My daughters computer crashed along with her itunes library. She can plug it into my computer so how do we create her account on my computer? When we plug it in, it wants to replace her nano songs with my library.
-
Making variables global i iAd Producer
sorry if this is a really simple question. Still, I am stuck: I would like to have widgets access other widget's variables. I would have thought, for instance, that it would be possible to declare a variable var Utility = this.viewController.outlets.
-
Hi Techies, Is there any way to convert or read the contents of a .pdf to .txt Thanks for any help
-
IPad2 connects at home, not at work
OK, this is a strange one. We have several users, both Mac and PC using iPad2's as part of our testing before we make them available for anyone to use. One user is having issues when she tries to sync at work. When she takes her work laptop home and