|
maya0su
中级用户
  
积分 241
发帖 131
注册 2005-9-28
状态 离线
|
『楼 主』:
可否用批处理对SQL数据库进行安装和操作?
使用 LLM 解释/回答一下
1.有二个数据库文件1.mdb 和 2.mdb
请问如何用批处理把这二个文件导入到MSSQL里?
2.能否在批处理里对MSSQL的表进行操作?
对MSSQL不熟悉,故问此问题....
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....
|

房东说:这娃是个好孩子! |
|
2006-11-19 08:08 |
|
|
chenall
银牌会员
    
积分 1276
发帖 469
注册 2002-12-23 来自 福建泉州
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
记得好像有一个命令行的ODBC程序,可以在命令行调用ODBC组件,可以找找看.
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 |
|
2006-11-19 10:59 |
|
|
maya0su
中级用户
  
积分 241
发帖 131
注册 2005-9-28
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
找了,不行的....是个32位的界面数据源管理!
不能在命令行里运行....
还有人能回答吗?
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?
|

房东说:这娃是个好孩子! |
|
2006-11-20 09:29 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
建议用bat+vbs来完成吧。
只要创建adodb.connection对象,使用
"Provider=SQLOLE DB; Data Source=FENG-F64129027D; User ID=sa;Password=; Initial Catalog=数据名"来连接就可以了。
由于只做过mdb和xls以及xml之间的转换,没有接触过sql,所以无法给出具体的代码了。
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.
|
|
2006-11-20 13:41 |
|
|
maya0su
中级用户
  
积分 241
发帖 131
注册 2005-9-28
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
首先谢谢版主
我找到了可以使用的命令行程序如下
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 个文件 2,299,448 字节
0 个目录 8,476,901,376 可用字节
==================================================
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
==================================================
用法: itwiz -D 数据库-名称 {-i workload-file | -t workload-table-name} -o 脚本-文件名
==================================================
用法: dtsrun /option ] ...
Options(“/?”将显示该屏幕;可以用“-”代替“/”):
包检索:
/~S 服务器名称
/~U 用户名
/~P 密码
/E <使用信任连接,不使用 /U /P>
/~N 包名称
/~M 包密码
/~G 包 Guid 字符串
/~V 包版本 Guid 字符串
/~F 结构化存储 UNC 文件名(如果还指定了 /S,则将被重写)
/~R 知识库数据库名称 <若空白则使用默认值;从知识库数据库中装载包>
包操作(替代存储包设置):
/~A 全局变量名: typeid=值 <可以引用整个字符串(包括名称: typeid)>
/~L 日志文件名
/~W 将完成状态写入 Windows 事件日志 <True 或 False>
DTSRun 操作(默认情况为执行包):
/!X <不要执行;将包检索到 /F 文件名>
/!D <不要执行;从 SQL Server 中除去包(无法从存储文件中除去)>
/!Y <不要执行;输出加密命令行>
/!C <将命令行复制到 Windows 剪贴板上(可以与 /!Y 和 /!X 一起使用)>
注意:
~ 是可选的;如果出现,参数就是由加密值组成的十六进制文本 (0x313233...)
命令开关和值之间的空白区域是可选的
在各个值之间嵌入的空白区域必须嵌入双引号中
如果一个选项被多次指定,则以最后一次为准(除非是多次指定 /A)
==================================================
sqlfwiz.exe
n=使用windows身份验证
s=服务器名称
u=用户名
p=密码
d=数据库名称
==================================================
用法: osql
disable commands ]
<EOF> 批处理
控制台宽度自动调整
宽消息
默认错误级别为 — 1 对 1
==================================================用法: 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
============================================
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
============================================
|

房东说:这娃是个好孩子! |
|
2006-11-26 09:25 |
|
|
maya0su
中级用户
  
积分 241
发帖 131
注册 2005-9-28
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
distrib.exe 用法
[-PacketSize <..>]
[-PollingInterval <..>]
[-MessageInterval <..>]
[-Continuous ]
[-Output <..>]
[-OutputVerboseLevel <0|1|2>]
[-LoginTimeout <..>]
[-QueryTimeout <..>]
[-DefinitionFile <..>]
[-AlignFixup ]
==================================================
logread.exe 用法
[-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 用法
(-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>]
### distrib.exe usage
==================================================
### logread.exe usage
-Publisher <..>
-PublisherDB <..>
==================================================
### replmerg.exe usage
(-Publisher <..>) | (-PublisherNetwork <..> -PublisherAddress <..>)
-PublisherDB <..>
-Subscriber <..>
-SubscriberDB <..>
-Publication <..>
)
==================================================
### snapshot -Publisher <..>
-PublisherDB <..>
-Publication <..>
Merge Replication Dynamic Snapshot Parameters:
==================================================
Usage: sqldumper ]]]]]]
|

房东说:这娃是个好孩子! |
|
2006-11-26 09:26 |
|
|
maya0su
中级用户
  
积分 241
发帖 131
注册 2005-9-28
状态 离线
|
『第 7 楼』:
可否用批处理对SQL数据库进行安装和操作?
使用 LLM 解释/回答一下
可否用批处理对SQL数据库进行安装和操作?
Can batch processing be used to install and operate SQL databases?
附件
1: scm.jpg (2006-11-26 09:27, 66.03 KiB, 下载附件所需积分 1 点
,下载次数: 13)
|

房东说:这娃是个好孩子! |
|
2006-11-26 09:27 |
|
|
maya0su
中级用户
  
积分 241
发帖 131
注册 2005-9-28
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
以上为操作SQL的命令行工具,具体方法研究中
希望有更多的朋友,参加讨论!
The above are command-line tools for operating SQL. The specific methods are under research. Hope more friends will participate in the discussion!
|

房东说:这娃是个好孩子! |
|
2006-11-26 09:28 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
如果没记错的话,用 isql 和 osql 可以,当初学习 SQL 的时候碰到过
Last edited by electronixtar on 2006-11-27 at 01:14 AM ]
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'>" |
|
2006-11-27 01:13 |
|