How to delete and re-add project in TFS

Today with one of the SSAS project couple of files lost association with TFS. The main cube file was showing renaming in TFS history.

We decided to delete and re-add the SSAS project in TFS.

Following steps:

  1. Copy the project using Windows File explorer at different location.
  2. Check if any checked-out files. In this case we did undo checkout and made sure no one has files checked out.
  3. Using Source Control Explorer delete the project and check-in.
  4. Now copy back from the backup location.
  5. Open the project in Visual Studio or SSDT.
  6. We should see all the files and no association with TFS.
  7. Right click on the project in Solution explorer window and select “Add Project to Source Control…”.
  8. The entire project will get into TFS and all the files will get TFS association.
  9. Ask any of other team member to get the latest version for the project from TFS and open with Visual Studio or SSDT.

sharepoint server User Profile service error – Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.

Reference 1 and Reference 2

During a review of the SharePoint farm health, we saw a lot of these errors in the event logs. The farm itself was still functional, but these errors were filling the event logs. The account is question was the same one that was used for the IIS website application pools.

  1. Stop the relevant application pools
  2. Stop the IIS Admin Service (in services.msc)
  3. Stop the Web Server
  4. Provision logon locally rights to DOMAIN\AppPoolAccount 

Now open a command window (Start-Run-> type “CMD” ) and in the window type the following:

net localgroup administrators DOMAIN\AppPoolAccount /add

runas /u:DOMAIN\AppPoolAccount /profile cmd

After the second command, you will be prompted to enter the password of the DOMAIN\AppPoolAccount and when you hit enter it will launch a new window. In the window type the following to confirm the user profile directory

echo %userprofile%

5. Launch the User Profiles dialog or check “C:\users” to verify that the directory for your application pool account ID has been created.

Close the second command window, and in the original one type the following to remove the app pool account from the administrators group.  For whatever reason it only needed to be there to create the local profile and it’s not best practices or recommended that you leave the account as an admin on a production farm.

net localgroup administrators DOMAIN\AppPoolAccount /delete

7. Exit the command window

8. Start the Web Server

9. Enable and then Start the IIS Admin Service.

 

Recurring Application server DCOM error The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {000C101C-0000-0000-C000-000000000046} and APPID {000C101C-0000-0000-C000-000000000046} to the user

Reference

First change Component Service Owner and Permission

In the DCOM Config dialog box, you noticed that the settings are grayed out. In order to enable those settings, perform the following registry modification.

  1. Open Registry Editor by typing “regedit.exe” in Start > Run.
  2. Navigate and select the key “[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{000C101C-0000-0000-C000-000000000046}]”
  3. Right click and select Permissions.
  4. In the popup windows, click Advanced.
  5. In the Advanced Security Settings windows, select Owner tab and change the owner to Administrators. Click OK to close the window.
  6. In the Permissions screen, select Administrators and check Full Control. Click OK to close the screen.
  7. Close the registry editor.
  8. Restart the machine.

This error is being logged into the System event logs in Event Viewer due to inadequate permission for the farm admin account on the DCOM component 000C101C-0000-0000-C000-000000000046. In order to change the permission settings, perform the following steps:

  1. Open Component Service by clicking Start > Administrative Tools > Component Services.
  2. Navigate and expand the node Component Services > Computers > My Computer > DCOM Config.
  3. Right Click the sub node “000C101C-0000-0000-C000-000000000046” and select “Properties”.
  4. On the Properties dialog box, select Security tab. In most cases you will notice that the settings are grayed out. This is because the logged in user doesn’t have enough permissions on this component to change the settings. In order to provide this permissions, perform the steps described above “Change Component Service Owner and Permission”. You may need to restart the server after doing this.
  5. Once you set up the permission mentioned in previous step, in the Launch and Activation Permissions section in Security tab, select Customize option and click Edit.
  6. In the popup window, add the farm admin user account and check Local Launch and Local Activation permissions. In case everything is checked, uncheck the Remote launch and Remote Activation.
  7. Restart IIS and SP Timer. If possible, restart the server itself. 

We need to include the NORESEED option when running DBCC CHECKIDENT to find the current identity value

Without NORESEED option if we run DBCC CHECKIDENT, then it checks the current identity value and if the identity and current value don’t match, it reseeds the identity.

USE AdventureWorks2012;

GO

DBCC CHECKIDENT (‘Person.AddressType’);

GO

If your intent is to find the current identity value, then we will have to include NORESEED option.

USE AdventureWorks2012;

GO

DBCC CHECKIDENT (‘Person.AddressType’, NORESEED);

GO

SQL Server job step failed with SQLSTATE 01000] (Message 7989) DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528) Checking identity information: current identity value ‘-1’.

Today suddenly SQL server job step failed with message:

[SQLSTATE 01000] (Message 7989)  DBCC execution completed. If DBCC printed error messages, contact your system administrator.

[SQLSTATE 01000] (Message 2528)  Checking identity information: current identity value ‘-1’.

Same step was running with success till yesterday with the above message as info type message.