• 周六. 7月 2nd, 2022

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

shell文件执行

admin

11月 28, 2021

sql.bat  文件

@echo off
cls
:menu
title oracle快速连接
cls
color 0A
echo.
echo ============================
echo 请选择需连接的数据库然后回车
echo ============================
echo.
echo [email protected]–7777
echo.
echo [email protected]–9999
echo.
echo [email protected]–27.158
echo.
echo [email protected]–27.158
echo.
echo [email protected]–8888
echo.
echo [email protected]—8889
echo.
echo [email protected]–49.42
echo.
echo [email protected]–49.42
echo.
[email protected]–39.238
echo.
:cho
set choice=
set /p choice= 请选择:
IF NOT “%choice%”==”” SET choice=%choice:~0,1%
if /i “%choice%”==”1” goto u1
if /i “%choice%”==”2” goto u2
if /i “%choice%”==”3” goto u3
if /i “%choice%”==”4” goto u4
if /i “%choice%”==”5” goto u5
if /i “%choice%”==”6” goto u6
if /i “%choice%”==”7” goto u7
if /i “%choice%”==”8” goto u8
if /i “%choice%”==”9” goto u9
echo 选择无效,请重新输入
echo.
goto cho

:u1
title [email protected]独立版–7777
echo.
echo 已连接到[email protected]独立版–7777
@sqlplus 账号/密码@localhost/orcl
goto menu

:u2
title [email protected]合并版–9999
echo.
echo 已连接到[email protected]合并版–9999
sqlplus 账号/密码@localhost/orcl
goto menu

:u3
title [email protected]基线–27.158
echo.
echo 已连接到[email protected]基线–27.158
sqlplus 账号/密码@localhost/orcl
goto menu

:u4
title [email protected]泰康–27.158
echo.
echo 已连接到[email protected]泰康–27.158
sqlplus 账号/密码@localhost/orcl
goto menu

:u5
title [email protected]独立版–8888
echo.
echo 已连接到[email protected]独立版–8888
sqlplus 账号/密码@localhost/orcl
goto menu

:u6
title [email protected]合并版—8889
echo.
echo 已连接到[email protected]合并版—8889
sqlplus 账号/密码@localhost/orcl
goto menu

:u7
title [email protected]基线–49.42
echo.
echo 已连接到[email protected]基线–49.42
sqlplus 账号/密码@localhost/orcl
goto menu

:u8
title [email protected]泰康–49.42
echo.
echo 已连接到[email protected]泰康–49.42
sqlplus 账号/密码@localhost/orcl
goto menu

:u9
title [email protected]基线
echo.
echo 已连接到[email protected]基线
sqlplus 账号/密码@localhost/orcl
goto menu

实际效果:可以切换各个不同数据库的环境———————同理对应的mysql只要改成 mysql -uroot -ppassword

发表评论

您的电子邮箱地址不会被公开。