執行腳本文件的方式
Mysql
mysql執行sql腳本文件的方法:
1、在命令行輸入mysql -uroot -h10.235.5.55 -p’123456’ -P3306 < F:\hello\niuzi.sql
2、在命令行輸入【source F:\hello\niuzi.sql】
mysql -uroot -h10.235.5.55 -p’123456’ -P3306 -e "source test.sql " > test.log
Postgresql
psql -Upostgres -dzxin -h10.235.5.55 -p6789 -f test.sql >> upgrade.log
Sybase
isql -Uzxin_smap -P’123456’ -i ./test.sql -o test.log
oracle
echo ‘quit’| sqlplus zxin_smap/‘123456’ @test.sql > wpp.log