在asp 中使用 sql_dmo 添加新数据库
2018-09-06 12:15
set oSQLServer =server.createobject(SQLDMO.SQLServer)
set oSQLServer =server.createobject(SQLDMO.Database)
set oDBFileData =server.createobject(SQLDMO.DBFile)
set oLogFile =server.createobject(SQLDMO.LogFile)
oDBFileData.Name = test1
oDBFileData.PhysicalName = c:program filesmicrosoft sql servermssqldata est.mdf
oDBFileData.PrimaryFile = True
oDBFileData.FileGrowthType = SQLDMOGrowth_MB
oDBFileData.FileGrowth = 1
oDatabase.FileGroups(PRIMARY).DBFiles.Add oDBFileData
oLogFile.PhysicalName = c:program filesmicrosoft sql servermssqldata est.ldf
oDatabase.TransactionLog.LogFiles.Add oLogFile
oSQLServer.Databases.Add oDatabase
上一篇:asp 之上传漏洞终结篇