SharePoint 2013 Server Search status stuck on “Starting”

This was the fix.

  1. Open SharePoint PowerShell as Administrator
  2. Run this Get-SPServiceInstance -All > Get-SPServiceInstance.txt
    1. It will export all Services to the text file un C:\Users\[Username]\ Get-SPServiceInstance.txt
  3. Find the GUID for the Search Service. It was c0220b13-8093-4240-91e4-8427a68e8c0c
  4. Run the following 3 commands
  5. $value = Get-SPServiceInstance -Identity c0220b13-8093-4240-91e4-8427a68e8c0c
  6. $value.provision()
  7. $value.update()
  8. Reboot the SharePoint Server.
  9. Check that the Incremental Search has started!

Your system administrator does not allow the use of saved credentials to log on to the remote computer

From here: https://serverfault.com/questions/396722/your-system-administrator-does-not-allow-the-use-of-saved-credentials-to-log-on

If you don't want to change local or server side GPOs:

Go to Control Panel -> Credential Manager on the local computer you are trying to connect from.
You will see three sections:

  1. Windows Credentials
  2. Certificate-Based Credentials
  3. Generic Credentials

Remove the credentials from Windows Credentials and add it to Generic Credentials.

Why can't Excel open a file when run from task scheduler?

From here: https://superuser.com/questions/579900/why-cant-excel-open-a-file-when-run-from-task-scheduler

1. Open Component Services (Start -> Run, type in dcomcnfg)
2. Drill down to Component Services -> Computers -> My Computer and click on DCOM Config
3. Right-click on Microsoft Excel Application and choose Properties
4. In the Identity tab select This User and enter the ID and password of an interactive user account (domain or local) and click Ok
Keeping it as the interactive user or the launching doesn't work with the task scheduler unfortunately, even when setting the task up to run under an account that has admin access to the machine.

 

MS Access Subreport Header on subsequent pages

From here: https://www.access-programmers.co.uk/forums/threads/subreport-headers.256308/
In the Subreport do the following and you will have the Report header on subsequent pages.

1. Click on "Add a Group"
2. Select "Expression"
3. When the Expression Window appears, type in "=0" and click OK
4. Make this group only have a header section
5. Click on the group's header section
6. Go to Property Sheet and make sure "Repeat Section" is set to "Yes"
Done!

Error Running MS Access Macro from Task Scheduler

Question and solution here: https://superuser.com/questions/402070/run-task-scheduler-task-on-demand-from-limited-user-account-in-windows-7

Go to C:\Windows\System32\Tasks find the related task and assign "read and execute" rights to the user you want to be able to access it. Be sure to assign to "current object only." Then the task will be visible and runnable from the limited user, and it will work if you saved your credentials in it and checked "run whether user is logged on or not."

Password Protect One Drive

1. Access your OneDrive. Log in using your Microsoft credentials.
2. Select any files and/or folders that you wish to share.
3. Click on the “Share” button, located in the upper left corner of the screen.
4. Once the “Share” dialog box opens, select the “Set password” option.
5. Input the password you wish to add to the link.
6. Select the “Get a link” option.
7. The link that pops up now can be copied, and if shared it will ask for a password before its contents can be interacted with.

Constant MS Access database corruption

From here: https://support.microsoft.com/en-gb/help/2957623/cannot-access-shared-files-or-folders-on-a-drive-in-windows-server-201

Symptoms


You may experience one of the following issues:
  • You can see the shared files but cannot open them.
  • When you open a shared file, the loading progress bar is displayed as zero percent.
  • When you open a shared file or a folder, Windows explorer freezes.
  • If you try to restart the Server service, the service freezes in the stopping state.
  • Microsoft Office Access databases (.mdb files) that are hosted on Windows Server 2012 shares may be corrupted.
  • A "file is locked by another user" or "is locked for editing" error occurs in Microsoft Excel.
  • SMB2 dialect negotiation receives only a TCP ACK response.

To work around these issues, follow these steps:

  1. Disable the leasing on the file server. To do this, run the following command:
    REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /v DisableLeasing /t REG_DWORD /d 1 /f 
    Note After you set this registry key, SMB2 leases are no longer granted, but oplocks are still available. This setting is primarily used for troubleshooting.
  2. Restart the file server, or restart the server service. To restart the service, run the following commands:
    NET STOP SERVER
    NET START SERVER

  

Best Way to Fix Recovery Pending State in SQL Server Database

From here: https://mstechtalk.com/fix-recovery-pending-state-sql-server/

Solution 1 worked like a chalm!

States of SQL Server Databases

If a single or multiple core files cannot be accessed in SQL server, it means that the SQL server database is corrupted. As per the measure of damage in the database, there are different states of SQL database. Some of them are explained below:

Online: If a single file is damaged and cannot be accessed, the database will remain available and online.

Suspect: In case, the transaction log file is damaged and it is creating obstructions on recovery or preventing transaction rollback from completion, it will result in failure of SQL database.

Recovery Pending: This state usually occurs when the SQL server knows that recovery of the database is to be done, but something is creating hindrance before starting it. This state is different from the suspect state as it cannot be declared that database recovery will fail, but it has not started yet.

The state of a database can be known after executing the following query statement:

SELECT name, state_desc from sys.databases
GO

Reasons Behind Recovery Pending State in SQL Server

Once a reason is known, finding a solution becomes a lot easier. When SQL database requires recovery and it cannot be started, it is known as pending state. This situation arises when:

  • The database is not cleanly shut down. In other words, one or more unfulfilled transaction is active at that time and the transaction log file has been deleted.
  • Users attempted to transfer the transaction log files to a new drive to solve performance issues. But, this may leads to corruption of log files.
  • Due to inadequate memory space or disk storage, database recovery cannot be started.

Workaround to Fix Recovery Pending State in SQL Server

There are 2 different manual methods to initiate SQL database recovery, which is marked in the recovery pending state. Both the solutions are described below.

Solution 1: Mark SQL Database in Emergency Mode and Start Forceful Repair

Follow these steps to resolve SQL server database issue:

  1. Execute these queries to fix SQL server database in recovery pending state:
  2. ALTER DATABASE [DBName] SET EMERGENCY;
    GO
    ALTER DATABASE [DBName] set single_user
    GO
    DBCC CHECKDB ([DBName], REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;
    GO
    ALTER DATABASE [DBName] set multi_user
    GO

  3. EMERGENCY mode marks the SQL database as READ_ONLY, deactivates logging, and gives the permission to system admin only
  4. This method is capable of resolving any technical issue and bringing the database back to the accessible state. The database will automatically come out of the EMERGENCY mode.

Solution 2: Mark SQL Database in Emergency Mode, Disconnect the Main Database and Attach it Again

Execute these commands to fix recovery pending state in SQL server:

ALTER DATABASE [DBName] SET EMERGENCY;
ALTER DATABASE [DBName] set multi_user
EXEC sp_detach_db ‘[DBName]’
EXEC sp_attach_single_file_db @DBName = ‘[DBName]’, @physname = N'[mdf path]’

These query statements will help the server to get corruption-free log and create a new one automatically.

Warning: Before performing any manual solution on the SQL server database, make sure that the proper backups of the data are created. In case, any error occurs, the data should still be available. Also, the manual approach is to be performed only when a user has a deep technical knowledge on the topic. If a user is unsure and the steps are not clear, another approach is explained in the next section.

Alternative Solution to Fix Recovery Pending State in SQL Server Database

No doubt, the manual solution to repair SQL server database is an effective technique, but it has to be performed with utmost care. Additionally, there are other disadvantages of the method too. So, it is recommended to use an automated tool like SQL Database Repair Software. According to the technical experts, it is the professional method to repair recovery pending state in SQL server 2012.

Final Words

A SQL server database is a lot more complex and difficult to handle. There are many glitches which occur in SQL database, and they have to be resolved as soon as possible. One such problem is a recovery pending state in SQL server. The multiple manual solutions have been described in the post to fix recovery pending state in SQL server database. Moreover, a third-party tool is also introduced to resolve the problem in a hassle-free manner.

    

Easily copy your SQL Azure database to your local development server

From here: https://microsoft.github.io/AzureTipsAndTricks/blog/tip140.html

Note by cbattlegear One important caveat to this process (as shown below). If any writes are happening on the database while you do the export the import will be broken. Best practice is to run CREATE DATABASE AS COPY to create a copy of the database and create an export of the copy.

Right-click on the Database -> click Tasks > Export data-tier application

Now ensure you are connected to your local target SQL server instance (or SQL Azure instance) and right-click on the Database -> click Tasks > Import data-tier application and select the .backpac file that you created earlier.