Help using a method
this is a part of my assignment, and im having trouble figuring out how to write this method. any help would be appreciated
"Suppose the bank wants to keep track of how many accounts exist.
a. Declare a private static integer variable numAccounts to hold this value. Like all instance and static variables, it will
be initialized (to 0, since it?s an int) automatically.
b. Add code to the constructor to increase this variable every time an account is created.
c. Add a static method getNumAccounts that returns the total number of accounts. Think about why this method
should be static ? its information is not related to any particular account."
// Account.java
// A bank account class with methods to deposit to, withdraw from,
// change the name on, and get a String representation
// of the account.
public class Account
private double balance;
private String name;
private long acctNum;
private int numAccounts; <------ i added this, is that right?
//Constructor -- initializes balance, owner, and account number
public Account(double initBal, String owner, long number)
balance = initBal;
name = owner;
acctNum = number;
// Checks the number of accounts
public static numAccts(int number) <------- Added this method, pretty sure this isnt the way im supposed to do this
number = numAccounts;
//Returns number of accounts
public static getNumAccounts() <------------Added this
return numAccts;
// Checks to see if balance is sufficient for withdrawal.
// If so, decrements balance by amount; if not, prints message.
public void withdraw(double amount)
if (balance >= amount)
balance -= amount;
else
System.out.println("Insufficient funds");
// Adds deposit amount to balance.
public void deposit(double amount)
balance += amount;
// Returns balance.
public double getBalance()
return balance;
// Returns a string containing the name, account number, and balance.
public String toString()
return ?Name:? + name +
?\nAccount Number: ? + acctNum +
?\nBalance: ? + balance;
}
but now i have another problem. i am getting an error
Account.java:93: invalid method declaration; return type required
public static AccountConsolidate(Account acct1, Account acct2)
^
1 error this is the assignment for this method:
Add a static method Account consolidate(Account acct1, Account acct2) to your Account class that creates a new
account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should
be returned. Two important rules of consolidation:
? Only accounts with the same name can be consolidated. The new account gets the name on the old accounts but a
new account number (a random number).
? Two accounts with the same number cannot be consolidated. Otherwise this would be an easy way to double your
money!
// Account.java
// A bank account class with methods to deposit to, withdraw from,
// change the name on, and get a String representation
// of the account.
public class Account
private double balance;
private String name;
private long acctNum;
private static int numAccounts;
private double newAccount;
//Constructor -- initializes balance, owner, and account number
public Account(double initBal, String owner, long number)
balance = initBal;
name = owner;
acctNum = number;
numAccounts++;
// Checks to see if balance is sufficient for withdrawal.
// If so, decrements balance by amount; if not, prints message.
public void withdraw(double amount)
if (balance >= amount)
balance -= amount;
else
System.out.println("Insufficient funds");
// Adds deposit amount to balance.
public void deposit(double amount)
balance += amount;
// Returns balance.
public double getBalance()
return balance;
//Returns number of accounts created
public static int getNumAccounts()
return numAccounts;
// Returns name on the account
public String getName()
return name;
// Returns account number
public long getAcctNum()
return acctNum;
// Close the current account.
public void close()
if (balance == 0)
numAccounts--;
System.out.println("CLOSED");
// Consolidates two accounts into one account.
public static AccountConsolidate(Account acct1, Account acct2)
newAccount = acct1.getBalance() + acct2.getBalance();
String name1 = acct1.getName();
String name2 = acct2.getName();
if(name1.equals(name2));
newAccount = newAccount.getAcctNum();
close acct2;
return newAccount;
// Returns a string containing the name, account number, and balance.
public String toString()
return "Name:" + name +
"\nAccount Number: " + acctNum +
"\nBalance: " + balance;
// TestAccounts1
// A simple program to test the numAccts method of the
// Account class.
import java.util.Scanner;
public class TestAccounts1
public static void main(String[] args)
Account testAcct;
Scanner scan = new Scanner(System.in);
System.out.println("How many accounts would you like to create?");
int num = scan.nextInt();
for (int i=1; i<=num; i++)
testAcct = new Account(100, "Name", i);
System.out.println("\nCreated account " + testAcct);
System.out.println("Now there are " + Account.getNumAccounts() +
" accounts");
// TestAccounts2
// A simple program to test the methods of the
// Account class.
import java.util.Scanner;
public class TestAccounts2
public static void main(String[] args)
Account acct1;
Account acct2;
Account acct3;
Scanner scan = new Scanner(System.in);
int num;
System.out.println("Enter the name for account 1: ");
int name1 = scan.nextInt();
System.out.println("Enter the name for account 2: ");
int name2 = scan.nextInt();
System.out.println("Enter the name for account 3: ");
int name3 = scan.nextInt();
for (int i=1; i>=num; i++)
acct1 = new Account(100, "name1", i);
System.out.println("\nCreated account " + name1);
System.out.println("Balance Available " + acct1.getBalance() + " account number: " + acct1.getAcctNum());
}
Similar Messages
-
Requesting all to help me how to create lsmw using idoc method
hi
thanx for ur answer
requesting every body in the forum to help me how to create lsmw using idoc method.
regards,
balajiHi Balaji,
LSMW using IDOC is similar to using flat file method. Here you are getting data from IDOC container and mapping data with Idoc segments insted of flatfile column.
Hope this is what you are looking for. If helpful then dont forget to reward me for that
Darshan -
LSMW help with DIRs by using BAPi method
Hi experts,
I am learning LSMW and I have been given exercise which I have to finish. The question is:
Create a LSMW object for creation of DIRs by using BAPI method (UPLOAD_DOCUMENT)???
Can anyone tell me how should I go forward and what DIRs stands for... ??
I really appreciate your help..
Regards,
-Ashok HansrajHello Ashok,
If you need a step - by - step approach for loading data using LSMW with various import techniques (like batch input, BAPI, IDOCS etc) you have to go thru this LSMW manual.
And the files with DIR information, you should receive those fields from your business. Because you should know the structure of the data in those files in order to maintain source and target structures.
Ask your business people over the format of the file you will be provided. In mean you can go thru this manual on this link.
http://www.sapgenie.com/saptech/lsmw.htm
Thanks,
Naren -
How to use this method in JSTL?help me please!
I know I can use "<C:set >" like as
<c:set var="clabel3" value="${portalCustomizeBean.portalPage}"/> ,
but now I want to use one method of portalCustomizeBean object not a attribute of it !!!!!
who would tell me how to use?
this is wrong in my code:
<c:set var="clabel" value="${portalCustomizeBean.currentPageLabel}"/>
<c:set var="clabel3" value="${portalCustomizeBean.toEntitiesExceptSpaceEscape(clabel)}"/>
but how to use "toEntitiesExceptSpaceEscape" method in JSTL?????Why can't you just assign the method's return value to a variable and then print that? A bit of scriptlet code will do the trick. (As much as we all hate to use scriptlet code.)
I believe you'll be able to do what you want in the 1.1 standard JSTL, but for now this will suffice. - MOD -
Not able to reload the data from DB using finder methods
Hi all,
<p>
I am facing a weird problem while using finder methods.
I am using weblogic 8.1 SP3 and entity beans are CMP with DB concurrency.DB is oracle
</p>
<h4>Problem Description</h4>
<p>
I am having one session bean which internally interacts with my entity beans,
Now say my transaction is getting initiated in one of the session bean and I use some finder in it.
</p>
<p>
To make the problem more clear lets say my entity bean is loanBean with loanId as primary key.
Now say method A of session bean initiates the transaction and I use something like
<br>
LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
<br>
<b>Note that I am not using findByPrimaryKey method</b>
<br>
now this method A calls some other method B on some session bean which is having Required as its transaction attribute.
<br>
But before the call of B some other thread or background process updates the DB for this loanId and commits,
<br>
now when I fire the same finder in method B I am still getting the old data, ie I am not getting the data which has been modified in DB and committed by some other thread, I still get the old data and when I tried to generate the SQL queries which weblogic is firing, I see
it fires the SQL for every finder other that findByPrimaryKey.
<br>
<b>
Now my problem is I am getting the old data only and I need the new updated data of DB. isolation-level of DB and beans is READCOMMITTED.
Note:: I cant use new transaction to read the data.
</b>
<br>
And I couldn't understand that when weblogic is firing query for every finder then why it should not refresh the data in its cache. Is there any way to disable this kind of caching and say that everytime when i use finder just go to DB and get me the last committed data.
</p>
<br>
Any help in this regard would be very helpful to me.
<br>
Thanks and Regards
<br>
Manish Garg.
</p>Hi,
In my understanding, cache is not involved in this scenario. As you
observed, the container fires sql every time when you invoke this finder.
So, it should just give the result that it got from the DB. Is there a
possibility that the DB is using repeatable_read or serializable for
isolation level?
You can debug further by doing couple of things -
1. Instrument the code in the generated RDBMS java file for the entity bean
(if you use -keepgenerated option for weblogic.ejbc, u can get the source of
this file). This class will have the implementation for ejbFindByLoanId. You
can just print the result set data after the query is fired.
2. Try the same scenario without the ejb container. Like, write a jsp which
will start a user tx and fire the query twice such that there is an update
between the two queries. Note that, you need to use a TxDataSource to get
the JDBC connection so that it will be tx aware.
--Sathish
<Manish Garg> wrote in message news:[email protected]...
Hi all,
<p>
I am facing a weird problem while using finder methods.
I am using weblogic 8.1 SP3 and entity beans are CMP with DB
concurrency.DB is oracle
</p>
<h4>Problem Description</h4>
<p>
I am having one session bean which internally interacts with my entity
beans,
Now say my transaction is getting initiated in one of the session bean and
I use some finder in it.
</p>
<p>
To make the problem more clear lets say my entity bean is loanBean with
loanId as primary key.
Now say method A of session bean initiates the transaction and I use
something like
<br>
LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
<br>
<b>Note that I am not using findByPrimaryKey method</b>
<br>
now this method A calls some other method B on some session bean which is
having Required as its transaction attribute.
<br>
But before the call of B some other thread or background process updates
the DB for this loanId and commits,
<br>
now when I fire the same finder in method B I am still getting the old
data, ie I am not getting the data which has been modified in DB and
committed by some other thread, I still get the old data and when I tried
to generate the SQL queries which weblogic is firing, I see
it fires the SQL for every finder other that findByPrimaryKey.
<br>
<b>
Now my problem is I am getting the old data only and I need the new
updated data of DB. isolation-level of DB and beans is READCOMMITTED.
Note:: I cant use new transaction to read the data.
</b>
<br>
And I couldn't understand that when weblogic is firing query for every
finder then why it should not refresh the data in its cache. Is there any
way to disable this kind of caching and say that everytime when i use
finder just go to DB and get me the last committed data.
</p>
<br>
Any help in this regard would be very helpful to me.
<br>
Thanks and Regards
<br>
Manish Garg.
</p> -
Passing values from applet using POST method to PHP page
Hello there ;)
I realy need a help here.. I`ve been working all day on sending mail from applet. I didn`t succeed bcs of the security restrictions.
So I decided just to pass arguments into PHP page, which process them and send e-mail to me.
So here is the problem.. I need to send String variables througth POST into my php page. Now I`m using GET method, but I need more than 4000 characters.
My actual solution is:
URL url = new URL("http://127.0.0.1/index.php?name=" + name + "&message=" + message);
this.getAppletContext().showDocument(url,"_self");I really need to rewrite it into POST. Would you be so kind and write few lines example [applet + php code]? I`ve already searched, googled, etc.. Pls don`t copy links to other forums here, probably I`ve read it.
Thanx in advance to all :)hi!
i`ve got some news about my applet.. so take this applet code:
public class Apletik extends JApplet {
public void init() { }
public void start()
try
String aLine; // only if reading response
String parametersAsString = "msg=ahoj&to=world";
byte[] parameterAsBytes = parametersAsString.getBytes();
// send parameters to server
URL url = this.getCodeBase();
url = new URL(url + "spracuj.php");
URLConnection con = url.openConnection();
con.setDoOutput(true);
con.setDoInput(true); // only if reading response
con.setUseCaches(false);
con.setRequestProperty("Content=length", String.valueOf(parameterAsBytes.length));
OutputStream oStream = con.getOutputStream();
oStream.write(parameterAsBytes);
oStream.flush();
String line="";
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while ((aLine = in.readLine()) != null)
JOptionPane.showMessageDialog(null, aLine);
if(aLine.equals("")) break;
in.close();
oStream.close();
catch (Exception ex)
JOptionPane.showMessageDialog(null, ex.toString());
}here is code of spracuj.php which is on server:
<?php
if(isset($_POST['msg']))
echo('hurray!');
?>it has only 1 problem.. when i test it on my localhost, everything seems to be all right. but when i post it to my server, i got IOException HTTP 400 error code :( where is the problem? please help me, i`m so close :D thanx -
LOGO required in ALV top of page using factory method
Hi,
I am doing an ALV using factory method of class Cl_SALV_TABLE. Can any one help me about putting a LOGO on the top of page.
Thanks in advance.
AmitavaHi,
In START-OF-SELECTION.
put form to display header
like PERFORM build_header
gr_table->display( ).
then...
in FORM
FORM build_header.
lr_grid TYPE REF TO cl_salv_form_layout_grid,
lr_logo TYPE REF TO cl_salv_form_layout_logo,
create object lr_logo.
lr_logo->set_left_content( lr_grid ).
lr_logo->set_right_logo( 'LOGO_NAME' ).
* Set the element top_of_list
gr_table->set_top_of_list( lr_logo ).
ENDFORM.
thanx. -
Setting value for attribute 'PO_NUMBER_SOLD' using setter method
Hi Experts,
I need to set the value of a screen field according to some condition. I am using setter method of this attribute to set the value but it is not getting changed.
I have written following code in DO_PREPARE_OUTPUT method of implementation class ZL_ZZBT131I_ZCREDITCHECK_IMPL using setter method of attribute
Get Referral Authorization Code
lv_val1 = me->typed_context->crechkresph->get_po_number( attribute_path = 'PO_NUMBER' ).
me->typed_context->crechkresph->set_po_number( attribute_path = 'PO_NUMBER'
value = ' ' ).
while debugging I found that in method set_po_number set_property method has been used:--
current->set_property(
iv_attr_name = 'PO_NUMBER_SOLD' "#EC NOTEXT
iv_value = <nval> ).
In set_property method following code is getting executed
if ME->IS_CHANGEABLE( ) = ABAP_TRUE and
LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
if <VALUE> ne IV_VALUE.
if ME->MY_MANAGER_ENTRY->DELTA_FLAG is initial.
first 'change' -> proof that entity is locked
if ME->MY_MANAGER_ENTRY->LOCKED = FALSE.
if ME->LOCK( ) = FALSE.
return.
endif.
endif.
flag entity as modified
ME->MY_MANAGER_ENTRY->DELTA_FLAG = IF_GENIL_CONTAINER_OBJECT=>DELTA_CHANGED.
endif.
ME->ACTIVATE_SENDING( ).
change value
<VALUE> = IV_VALUE.
log change
set bit LV_IDX of ME->CHANGE_LOG->* to INDICATOR_SET.
endif.
else.
check if it is a real read-only field or a display mode violation
assert id BOL_ASSERTS subkey 'READ-ONLY_VIOLATION'
fields ME->MY_INSTANCE_KEY->OBJECT_NAME
IV_ATTR_NAME
condition ME->CHANGEABLE = ABAP_TRUE.
endif.
and in debugging I found that if part ( ME->IS_CHANGEABLE( ) = ABAP_TRUE and
LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY) fails and hence else part is getting executed and hence my field a real read-only field or a display mode violation is happening according to comments in code.
What shall I do so that I would be able to change the screen field value?
Any help would be highly appreciated.
Regards,
VimalHi,
Try this:
data: lr_entity type cl_crm_bol_entity.
lr_entity = me->typed_context->crechkresph->collection_wrapper->get_current( ).
lr_entity->set_property( iv_attr_name = 'PO_NUMBER' value = '').
Also, make sure the field is not read-only.
Regards
Prasenjit -
How use the method hasPermission in weblogic server 6.1
Hello everybody !
In my application web ,i restrict access to some ressources (some jsp)
to some specified groups .
So,i create permissions in the file web.xml , as indicated in the doc
6.0 .
For example only the user : system can access to all the jsp , and the
others users no .
Now ,in my code ,I would like to use the method hasPermission in order
to modify my application according to the differents groups of users .
But my problem is that i don't know the parameter aclName !
For the parameter permission I use the syntax "new
weblogic.security.acl.PermissionImpl(".../x.jsp") .
For the parameter sep (char),i use : '.' .
But i don't find the parameter aclName .
When i was in weblogic 5.1 ,i created permission in the file
weblogicURL.policy with the syntax : " Permission
weblogic.security.acl.URLAcl "weblogic.url",".../x.jsp" " and after
i gave "weblogic.url" as parameter for aclName .
But in version 6.0, I try web.xml, web ? but nothing is good .
Is there any person which have an idea or the solution ?
All the sugestions are welcome !
Thanks by advance !
Good bye .hi,
maybe a better approach could be to use roles instead of permissons.
Your menu.jsp could look like this:
<%
if(request.isUserInRole("super-user"))
%>
... code HTML where the button "Creation" is created
<%
%>
You can map the role 'super-user' to an individual principal or a
user group in weblogic.xml. In that case only users that are in
the mapped group/principal will see the 'creation' link. So simply
add user 'system' to a group 'super-user'.
regards,
przemek
Marc Alfonsi schrieb:
Hi Kirann and everybody!
Thanks for your message .
I'm going to explain better than the first time .
I set up security-constraints in my web.xml .
For example only "system" can access to the directory Creation and
all its .jsp , and the others users no .
Now ,in my code , there is a jsp : menu.jsp which displays some
possibilities : creation of an employee , visualisation ...with HTML
code : button "Creation" which call a .jsp of the directory Creation .
Actually , if a user different of "system" try to click on the button
"Creation" there is a dialog box of login . The user writes its loggin
but the access is prohibited ( because security-constraint in web.xml
).It's normal but not very well .I would like that a user who don't
have access to the functionality "Creation" don't see the button
"Creation" !
So in menu.jsp , i would like to use the method hasPermission at the
location of the button "Creation" is created with HTML code :
<%
if weblogic.security.acl.Security.hasPermission(.....,new
weblogic.security.acl.PermissionImpl("/Creation/x.jsp"),'.')
%>
code HTML where the button "Creation" is created
<%
%>
But my problem is that i don't know the first parameter which
correspond
to aclName .
Any suggestions are welcome .
Thanks for help . -
Can i use 2 methods to deploy icon files in Oracle IDS?
Dear all,
I'm using Oracle 9IDS(Forms) and i'm trying to use 2 methods to deploy icon file:
-In development phase, i use defaul.icon.path and defaul.icon.extension in registry.dat file and imagebase=documentbase. My icon are well deploy when i run application from form builder.
-In deployment phase, on the same plateform, i use jar file following these steps:
1- I store jar file in same directory with all runtime files(fmx, mmx, etc.)
2- i create a virtual path(/forms90/Tel/) to map with this directory
3- in formsweb.cfg, i put the following line:
[myapp]
imagebase=codebase
archive_jini=f90all_jinit.jar,/forms90/Tel/images.jar
When i call my application directly (http://localhost:8889/forms90/f90servlet?config=myapp),
icons don't appear.
I would like to know, what's wrong?It's possible to use theses both methods for deploy icons on the same plateform?
Thank u for your helpHi Franck,
I thank that red correctly the document(how deploy icon on web).But that isn't the matter.I update my formsweb.cfg as you advise me
[myapp]
archive_jini=...,/forms90/images.jar
imagebase=codebase
Icon don't appear at runtine while other gif files(splashscreen,logo) appear.Notice these others gif files are compressed in the same jar file. Notice also, that when i use default.icon.path parameter in registry.dat file, icons are well deployed.
It's incomprehensible.
Thanks you for your help! -
How to add a new button in an ALV using factory method
im using factory method to creat an ALV
The reason why I'm doing this is because I want the ALV and the selection screen in the same screen like exemplified here http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
r_container = lo_cont
container_name = 'DOCK_CONT'
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = me->t_data.
The above code already uses every parameter that method as to offer.
Is it possible to add extra buttons to an ALV using that method?Hi Ann,
The reason you are not able to see any of the new columns as a option to select in your web service block is because when you have published that block, they were not present. Add these two new objects in your block and publish it again. You will be prompted for duplication content. Select the highlighted block for duplicate and now you can see the new added objects in the filter option. Update and this will overwrite your published block. Please note, web services do appear to behave weirdly when used with dashboards so I request you to please try it in a separate test report first.
Hope that helps.
Regards,
Tanisha -
I can't burn a dvd using any method, idvd tells me that my super drive is missing, dvd studio pro quits when i click burn and disk utility keeps spitting the disk out when I click burn and enter the disk??? how do i repair my superdrive for imac, or how do I do whatever I need to do to get it working: I have already tried using a lens cleaning cd and also restored my nvram or something i forget what it was called but i restarted my computer holding down command+optoion+p+r and still nothing???
Free solutions are the best, although if I have to pay I will, I would prefer to not have to buy an external burner if possible and already know that is an option so please don't give me that answer... thank you for any help you can giveUnless your iMac is still covered by AppleCare, get an external DVD burner.
You can get perfectly good ones from Amazon for less than $40. -
Hi Experts,
How can i get a file header using this method cl_gui_frontend_services=>gui_download
Thanks
BasuHi,
You can use the FM - GUI_DOWNLOAD to specify the headers. It can be done in the following manner -
TYPES: BEGIN OF ty_head, "Structure for header
h(10) TYPE c,
END OF ty_head.
DATA: it_head TYPE TABLE OF ty_head WITH HEADER LINE.
"Adding header details
it_head-h = 'Field1'.
APPEND it_head.
it_head-h = 'Field2'.
APPEND it_head.
it_head-h = 'Field3'.
APPEND it_head.
it_head-h = 'Field4'.
APPEND it_head.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = p_file
filetype = 'ASC'
write_field_separator = 'X'
header = '00' "<= note this
TABLES
data_tab = it_tab
fieldnames = it_head[] "<= Pass your header table here
EXCEPTIONS
OTHERS = 1.
Hope this helps.
Regards,
Himanshu -
How to upload file using *cl_gui_frontend_services* method
hi
i want to upload an image file using this method
and i want to save it in MIME Repository (/SAP/BC/BSP/SAP/PRASHANT)
DATA:
itab TYPE TABLE OF sflight.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = 'C:\temp\winter.jpg'
filetype = 'ASC'
has_field_separator = '|'
CHANGING
data_tab = itab
IF sy-subrc = 0.
WRITE:/ 'success'.
ENDIF.
So plz tel me how i set given path to upload file using this method .Hi Prashant,
Go through the [Link|https://forums.sdn.sap.com/click.jspa?searchID=24477690&messageID=6684222].
Hope this is helpful.
Regards,
Abhinav -
System copy for ABAP+JAVA system using SAPINST method
Dear support,
We have recently upgraded to ECC 6.0 system and we have been still doing system copy by using backup and restore method. I know its<b> wrong</b>.
which involves below steps , this old methos works fine for ABAP engine and evreything looks ok.But java engine will not work.
So we need to use SAPINST method as described in note 785848 and system copy guide available on OSS. But i am really not able to understand sequence
for tasks to be carried out in this SAPINST method.
<b>Can anybody list few sequence along with step by step procedure as i mentioned below for old system copy procedure.</b>
Is it really difficult to make that for <b>SAPINST</b> as everybody says refer to standard guide and note ?
Anybody if possible can make the same way as i did below , i think it would rather be small as far as my understanding after reading those docs.
Simple old system copy procedure works for ABAP is as:
Run the following command on source system.
a. Login as <sid>adm
b. svrmgrl
c. connect internal
d. alter database backup controlfile to trace;
e. exit;
f. Above command will generate a .trc file in /oracle/P01/saptrance/usertrace directory.
g. Copy the text from CREATE CONTROLFILE until the ( and paste it in to any new .sql or controlfile.sql file.
h. Copy the controlfile.sql to target system.
i. Edit the file and replace the entire source SID to target SID.
j. Edit the reuse database command with the set database command
Copy the aft generated during the backup file from the source system to target system. (/oracle/<SID>/sapbackup)
a. Change all the source <SID> to target <SID>.
b. Only don't change the backup volume name it must be target system <SID>.
c. Copy the above aft file name line from the source back<SID>.log to target<SID>.log file.
5. Shutdown the target server instance.
6. From this onwards all the command on the target system only.
a. Login as <SID>adm
b. run the SAPDBA
c. select J (Restore/Recovery)
d. select B (Full restore and recovery)
e. select A (Select backup of type)
f. Select the offline backup which you want to restore.
g. It will take some time to restore.
h. Once the database is restored login as <SID>adm and run the
i. svrmgrl
j. connect internal;
k. startup nomount (if the database is already mounted shutdown it using the shutdown command)
l. run the following command
m. @controlfile.sql (file name of the control file contains the CREATE CONTROLFILE statement)
n. After the run the above command it should give the "Statement Processed)
o. alter database open resetlogs.
I am really looking forward to see anybody take some time out to prepare this kind of step by step procedure.
It would be of greate help for all of us for performing system copy with sapinst method.
Looking forward for your support.
Best Regards,
AjitRHi,
As per the guide you need to do source system Technical Preparations, in that running the export preparation is also one. You need to run this first before you start the export, if and only if export will successful if preparation is successful.
Yes you need to create the export directory to take the export copy of source system, it may be any where in your server. It should be having 6 to 8 GB free space.No need to create the export directory in target system, after export is completed in the source system you copy the export directory to the target system.
<b>Target system</b>
Yes you need to take the back up file system and delete all the contents of the directory.
Yes it can be considered as fresh system installation but copy of source system.
Yes the process follows after you giving the export directory path .
Next screen you will get the database drop and recreate screen chouse the drop and recreate method
Next J2EE user name and password
Next DDIC password
Next you have to give kernel and oracle client dvd path
Next Parameter checking screen here if you are selected database drop and recreate you have to revise the oracle database system option
If you are selecting review next screen is database advance option you have to select the advanced option
Next you have to select following option to recreate
1 Sapdata directory mapping
2 Database instance file system
3 Create database parameter
4 Create tablespace
Next screen sapdata directory creating
Next screen you can just click next no need to change any setting
Next table creation
Next screen specify oracle instance directories
Next again parameter checking and last this is last screen
Next will be the execution screen
Reward points if usefull
Maybe you are looking for
-
Trying to use laf project for the first time
hi all , i need help , please i am trying to use laf project for the first time as i said , and i want help on the installation process step by step please , i am soo junior here i've just downloaded the zip file as the site said (http://fdtool.free.
-
Macbook Pro 17" early 2011 Discrete GPU failure
Hi, before I start, this is the serial of my MBP so you can identify the exact model. MBP 17" Core i7 2.2 Ghz serial number C0*******F92 My Macbook pro 17" (early 2011) started to freeze once a month, but then, it started getting worse. I narrowed d
-
All songs in iTunes cloud not visible in iTunes
I'm having an issue and something has obviously been corrupted. On one of my PCs, none of the songs which are in the cloud are visible in my iTunes any longer. iTunes says that everything has been updated and is working properly but I have no acces
-
Hard drive filled up after I did back up using Superduper
I bought a new Macbook Air. I was going to back up my old Macbook Air data onto an external drive before I set up the new Macbook Air. Also my old Macbook Air (1.86 GHz, 120GB HDD) had a broken hinge and I was going to take it to the Apple A/S center
-
Equipment Inspection in PM - Valuation
I'm trying to setup the following scenario: Inspection for equipment: There are 100 points that are qualitive with 4 possible options: Y (Yes = 0 points), N (No = can be 1, 2, or 4 points), Q (70% of 1, 2 or 4 points) or N/A (0 points). When the in