Home / Microsoft / Microsoft DOS / OSQL command
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: OSQL command  (Read 3340 times)
svity
Topic Starter
Newbie



Posts: 1


« on: April 02, 2008, 03:56:38 AM »

i want to create a database using the OSQL command, but using a batch file and not on command prompt...


Please help :)
IP logged
.bat_man
Beginner



Posts: 86

Will Smith

« Reply #1 on: April 02, 2008, 04:23:01 AM »

u can use this command in the bat file

sqlplus username/Password@databasename @sqlfile.sql >>lg.log

where sqlfile is the file where u store the script u want to execute
and lg.log is where the sql loc commints and errors will be.

also if u want to get the out put of an select statment as eg
u can use the sql command spool spoolfile.txt before the select (in the sqlfile)and next it put
spool off like this

set linesize 600
spool a.txt
select 1 from dual;
spool off

hope its usful for u
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / OSQL command « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.091 seconds with 21 queries.