PDA

View Full Version : How to run SQL statements?


abhi_10_20
02-04-2007, 08:43 PM
I am new to DBMS.....

when i construct simple queries, i can't run them either with Oracle 10g
or with MySQL. They show 'Not connected to server'.....or something like that.

this is obvious as there is no server or a central system to store the database queries....

so how to run these on a single standalone PC?

akshaykapoor_3
02-04-2007, 09:52 PM
1) Open notepad

2) Copy the following code:-

@echo off
echo connect INTERNAL/ORACLE >%0.tmp
echo STARTUP OPEN >>%0.tmp
echo exit 8; >>%0.tmp
rem -- Run sql script --
sqlplus /nolog @%0.tmp
rem -- Cleanup --
del %0.tmp


3) Save the file as "Start.bat"
4) Run this file and then try your SQL commands in MySql.

Hope this will work for you..

Do let me knw if u face any prob still ! :)

Garbage
02-04-2007, 11:49 PM
when u got SQL> on Oracle 10g, write 'connect' there.

and use username as scott 'n password as tiger.

or username as system and username u provided on installation

abhi_10_20
03-04-2007, 12:33 PM
tried...but its saying "no database selected"......:mad:

akshaykapoor_3
03-04-2007, 12:42 PM
^^^^ u tried with the batch file??

abhi_10_20
03-04-2007, 05:53 PM
the batch file got executed in a flash and went off.

then once again i opened mysql command line and created a table(query)....
it didnt accept saying, 'no database selected'

Desi-Tek.com
03-04-2007, 06:10 PM
don't just jump on oracle it is very advance database server start from mssql
it is available free @ msdn.com for developer and student.

Garbage
03-04-2007, 11:07 PM
Why u don't tried with GUI ???

Oracle 9i onwards support Browser based database creation!

deepak.krishnan
04-04-2007, 12:01 AM
Not Connected to Server error??? tat might b bcoz oracle DB has been disabled in startup... try enabling it???