China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 15:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Can batch processing be used to install and operate SQL databases? View 7,707 Replies 8
Original Poster Posted 2006-11-19 08:08 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
1. There are two database files 1.mdb and 2.mdb. How to import these two files into MSSQL using batch processing?

2. Can the tables in MSSQL be operated on in batch processing?

Not familiar with MSSQL, so ask this question....
房东说:这娃是个好孩子!
Floor 2 Posted 2006-11-19 10:59 ·  中国 福建 泉州 晋江市 电信
银牌会员
★★★
Credits 1,276
Posts 469
Joined 2002-12-23 13:00
23-year member
UID 586
Gender Male
From 福建泉州
Status Offline
I remember there seems to be a command-line ODBC program that can call ODBC components from the command line. You can try to look for it.
QQ:366840202
http://chenall.net
Floor 3 Posted 2006-11-20 09:29 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
I've looked for it, but it doesn't work.... It's a 32-bit interface data source management!
Can't run in the command line....
Is there anyone else who can answer?
房东说:这娃是个好孩子!
Floor 4 Posted 2006-11-20 13:41 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
It is suggested to use bat + vbs to complete it. Just create an adodb.connection object and use "Provider=SQLOLE DB; Data Source=FENG-F64129027D; User ID=sa;Password=; Initial Catalog=数据库名" to connect. Since I have only done conversions between mdb, xls and xml and have no contact with sql, I can't give specific code.
Floor 5 Posted 2006-11-26 09:25 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
First, thank the moderator.

The following are the found command-line programs that can be used:

Directory of C:\Program Files\Microsoft SQL Server\80\Tools\Binn

uncol.exe odbccmpt.exe cdw.exe itwiz.exe wiztrace.exe
profiler.exe isqlw.exe dtsrun.exe sqlftwiz.exe dcomscm.exe
osql.exe bcp.exe isql.exe dtswiz.exe sqlmangr.exe
scm.exe rebuildm.exe cnfgsvr.exe svrnetcn.exe dtsrunui.exe(=dtsrun.exe)
sqladhlp.exe
21 File(s) 2,299,448 bytes
0 Dir(s) 8,476,901,376 bytes free
==================================================
Usage: odbccmpt <name of the executable file>






Only one option per ODBCCMPT execution allowed.

Examples how to enter compatibility flag:
odbccmpt APPLICATIONX /T
odbccmpt APPLICATIONX /v:6

Example to remove compatibility flag:
odbccmpt APPLICATIONX /T /d
==================================================
Usage: itwiz -D database-name {-i workload-file | -t workload-table-name} -o script-file-name







==================================================
Usage: dtsrun /option ] ...
Options ("/?" will display this screen; "-" can be used instead of "/"):

Package retrieval:
/~S server name
/~U username
/~P password
/E <Use trusted connection, do not use /U /P>
/~N package name
/~M package password
/~G package Guid string
/~V package version Guid string
/~F structured storage UNC file name (if /S is also specified, it will be overwritten)
/~R knowledge base database name <If blank, use default value; load package from knowledge base database>

Package operation (override storage package settings):
/~A global variable name: typeid=value <Can reference the entire string (including name: typeid)>
/~L log file name
/~W Write completion status to Windows event log <True or False>

DTSRun operation (execute package by default):
/!X <Do not execute; retrieve package to /F file name>
/!D <Do not execute; remove package from SQL Server (cannot be removed from storage file)>
/!Y <Do not execute; output encrypted command line>
/!C <Copy command line to Windows clipboard (can be used with /!Y and /!X)>

Note:
~ is optional; if present, the parameter is hexadecimal text (0x313233...) composed of encrypted values
The blank area between command switches and values is optional
The blank area embedded between each value must be enclosed in double quotes
If an option is specified multiple times, the last one takes effect (unless /A is specified multiple times)

==================================================
sqlfwiz.exe
n=Use Windows authentication
s=Server name
u=Username
p=Password
d=Database name
==================================================
Usage: osql










disable commands ]

<EOF> batch
Automatic console width adjustment
Wide messages
Default error level is — 1 vs 1

==================================================Usage: bcp {dbtable | query} {in | out | queryout | format} datafile










==================================================isql: unknown option ?
usage: isql











<EOF> batch processing
Auto console width scaling
Wide messages
default errorlevel is -1 vs 1

==================================================sqladhlp -i to install the service with optional decimal Locale ID, default 1033
sqladhlp -r to remove the service
============================================
房东说:这娃是个好孩子!
Floor 6 Posted 2006-11-26 09:26 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
### distrib.exe usage
[-PacketSize <..>]
[-PollingInterval <..>]
[-MessageInterval <..>]
[-Continuous ]
[-Output <..>]
[-OutputVerboseLevel <0|1|2>]
[-LoginTimeout <..>]
[-QueryTimeout <..>]
[-DefinitionFile <..>]
[-AlignFixup ]
==================================================

### logread.exe usage
[-KeepAliveMessageInterval <..>]
-Publisher <..>
-PublisherDB <..>
[-PublisherSecurityMode <0|1>]
[-PublisherLogin <..> ]
[-PublisherPassword <..> ]
[-Distributor <..> ]
[-DistributorSecurityMode <0|1>]
[-DistributorLogin <..> ]
[-DistributorPassword <..> ]
[-Buffers <..> ]
[-SyncLogging]
[-HistoryVerboseLevel <0|1|2> ]
[-PacketSize <..>]
[-ReadBatchSize <..>]
[-ReadBatchThreshold <..> ]
[-MaxCmdsInTran <..>]
[-PollingInterval <..>]
[-MessageInterval <..>]
[-Continuous ]
[-Output <..>]
[-OutputVerboseLevel <0|1|2>]
[-LoginTimeout <..>]
[-QueryTimeout <..>]
[-DefinitionFile <..>]
[-AlignFixup ]
==================================================

### replmerg.exe usage
(-Publisher <..>) | (-PublisherNetwork <..> -PublisherAddress <..>)
-PublisherDB <..>
-Subscriber <..>
-SubscriberDB <..>
-Publication <..>
[-Hostname <..>]
[-PollingInterval <in seconds>]
[-ValidateInterval <in minutes>]
[-SubscriptionType <0|1|2>]
[-SubscriberConflictClean <0|1>]
[-PublisherSecurityMode <0|1>]
[-PublisherLogin <..>]
[-PublisherPassword <..>]
[-SubscriberSecurityMode <0|1>]
[-SubscriberLogin <..>]
[(-SubscriberPassword | -SubscriberEncryptedPassword) <..>]
[-SubscriberType <0|1|2|3|4|5|6|7|8>]
[-Validate <0|1|2|3>]
[-FastRowCount <0|1>]
[-HistoryVerboseLevel <0|1|2|3>]
[-ProfileName <..>]
[-MaxBcpThreads <..>]
[-UseInprocLoader]
[-InteractiveResolution <0|1>]
[-KeepAliveMessageInterval <..>]
[-PollingInterval <..>]
[-StartQueueTimeout <..>]
[-SrcThreads <..>]
[-DestThreads <..>]
[-ForceConvergenceLevel <0|1|(2 (Publisher|Subscriber|Both))]
[-MetadataRetentionCleanup <0|1>]
[-InputMessageFile <..>]
[-InputMessageFromPublisher <0|1>]
[-OutputMessageFile <..>]
[(-Distributor <..>) | (-DistributorNetwork <..> -DistributorAddress <..>])
[-DistributorSecurityMode <0|1>]
[-DistributorLogin <..>]
[(-DistributorPassword | -DistributorEncryptedPassword) <..>]
[-MaxDownloadChanges <..>]
[-MaxUploadChanges <..>]
[-UploadGenerationsPerBatch <..>]
[-DownloadGenerationsPerBatch <..>]
[-UploadReadChangesPerBatch <..>]
[-DownloadReadChangesPerBatch <..>]
[-UploadWriteChangesPerBatch <..>]
[-DownloadWriteChangesPerBatch <..>]
[-SubscriberDBAddOption 0|1|2|3]
[-SubscriberDatabasePath <..>]
[-FileTransferType <0|1>]
[-FtpAddress <..>]
[-FtpPort <..>]
[-FtpUserName <..>]
[-FtpPassword <..>]
[-ExchangeType <1|2|3>]
[-AltSnapshotFolder <..>]
[-SyncToAlternate <0|1>]
[-DynamicSnapshotLocation <..>]
[-Continuous ]
[-Output <..>]
[-OutputVerboseLevel <0|1|2>]
[-LoginTimeout <..>]
[-QueryTimeout <..>]
[-DefinitionFile <..>]
[-AlignFixup ]
==================================================

### snapshot -Publisher <..>
-PublisherDB <..>
-Publication <..>
[-ReplicationType <1|2> ]
[-Distributor <..> ]
[-DistributorSecurityMode <0|1>]
[-DistributorLogin <..> ]
[-DistributorPassword <..> ]
[-PublisherSecurityMode <0|1>]
[-PublisherLogin <..> ]
[-PublisherPassword <..> ]
[-MaxBcpThreads <..> ]
[-BcpBatchSize <..> ]
[-HistoryVerboseLevel <0|1|2|3> ]
[-RowDelimiter <..> ]
[-FieldDelimiter <..> ]
[-70Subscribers ]
[-ProfileName ]

Merge Replication Dynamic Snapshot Parameters:

[-DynamicFilterLogin <..> ]
[-DynamicFilterHostName <..> ]
[-DynamicSnapshotLocation <..> ]
[-StartQueueTimeout <..> ]
[-UsePerArticleContentsView <..> ]


[-Continuous ]
[-Output <..>]
[-OutputVerboseLevel <0|1|2>]
[-LoginTimeout <..>]
[-QueryTimeout <..>]
[-DefinitionFile <..>]
[-AlignFixup ]
==================================================

Usage: sqldumper [ProcessID [ThreadId [Flags[:MinidumpOverrideFlags] [SqlInfoPtr [DumpDir [ExceptionRecordPtr [ContextPtr]]]]]]] [-filtered <filtered dump init parameters>]
房东说:这娃是个好孩子!
Floor 7 Posted 2006-11-26 09:27 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
Can batch processing be used to install and operate SQL databases?
Attachments
scm.jpg
房东说:这娃是个好孩子!
Floor 8 Posted 2006-11-26 09:28 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
The above are command-line tools for operating SQL. The specific methods are under research. Hope more friends will participate in the discussion!
房东说:这娃是个好孩子!
Floor 9 Posted 2006-11-27 01:13 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
If I remember correctly, isql and osql can be used. I encountered this when I was learning SQL originally

[ Last edited by electronixtar on 2006-11-27 at 01:14 AM ]

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Forum Jump: