Connect to server database using TNS


  We all know most of the database are having the client server architecture i.e client send a query to retrive some data from the database and the server process all those query and in retrun the client get the data which he request for.In this section we are not going in deep of client server architecture but yes this section is all about how you can connect to database server.
Connect to sql server database
  It is very easy to connect to SQL Server2008. Start your SQL Server Managment studio and you will get the screen as shown right side .Enter server type,servername ,authentication
(select sqlserver authentication if you are connecting to other then the local computer), login name,password 
and connct to your SQL Server database.
Connect to oracle database server:
     To connect the oracle database server we need to have to TNS Configure in the client system.There are many step to create a TNS but in this section we learn how to create TNS using TOAD for Oracle (I do belive that you have successfully installed the Toad for oracle which we have already discussed in the previous section if you miss the reading last article on installation of Oracle for Toad visit here)
     
     Step1: Start your Toad for Oralce you will get the screen like below if you are not getting the below screen then get confuse go to session menu (short key alt+s) and then click on new session and you will get the below screen.
        Step2: Now click on TNSnames Editor you will be getting the below screen to create the TNS for your oracle server Easy way to create the TNS is to go into the Text Editor tab copy and past the below informantion :

Your_oracle_ServerName =
  (DESCRIPTION=
     (ADDRESS_LIST=
        (ADDRESS=
           (COMMUNITY=tcp.world)
              (PROTOCOL=TCP)
                (Host=192.153.0.1)
                (Port=1521)
                )
              )
         (CONNECT_DATA=
            (SID=orcl)
          )
     )
Note: Replace the bold red colored text with your own oracle database server.
    Step3: Click on save then click on OK.
    Step4: Go to session menu 
(short key alt+s) and then click on new session
You will get the same screen as shown here .Now enter your User/Schema name, password , name of you database and then click on connect.

NOTE: if you are getting any TNS
error then get confirm that your computer is connect to server computer.
i.e chek your LAN setting (use ping command to chek the connection,type this in command prompt  ping 127.0.0.1 -t )
I am interested in hearing your feedback, so that I can improve my articles and learning resources for you.connect with us on facebook, twitter

Share

Did you enjoy reading this and found it useful? If so, please share it with your friends:

1 comment:

  1. Very Good Brother !!! Best Practices !!!

    Congratulations From Spain

    Hackingmadrid.blogspot.com

    Maquiavelo

    ReplyDelete