Run MenuItem Args
MenuFunction menuFunction;
menuFunction = new MenuFunction(menuItemDisplayStr(xxx), MenuItemType::Display);
Args args = new Args();
args.record(_task);
args.caller(_caller);
menuFunction.run(args);
MenuFunction menuFunction;
menuFunction = new MenuFunction(menuItemDisplayStr(xxx), MenuItemType::Display);
Args args = new Args();
args.record(_task);
args.caller(_caller);
menuFunction.run(args);
cd "C:\Temp\sqlpackage-win7-x64-en-US-15.0.5084.2"
SqlPackage.exe /a:import /sf:C:\Temp\test.bacpac /tsn:. /tdn:AxDB_202308188 /TargetTrustServerCertificate:True /p:CommandTimeout=7200
//kill all conections.
-- Create the sql to kill the active database connections
declare @execSql varchar(1000), @databaseName varchar(100)
-- Set the database name for which to kill the connections
set @databaseName = 'AxDB'
set @execSql = ''
select @execSql = @execSql + 'kill ' + convert(char(10), spid) + ' '
from master.dbo.sysprocesses where db_name(dbid) = @databaseName
and DBID <> 0
and spid <> @@spid exec(@execSql)
GO
-- modified DB name.
ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE --单用户模式
ALTER DATABASE AxDB MODIFY NAME = AxDB_Dev240228
ALTER DATABASE AxDB_DEL SET MULTI_USER --多用户模式
导入Bak文件
RESTORE DATABASE [DbTest]
FROM
disk = N'C:\File\bak.bak'
WITH
FILE =1,
REPLACE,
RECOVERY,
STATS=5;
num2str
(
moneyReal,
-1, // Minimum number of characters to output into the string. -1 means infinite number of characters
-1, // Required number of digits to the right of the decimal. -1 means infinite number of digitis
DecimalSeparator::Dot, // 1
ThousandSeparator::Comma // 2
);
private DimensionDefault CreateDefaultDimension(container conAttr, container conValue)
{
DimensionAttributeValueSetStorage valueSetStorage = new DimensionAttributeValueSetStorage();
int i;
DimensionAttribute dimensionAttribute;
DimensionAttributeValue dimensionAttributeValue;
str dimValue;
for (i = 1; i <= conLen(conAttr); i++)
{
dimensionAttribute = dimensionAttribute::findByName(conPeek(conAttr,i));
if (dimensionAttribute.RecId == 0)
{
continue;
}
dimValue = conPeek(conValue,i);
if (dimValue != "")
{
// The last parameter is "true". A dimensionAttributeValue record will be created if not found.
dimensionAttributeValue =
dimensionAttributeValue::findByDimensionAttributeAndValue(dimensionAttribute,dimValue,false,true);
// Add the dimensionAttibuteValue to the default dimension
valueSetStorage.addItem(dimensionAttributeValue);
}
}
return valueSetStorage.save();
}
————————————————
版权声明:本文为CSDN博主「mahailiang」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mahailiang/article/details/82383086