批处理osql导入数据

@echo off
set path=D:\有效数据2022\
for %%i in (%path%*.sql) do (
    cd C:\Program Files\Microsoft SQL Server\120\Tools\Binn
    C:
    osql -S "127.0.0.1" -U "sa" -P "gaojianshe@#$123" -i  %%i
    move %%i  %path%complete
    echo %%i
)

你可能感兴趣的:(数据库)