I am getting a repeated error trying to build the protected storage file for SSMA for Oracle version 6.0.1. I have made various attempts; nothing works! SSMA insists on writing to the roaming profile directory and the file it writes to is ALWAYS in use. Even if I reboot it is reported to be "in use." Even if I power down and restart, it is reported to be in use. Even when I use my home computer (which is configured with a local profile and where there is no place to roam), the application writes to the roaming profile and the file is reported to be in use. It is the same with SSMA 5.3. I also tried launching the special command shell with the same result. It is the same with the 2012 server version. I also tried using hardcoded values and skipping the variable file.
No one else reports this issue. Does anyone know what am I doing wrong or how I can work around this issue?
Here is the command and error text:
C:\Windows\System32>SSMAforORacleConsole.exe -securepassword -add DEV -s "y:\dba\projects\OracleToSQLServerMigration\SSMAProjects\DEV_Migration\command-config\DataMigrationDEV.xml" -v y:\dba\projects\OracleToSQLServerMigration\SSMAProjects\DEV_Migration\command-config\VariableValueFileSample - DEV.xml"
[5/19/2016 10:32:33 AM] INPUT Enter password for server id 'DEV': ****
[5/19/2016 10:32:36 AM] INPUT Re-enter password for server id 'DEV': ****
[5/19/2016 10:32:38 AM] FATALERR Unexpected error during addition of servers to protected storage
[5/19/2016 10:32:38 AM] **NESTED The process cannot access the file 'C:\Users\amorris\AppData\Roaming\Microsoft SQL Server Migration Assistant\Oracle\ProtectedStorage.ssma' because it is being used by another process.**
Here is the connection file, DataMigrationDEV.xml (edited to remove server information):
<?xml version="1.0" encoding="UTF-8"?>
-<ssma-script-file xsi:noNamespaceSchemaLocation="..\Schemas\O2SSConsoleScriptSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<config>
-<output-providers>
<data-migration-connection target-server="AAA_DEV" source-server="DEV"/>
<log-verbosity level="debug"/>
</output-providers>
</config>
-<servers>
-<sql-server name="AAA_DEV">
-<windows-authentication>
<server value="$SQLServerName$"/>
<database value="$SQLServerDb$"/>
<encrypt value="true"/>
<trust-server-certificate value="true"/>
</windows-authentication>
</sql-server>
-<oracle name="DEV">
-<tns-name-mode>
<connection-provider value="Oracle Client Provider"/>
<service-name value="$OracleInstance$"/>
<user-id value="$OracleUserName$"/>
</tns-name-mode>
</oracle>
</servers>
-<script-commands>
<connect-source-database server="DEV"/>
<connect-target-database server="AAA_DEV"/>
<map-schema sql-server-schema="$SQLServerDb$.dbo" source- schema="$OracleSchemaName$"/>
<migrate-data verbose="true" report-errors="true" write-summary-report- to="$SummaryReports$" object-type="category" object-name="$OracleSchemaName$.Tables"/>
</script-commands>
</ssma-script-file>
Here is the variable file (edited to remove identifying information):
<?xml version="1.0" encoding="utf-8"?>
<!--
Variable value file for SSMA-v4.2 Console for Oracle adapted for AIMS.
Specified name and value attribute values are mandatory
Name values should begin and end with '$'
Use of this file is NOT mandatory
option -v[ariable]. See the documentation for SSMA-v4.2 Console for more information.
-->
<variables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="..\Schemas\ConsoleScriptVariablesSchema.xsd">
<!--
********************************** MUST DO **************************************************
***** MUST replace occurrences of {<value>} with appropriate values wherever necessary *****
*********************************************************************************************
-->
<!--
***************************************************************************
***** The "working folder" {Working Folder Path} should exist *****
***** prior to console script execution *****
***************************************************************************
-->
<variable name="$WorkingFolder$" value="d:\app\OracleToSQLServerMigration\DEV_Migration\"/>
<variable-group name="OracleConnection">
<variable name="$OracleInstance$" value="DEV"/>
<variable name="$OracleUserName$" value="USERA"/>
<variable name="$OraclePassword$" value="{password}"/>
<variable name="$OracleSchemaName$" value="SCHEMAA"/>
</variable-group>
<variable-group name="SQLServerConnection">
<variable name="$SQLServerName$" value="dev.sample.edu\DEV"/>
<variable name="$SQLServerDb$" value="MigrationTest"/>
</variable-group>
<variable-group name="Report">
<variable name="$SummaryReports$" value="$WorkingFolder$"/>
<variable name="$AssessmentReportFolderName$" value="AssessmentReports"/>
<variable name="$AssessmentReports$" value="$WorkingFolder$\$AssessmentReportFolderName$"/>
<variable name="$RefreshDBFolder$" value="$WorkingFolder$"/>
<variable name="$ConvertARReportsFolder$" value="$WorkingFolder$\$AssessmentReportFolderName$"/>
<variable name="$SynchronizationReports$" value="$WorkingFolder$"/>
<variable name="$SaveScriptFolder$" value="$WorkingFolder$"/>
<variable name="$ConvertSQLReports$" value="$WorkingFolder$"/>
<!--
***************************************************************************
***** The folder {Folder where sql files are stored} needs to exists *****
***** and should contain the *.sql files that need to be converted *****
***** using convert-sql-statement command *****
***************************************************************************
-->
<variable name="$ConvertSqlSampleFiles$" value="$WorkingFolder$\ {Folder where sql files are stored}"/>
</variable-group>
<variable-group name="ProjectSpecs">
<variable name="$project_name$" value="DEV_Migration"/>
<variable name="$project_overwrite$" value="true"/>
<variable name="$project_type$" value="sql-server-2014"/>
<variable name="$project_folder$" value="$WorkingFolder$\$project_name$"/>
</variable-group>
</variables>
I have been through some web pages for file used by another process errors. I just do not see how the file could be used by another process. It gets created by this application! And the repetition on all servers makes a legitimate error or any kind of server permission error less likely.
Any ideas?
Thank you,
A L Morris
Related
I'm trying to create a release where variables from my library are used to replace values in SetParameters.xml. For replacing I used following task: https://github.com/qetza/vsts-replacetokens-task#readme
In my web.config I have following for my connectionStrings:
<connectionStrings configSource="config\connectionStrings.local.config" />
For deployment, this should use another file, eg:
<connectionStrings configSource="config\connectionStrings.config" />
My parameters.xml looks like this:
<parameter name="Connection Strings Config File Location"
defaultValue="__ConnectionStringsConfigurationFileLocation__">
<parameterEntry kind="XmlFile"
scope="\\Web.config$"
match="/configuration/connectionStrings/#configSource" />
<parameter name="Umbraco Database Connection String"
defaultValue="__UmbracoDatabaseConnectionString__">
<parameterValidation kind="AllowEmpty" />
<parameterEntry kind="XmlFile"
scope="\\config\\connectionStrings.config$"
match="/connectionStrings/add[#name='umbracoDbDSN']/#connectionString" />
The variable ConnectionStringsConfigurationFileLocation is in my library:
After deploying, the value of the configSource in web.config remains untouched. But the value of connectionString in \config\connectionStrings.config is replaced succesfully.
What could be the issue that the web.config is not updating?
Edit: Screenshots tasks:
replace
deploy
I have some SQL in a variable that I want to use in a BIML template. (Originally I was getting the SQL from a C# variable, but that doesn't seem to be relevant) I'm using BIML like this:
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<OleDbConnection Name="Source" ConnectionString="Provider=SQLNCLI11;Data Source=localhost\dev2017;Integrated Security=SSPI;Initial Catalog=tempdb;" />
</Connections>
<Packages>
<Package Name="SO_51407483" ConstraintMode="Linear">
<Variables>
<Variable Name="querySql" DataType="String" IncludeInDebugDump="Exclude" EvaluateAsExpression="true">
<![CDATA["SELECT --This is a comment
1 AS Col1"]]>
</Variable>
</Variables>
<Tasks>
<Dataflow Name="DFT Demo">
<Transformations>
<OleDbSource Name="OLESRC query" ConnectionName="Source">
<VariableInput VariableName="User.querySql" />
</OleDbSource>
</Transformations>
</Dataflow>
</Tasks>
</Package>
</Packages>
</Biml>
The issue I have is that when the file is compiled the line breaks in querySql appear to be stripped out, but only during the validation step of the compilation. This means that anything after the first comment in querySql becomes part of the comment and BIML's validation fails.
The error message is:
Node OLESRC query: Could not execute Query on Connection Source:
SELECT --This is a comment1 AS Col1
Incorrect syntax near 'SELECT'
If I change querySql to use the /* */ style of comment the validation passes. If I then open the generated dtsx and look at the variable in SSIS the line breaks are there again.
Is there a way around this without having to use /* */ everywhere?
Experiments
This doesn't compile:
<Variable Name="querySql" DataType="String" IncludeInDebugDump="Exclude" EvaluateAsExpression="true">
"SELECT --This is a comment
1 AS Col1"
</Variable>
This compiles, and the resulting dtsx variable ends up with one line break
<Variable Name="querySql" DataType="String" IncludeInDebugDump="Exclude" EvaluateAsExpression="true">
"SELECT /*This is a comment*/
1 AS Col1"
</Variable>
This compiles, and the resulting dtsx variable ends up with two line breaks
<Variable Name="querySql" DataType="String" IncludeInDebugDump="Exclude" EvaluateAsExpression="true">
"SELECT --This is a comment
1 AS Col1"
</Variable>
I've raised this with Variagence: https://github.com/varigence/BimlPit/issues/82
As a minimal repro, I'm getting the carriage return/line feeds preserved.
I declare my query variable and then use it in both an Execute SQL Task and a Dataflow's OLEDB Source.
The Execute SQL Task doesn't look like it preserves the CR/LF until you click the ellipses but then the popup correctly displays the code.
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<#
string query = #"--This is a comment
SELECT 1 AS Col1";
#>
<Connections>
<OleDbConnection Name="Source" ConnectionString="Provider=SQLNCLI11;Data Source=localhost\dev2017;Integrated Security=SSPI;Initial Catalog=tempdb;" />
</Connections>
<Packages>
<Package Name="SO_51407483" ConstraintMode="Linear">
<Tasks>
<ExecuteSQL Name="SQL Test Task" ConnectionName="Source">
<DirectInput><![CDATA[<#=query#>]]></DirectInput>
</ExecuteSQL>
<Dataflow Name="DFT Demo">
<Transformations>
<OleDbSource Name="OLESRC query" ConnectionName="Source">
<DirectInput><![CDATA[<#=query#>]]></DirectInput>
</OleDbSource>
</Transformations>
</Dataflow>
</Tasks>
</Package>
</Packages>
</Biml>
I'm trying to add a new config section to our SF app configuration and it is failing:
Register-ServiceFabricApplicationType : The Settings section with name 'Blah' in ConfigOverride
'Config' is invalid. Cannot find a section with the same name.
Nothing fancy, done this many times before but I'm doing something wrong and I don't see.
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="eBenefits.OrganizationDomainType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="Parameter1" DefaultValue="" />
<Parameter Name="Parameter2" DefaultValue="" />
<Parameter Name="Parameter3" DefaultValue="" />
</Parameters>
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
...
<Section Name="Blah">
<Parameter Name="Parameter1" Value="[Parameter1]" />
<Parameter Name="Parameter2" Value="[Parameter1]" />
<Parameter Name="Parameter3" Value="[Parameter1]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
...
</ApplicationManifest>
Copying application to image store...
Upload to Image Store succeeded
Registering application type...
Register-ServiceFabricApplicationType : The Settings section with name 'Blah' in ConfigOverride
'Config' is invalid. Cannot find a section with the same name.
FileName: C:\SfDevCluster\Data\ImageBuilderProxy\AppType\a2b68765-272d-4477-aad2-f3d4818365c7\ApplicationManifest.xml
At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:251 char:9
+ Register-ServiceFabricApplicationType -ApplicationPathInImage ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Register-Servic
eFabricApplicationType], FabricException
+ FullyQualifiedErrorId : RegisterApplicationTypeErrorId,Microsoft.ServiceFabric.Powershell.RegisterApplicationTyp
e
Finished executing script 'Deploy-FabricApplication.ps1'.
Time elapsed: 00:00:39.7598137
The PowerShell script failed to execute.
I forgot to define it in My-Service\PackageRoot\Config\Settings.xml
Reference: Full instructions on adding SF settings
For anyone else who encountered this issue and already have Settings.xml files, you may wish to create a new Settings.xml using the Visual Studio context menu (new xml file) and get rid of the previous one after copying its contents across. For whatever reason Visual Studio did not recognise that I had a Settings.xml file and thus SF was unable to access it.
After doing this everything works.
I'd like to set the name of an input control in the jrxml file where it is defined; is that possible?
I know how to set the name of the input control via the Repository Explorer in Jaspersoft Studio, and I know how to set the name of an input control via the Jaspersoft Server.
However, I'd like to set the name of an input control in the jrxml file so that it will be set automatically upon being published to the server. Is there a property to use, similar to the following:
<parameter name="status_date_minimum" class="java.sql.Date">
<property name="some.property.key" vhalue="Minimum Status Date"/>
<defaultValueExpression><![CDATA[java.sql.Date.valueOf(java.time.LocalDate.now().minusYears(10).withMonth(1).withDayOfMonth(1))]]></defaultValueExpression>
</parameter>
As noted by #Siddharth in comments and suggested to me by a co-worker, there is a way to specify the label for the control outside of the user interface.
JasperReports Server associates each report with an XML file that it appears to create around the time it publishes your report to the server. The XML file contains, among other information, the labels for any input controls.
For an example of the XML file, first publish your report to a location on JasperReports Server. For the purpose of this example, the report file name is report.jrxml and the location is path/to/your; JasperReports Server appears to publish your report to path/to/your/report/Main jrxml (per JasperSoft Studio Repository Explorer) or path/to/your/report (per JasperReports Server Web UI).
Second, export your report from JasperReports Server (via the Web UI or via the command line); JasperReports Server will produce a zip file with the following content:
/index.xml
/resources/path/.folder.xml
/resources/path/to/.folder.xml
/resources/path/to/your/.folder.xml
/resources/path/to/your/report.xml
/resources/path/to/your/report_files/main_jrxml.data
main_jrxml.data contains the data from report.jrxml; report.xml contains the labels for any input controls. The content of report.xml may be similar to the following:
<?xml version="1.0" encoding="UTF-8"?>
<reportUnit exportedWithPermissions="true">
<folder>/resources/path/to/your</folder>
<name>report</name>
<version>2</version>
<label>report</label>
<description></description>
<creationDate>2018-03-21T18:12:41.759-04:00</creationDate>
<updateDate>2018-03-21T18:48:35.602-04:00</updateDate>
<mainReport>
<localResource
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
exportedWithPermissions="false" dataFile="main_jrxml.data" xsi:type="fileResource">
<folder>/resources/path/to/your/report_files</folder>
<name>main_jrxml</name>
<version>4</version>
<label>Main jrxml</label>
<creationDate>2018-03-21T18:12:41.759-04:00</creationDate>
<updateDate>2018-03-21T18:48:35.410-04:00</updateDate>
<fileType>jrxml</fileType>
</localResource>
</mainReport>
<inputControl>
<localResource
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
exportedWithPermissions="false" xsi:type="inputControl">
<folder>/resources/path/to/your/report_files</folder>
<name>status_date_minimum</name>
<version>1</version>
<label>status_date_minimum</label>
<creationDate>2018-03-21T18:48:35.602-04:00</creationDate>
<updateDate>2018-03-21T18:48:35.602-04:00</updateDate>
<type>2</type>
<mandatory>false</mandatory>
<readOnly>false</readOnly>
<visible>true</visible>
<dataType>
<localResource exportedWithPermissions="false" xsi:type="dataType">
<folder>/resources/path/to/your/report_files/status_date_minimum_files</folder>
<name>myDatatype</name>
<version>0</version>
<label>myDatatype</label>
<creationDate>2018-03-21T18:48:35.602-04:00</creationDate>
<updateDate>2018-03-21T18:48:35.602-04:00</updateDate>
<type>3</type>
<strictMin>false</strictMin>
<strictMax>false</strictMax>
</localResource>
</dataType>
</localResource>
</inputControl>
<inputControl>
<localResource
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
exportedWithPermissions="false" xsi:type="inputControl">
<folder>/resources/path/to/your/report_files</folder>
<name>status_date_maximum</name>
<version>1</version>
<label>status_date_maximum</label>
<creationDate>2018-03-21T18:48:35.602-04:00</creationDate>
<updateDate>2018-03-21T18:48:35.602-04:00</updateDate>
<type>2</type>
<mandatory>false</mandatory>
<readOnly>false</readOnly>
<visible>true</visible>
<dataType>
<localResource exportedWithPermissions="false" xsi:type="dataType">
<folder>/resources/path/to/your/report_files/status_date_maximum_files</folder>
<name>myDatatype</name>
<version>0</version>
<label>myDatatype</label>
<creationDate>2018-03-21T18:48:35.602-04:00</creationDate>
<updateDate>2018-03-21T18:48:35.602-04:00</updateDate>
<type>3</type>
<strictMin>false</strictMin>
<strictMax>false</strictMax>
</localResource>
</dataType>
</localResource>
</inputControl>
<alwaysPromptControls>true</alwaysPromptControls>
<controlsLayout>1</controlsLayout>
</reportUnit>
You may edit the content of the reportUnit/inputControl/localResource/label element to change the name of the label.
Once edited, you may import the data into the JasperReports Server. If you import through the command line, I recommend importing the directory, not the zip file - it appears that the command line import is picky about the zip format. Also, if you import through the command line, you must restart the JasperReports Server before you may run your changed report.
Using WiX 3.7 and .NET 4.0.
How does one set burn variables when running a WiX bootstrapper EXE from the command line?
First of all, the burn variables that you wish to set need to be set as Overridable. To do this you must include the follow namespace in your WXS: xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" and if you're using Visual Studio like me you need to include WixBalExtension.dll in your project references. Next you need to add the following attribute to all of the burn variables that you want to set via the command line: bal:Overridable="yes".
Now you can set the variables via the command line in this fashion:
BootstrapperSetup.exe /i /passive MyBurnVariable1=1 MyBurnVariable2=2
Below is an example of a WXS file that satifies all of the conditions described above:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="MyProduct" Version="1.0.0" Manufacturer="MyManufacturer" UpgradeCode="PUT-UPGRADE-CODE-HERE">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="MyLicense.htm" ThemeFile="MyThemeFile.xml" LocalizationFile="MyLocFile.wxl" />
</BootstrapperApplicationRef>
<Variable Name="MyBurnVariable1" bal:Overridable="yes" Type="numeric" Value="0" />
<Variable Name="MyBurnVariable2" bal:Overridable="yes" Type="numeric" Value="0" />
<Chain>
<MsiPackage Id="MyFirstMsiPackage"
SourceFile="first.msi"
InstallCondition="MyBurnVariable1 = 1" />
<MsiPackage Id="MySecondMsiPackage"
SourceFile="second.msi">
<MsiProperty Name="MY_PROPERTY" Value="[MyBurnVariable2]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>