Archive

Author Archive

C++/WinRT Windows UI Library 3.0 on Windows Server 2019

August 11, 2022 Leave a comment

After installing all the required components, while trying to build the C++/WinRT Windows UI library 3.0 application on Windows Server 2019 you will see the below error message.

error MIDL2011: [msg]unresolved type declaration [context]: Microsoft.UI.Xaml.Window

I had a hard time figuring out the issue. WinRT software requirement reports all the installations are successful but actually, that’s not the case. Windows App SKD C++ VS2022 Templates is not installed properly.

At the end of the VSIX installation, it will reports the installation is successful.

If you analyze the logs, you will notice that “The current OS Version ‘10.0.17763.0’ is not in the supported

8/11/2022 3:21:23 PM - Skipping non-applicable package Microsoft.VisualStudio.OfficeDeveloperTools.WindowsIdentityFoundation.Msu: The current OS Version '10.0.17763.0' is not in the supported version range '(,6.2)'.
8/11/2022 3:21:56 PM - Unable to load extension due to unspecified error: collectionKey
8/11/2022 3:21:56 PM - Install to Visual Studio Enterprise 2022 completed successfully. The extension has been installed to C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\nbqyjy2u.tb4
8/11/2022 3:21:56 PM - Refreshing LastAllUserExtensionsAutoUpdatedTime.

Conclusion

C++/WinRT Windows UI Library 3.0 is not supported in Windows Server 2019, it works on Windows Server 2022.

Categories: Visual Studio, Windows

Backup AWS Route53

August 4, 2022 Leave a comment

I had to make a lot of changes in the route53 record sets, but before making the change I wanted to backup the existing route53 entries. I couldn’t find any out-of-the-box script or tools, so wrote a small python script to back up the route53 into JSON files.

import json

import boto3


def main():
    r53 = boto3.client('route53')

    # Get the list of hosted zones
    res_hosted_zone = r53.list_hosted_zones()
    # for each hosted-zone
    for zone in res_hosted_zone['HostedZones']:
        # Extract the hosted-zone-id and hosted-zone-name
        hosted_zone_id = zone['Id'].replace("/hostedzone/", "")
        hosted_zone_name = zone['Name']

        # Get the record set
        res_record_sets = r53.list_resource_record_sets(HostedZoneId=hosted_zone_id)
        # Backup the record set into file. 
        file_name = f"{hosted_zone_id}-{hosted_zone_name}"
        record_sets_json = json.dumps(res_record_sets['ResourceRecordSets'], indent=4)
        with open(file_name, "w") as file:
            file.write(record_sets_json)


if __name__ == '__main__':
    main()
Categories: AWS, Route53

Open port in Windows Firewall using Command Line

August 2, 2022 Leave a comment

Execute the below command in the Windows Command Line to open port 80 in the windows firewall.

netsh advfirewall firewall add rule name="Open HTTP" dir=in action=allow protocol=TCP localport=80
Categories: Windows

TFS Project Creation Failed

April 23, 2013 Leave a comment

In my previous post I mentioned we successfully recovered the TFS from the storage failure, but, recently we hit with another issue while creating the new TFS project.

Issue 1: While trying to create the new TFS project, we got the following error.

TF218027: The following reporting folder could not be created on the server that is running SQL Server Reporting Services: /TfsReports/Collection. The report server is located at: http://<ServerName>/Reports. The error is: TF30063: You are not authorized to access <ServerName>\Collection.. Verify that the path is correct and that you have sufficient permissions to create a folder on that server, and then try again..

The above error was fixed by changing the reporting service to Network Service account from domain account.

Issue 2: We got the following error after the Issue 1 fixed.

image_2

Error
TF30224: Failed to retrieve projects from the report server. Please check that the SQL Server Reporting Services Web and Windows services are running and you have sufficient privileges for creating a project.

Explanation
The Project Creation Wizard encountered a problem while creating reports on the SQL Server Reporting Services on http://<ServerName>/ReportServer/ReportService2005.asmx. The reason for the failure cannot be determined at this time. Because the operation failed, the wizard was not able to finish creating the SQL Server Reporting Services site.

User Action
Contact the administrator for the SQL Server Reporting Services on http://<ServerName>/ReportServer/ReportService2005.asmx to confirm that the SQL Server Reporting Services server is running and you have sufficient privileges to create a project . Your user account on SQL Server Reporting Services must have Content Manager permission to create a new project. Also, you might find additional helpful information in the project creation log. The log shows each action taken by the wizard at the time of the failure and may include additional details about the error.

And the log was complaining about the permission issues, with the reports:

Event Description: TF30162: Task "Populate Reports" from Group "Reporting" failed

This issue was fixed by updating the following reporting service data source files will proper credentials.

  • Tfs2010OlapReportDS
  • Tfs2010ReportDS
  • TfsOlapReportDS
  • TfsReportDS

With the outage we lost the reporting service encryption key and had to delete all the encrypted content and with that all the connection information in the reporting service data source files were wiped off.

Categories: TFS Tags:

TFS Disaster Recovery

April 23, 2013 Leave a comment

Few weeks back we had a major outage in our data center which caused by SAN failure with that we lost TFS databases. Fortunately, we had the backups which we take daily to other drive which is in another SAN, with the backups we successfully recovered the TFS.

Team Foundation System (TFS) can be recovered if you have the following database.

  • Tfs_Configuration
  • Tfs_Collection
  • ReportServer
  • ReportServer_TempDB
  • Tfs_Warehouse (Warehouse database, can be rebuild)
  • Tfs_Analysis (Warehouse database, can be rebuild)
    TFS Data Warehouse database can be rebuild, refer the below link.

http://msdn.microsoft.com/en-us/library/cc668753(v=vs.100).aspx

    Categories: TFS Tags: , ,

    SQL – Tip : How to change the SQL Server Instance Name ?

    March 12, 2013 Leave a comment

    First get the current instance name using the following command.

    SELECT @@SERVERNAME

    Run the following query to update the server name.

    sp_dropserver '<OLD SERVER NAME>'
    GO
    sp_addserver '<NEW SERVER NAME>', local
    Categories: SQL Tags:

    SQL – Tip : How to move tempdb to different location?

    February 19, 2013 Leave a comment

    Step 1: Execute the following query.

    USE master
    GO
    ALTER DATABASE tempdb MODIFY FILE
    (NAME = tempdev, FILENAME = 'U:\mssql\data\tempdb.mdf')
    GO
    ALTER DATABASE tempdb MODIFY FILE
    (NAME = templog, FILENAME = 'U:\mssql\sql_log\templog.ldf')
    GO

    Step 2: Restart the SQL Server. (Changes will not reflect until the SQL Server restarts.)

    Categories: SQL Tags: , ,

    SQL–TIP : How to identify fragmentation % of the index?

    November 29, 2012 Leave a comment

    Here is the query that give you the fragmentation in percentage of all the index in the selected database.

    SELECT 
    SCHEMA_NAME(o.Schema_ID) AS SchemaName
    , OBJECT_NAME(s.[object_id]) AS TableName
    , i.name AS IndexName
    , ROUND(s.avg_fragmentation_in_percent,2) AS [Fragmentation %]
    FROM sys.dm_db_index_physical_stats(db_id(),null, null, null, null) s
    INNER JOIN sys.indexes i ON s.[object_id] = i.[object_id]
    AND s.index_id = i.index_id
    INNER JOIN sys.objects o ON i.object_id = O.object_id
    WHERE s.database_id = DB_ID()
    AND i.name IS NOT NULL
    AND OBJECTPROPERTY(s.[object_id], 'IsMsShipped') = 0
    ORDER BY [Fragmentation %] DESC
    Categories: SQL Tags: , ,

    Outline of Microsoft’s Big Data Solution

    October 30, 2012 1 comment
    Categories: BigData, SQL Tags: , , , ,

    Continuous Integration : How to generate SQL re-runnable script ?

    October 23, 2012 Leave a comment

    In my current organization we are continuously improving in our build and deployment process and as a next step we are designing one touch deployment process which will also help us to practice Continuous Integration.

    Continuous Integration definition by Martin Flower.

    “Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.”

    http://martinfowler.com/articles/continuousIntegration.html

    During our initial design phase, when we try to visualize the entire deployment system from beginning to end, everything seems to be achievable except the database deployment because of the following problems:

    • How to generate the incremental/delta scripts?
    • Even if we managed to generate the incremental scripts, how do we deploy the same build multiple times to an environment.
    • They were many other hurdles as well, but only the above two was the major road blocker for us.

      After googling a lot and going through many best practices for database deployment, we decided that the best suitable solution for us is to generate re-runnable incremental scripts.
      And, now we were clear with what is required, but the question is how to generate these scripts?

    For the problem #1 : The good thing we have is, we have all database schema in Visual Studio Team System Database Project and anybody who uses VSTS Database Project might know how easy it is to compare the database and generate the differences. Smile

    For the problem #2 : The solution is to generate the re-runnable incremental scripts. I’ve searched a lot to find a tool which could generate me the re-runnable incremental scripts but to my bad luck that there aren’t any free tool available to generate this. (Please drop me a note if anyone knows a good tool to generate the re-runnable scripts).

    So, now the only option left for me is to write a simple tool which would generate the required scripts for me. After googling a bit I found that the way scripts are generated in Visual Studio (VSTSDB) can be customized with an extension.

    I have create an extension which can generate re-runnable scripts, if anyone interested please drop me a note at rauof.thameem@gmail.com. I will be happy to share the details.

    Categories: Common, Visual Studio Tags: , , ,