Wednesday, 16 April 2014

Local Naming Method (or) Net Service Name



1. Open Net Manager (Start -> All Programs -> Oracle -> Database Configuration Assistant -> Net Manager)

2. Expand 'Local'

3. Single Click on Select Service Naming (do not expand)

4. Click the menu 'Edit' on the top

5. Click option 'Create'

6. At Net Service Name box type SHOP

7. Click Next

8. Click Next again 

9. At Host Name box you need to type the computer name ... this you will  get by following the below steps;

                                      (a). Go to Start ->  Right Click on Computer -> select properties -> on the top select Computer Name - > Copy                                                the computer name (exclude the dot at the last)

10. Paste your computer name in the Host Name box

11. In the same page change the port number to 5210

12. Click Next

13. Enter the service name as CHOPPIES(database name).

14. Click Next

15. Click Test

16. Click Change Login

17. For the user scott change the password (enter your normal user password).

18. Click ok and click test again .... you must see the success message there ... that's all.

Creating a Tablespace in oracle10g



Creating-Tablespaces Step by Step :
First of all, Go to Start=>All Programs=> OraDb10g_home1=> Database Control-MyOracle and specifying the system username and password after that we will click Login button.
Step1:
The Database Instance page is displaying and we will click Administration tab.

Step2:
The Administration page is displaying. We will click Tablespace option and tablespace is the part of the storage and under of the database administration.


Step3:
 The Tablespace page is displaying and we will click Create button.
Step4
The Create Tablespace page is displaying. We will enter name of the tablespace. Click Add button.

Step5
 The Add Datafile page is displaying. We will enter file name, directory, tablespace name by default and file size set. We will set storage and click Continue.

Step6
The tablespace has been created .
Step7
Click OK . The Update Message page is displaying. This page show the message "The object has benn created successfully".
Step8:
Logout and Login as Scott in sqlplus/isqlplus/sqlcommand-prompt.
Create a table:
Create table tablename(fieldname1 datatype1,fieldname2 datatype2,fieldname3 datatype3,-----) tablespace tablespacename;



Bring a Tablespace Online:
SYNTAX:

ALTER TABLESPACE tablespacename ONLINE;
Bring a Tablespace offline:
Syntax:
ALTER TABLESPACE tablespacename offline;




Uploading a file uisng jsp



Hi Guys, Here I explained how to upload a file into your specify folder using JSP. I wrote this program only for the beginners who are all interested to upload their file in folder or Database.
Note : Before coding download the file COS.JAR

Index.html
Top of Form
<form ENCTYPE="multipart/form-data" ACTION="upload.jsp" METHOD=post>
    <center>
        <input type="text" name="t1">
        <input type="file" name="file">
       
      
    </center>
    <input type="submit" value="submit">
 Bottom of Form

Upload.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"  import="com.oreilly.servlet.MultipartRequest"%>
<!DOCTYPE html>
<html>
<head>
<title>JSP Page</title>
</head>
<body>
<%

MultipartRequest m = new MultipartRequest(request,"Folder Location",500000);

Text Box: File maximum limited sizeString filename=m.getFilesystemName("file");
out.println(filename);
%>


</body>
</html>

Creating a Listener Using Oracle 10g step by step



Listener:Net Manager:
  1. Start à All Programà Oracle 10g_homeàConfiguration and Migration--> Net Manager
  2. In the navigator pane, expand Local > Listeners.(Highlight)
  1. Select a “+” sign from the right corner.
  2. From the list in the right pane, select Listening Locations.
  3. Click Add Address..A new Address tab appears.
  4. Select the TCP/IP from the Protocol list.
  5. Enter the host name of the database in the Host field.
  6. Enter port 2481 for TCP/IP in the Port
  7. Choose File > Save Network Configuration.
Listener: Net Configuration:
1.      Start à All Programà Oracle 10g_homeàConfiguration and Migration-->Net Configuration
2.      On the Welcome page, select Listener configuration and click Next.
3.      Select Add and click Next.
4.      Next we provide a name for the listener. The default name is LISTENER. Provide a name for the Listener and click the Next button to continue.
5.      On the Net Configuration, Select Protocols page, select TCP and click Next.
6.      On the Net Configuration, enter the port number 5434. Click Next.
7.      On the Net Configuration , select No and click Next.
8.    The Listener configuration is complete. Click the Next button to complete the Listener configuration wizard and to return the Welcome page. On the Welcome page you can exit the Oracle Network Configuration Assistant by clicking the Finish button.