DIGIT-ARC read-only archive · snapshot: July 23, 2026

How to run SQL statements?

9 posts · originally from https://geek.digit.in/community/threads/how-to-run-sql-statements.54005/

abhi_10_20
abhi_10_20 Original post #1
Apr 2, 2007 at 8: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
Apr 2, 2007 at 9: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
Garbage #3
Apr 2, 2007 at 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
Apr 3, 2007 at 12:33 PM
tried...but its saying "no database selected"......:mad:
akshaykapoor_3
Apr 3, 2007 at 12:42 PM
^^^^ u tried with the batch file??
abhi_10_20
Apr 3, 2007 at 5: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'
D
Apr 3, 2007 at 6: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
Garbage #8
Apr 3, 2007 at 11:07 PM
Why u don't tried with GUI ???

Oracle 9i onwards support Browser based database creation!
deepak.krishnan
Apr 4, 2007 at 12:01 AM
Not Connected to Server error??? tat might b bcoz oracle DB has been disabled in startup... try enabling it???