TxtToSql - Sql Server import Csv (Txt) »
We can run from command line or create a batch file(replace the "username", "password", "server", "database" and "auth" with your own database user info. The lines wrap in this page, but in the file is 1 line):
"C:\Program files\TxtToSql\TxtToSql" username=sa password=123456 server=localhost database=master auth=server session=E:\testcase\employees.ldr logfile=E:\testcase\employees.log

username: Your Sql Server system username. password: Your Sql Server system password. server: Your Sql Server hostname or ip address. If you can not connect to remote database, try "host,port", like: "PAN,1433", or "ip,port", like: "192.168.0.2,1433". database: Your Sql server database name, usually is "master". auth: Authentication, you can use "auth=windows" for "Windows Authentication" or "auth=server" for "SQL Server Authentication". session: The session file name, to create a seesion file, please see this page: Save/Load session. logfile: The log file name.
You may need to run a batch file at a specific time and/or at a certain time every day. Below is additional information about how to do this.
With the introduction of Microsoft Windows 98, Microsoft has included Scheduled Tasks, a software program designed to run any program, including batch files, at any time or any schedule you desire. To run Scheduled Tasks, follow the below steps.
- Click Start
- Click Programs
- Click Accessories, System Tools, and then Scheduled Tasks.
Once open, you'll be able to create your own custom task by clicking Add Scheduled Task, which will start you through the wizard, prompting you with what program you wish to execute, how often you wish to run it (daily, weekly, monthly, one time only, when my computer starts, and when I log on), the time you wish to run, and how often each day to run.
TxtToSql is a data conversion tool that helps DBA and database programmer import txt (csv) data to SQL Server database.
30-day free trial
US$59.95