![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-02 14:17 |
48,038 topics / 350,123 posts / today 1 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Can batch processing be used to install and operate SQL databases? |
| Printable Version 7,706 / 8 |
| Floor1 maya0su | Posted 2006-11-19 08:08 |
| 中级用户 Posts 131 Credits 241 | |
|
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.... |
|
| Floor2 chenall | Posted 2006-11-19 10:59 |
| 银牌会员 Posts 469 Credits 1,276 From 福建泉州 | |
|
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.
|
|
| Floor3 maya0su | Posted 2006-11-20 09:29 |
| 中级用户 Posts 131 Credits 241 | |
|
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? |
|
| Floor4 3742668 | Posted 2006-11-20 13:41 |
| 荣誉版主 Posts 718 Credits 2,013 | |
|
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.
|
|
| Floor5 maya0su | Posted 2006-11-26 09:25 |
| 中级用户 Posts 131 Credits 241 | |
|
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 ============================================ |
|
| Floor6 maya0su | Posted 2006-11-26 09:26 |
| 中级用户 Posts 131 Credits 241 | |
|
### 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>] |
|
| Floor7 maya0su | Posted 2006-11-26 09:27 |
| 中级用户 Posts 131 Credits 241 | |
|
Can batch processing be used to install and operate SQL databases?
Attachments scm.jpg (66.03 KiB) |
|
| Floor8 maya0su | Posted 2006-11-26 09:28 |
| 中级用户 Posts 131 Credits 241 | |
|
The above are command-line tools for operating SQL. The specific methods are under research. Hope more friends will participate in the discussion!
|
|
| Floor9 electronixtar | Posted 2006-11-27 01:13 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
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 ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |