Database suspect mode SQL server

    Database suspect mode One of my database went into suspect mode, it is not a critical one and small sized database. There was no backup ๐Ÿ™‚ How to recovery the suspect database?   Paul Randal’s post https://www.sqlskills.com/blogs/paul/creating-detaching-re-attaching-and-fixing-a-suspect-database/ If you donโ€™t have any backups, then the only way to get into the database is to use EMERGENCY mode. This lets you into the database but you need to be aware that recovery has not completed so the contents of the database are transactionally (and possibly structurally) inconsistent. Iโ€™m going to choose to repair the database using EMERGENCY-mode repair. See CHECKDB From Every Angle: EMERGENCY mode repair โ€“ the very, very last…

  • AlwaysON,  DBA

    AlwaysON SQL server database blocking SSISDB Active Operations

    AlwaysON SQL server database blocking I had two blocking case on one of my alwaysON databases. Backup is third party tool and it got blocked by each other sessions. SSIS package deployed in SSIS folder and it run long and had blocking as well.   The first one, tried to kill the session ID, it went in to rollback state and it took more than half day, no response. Fix: Just suspend the database in the primary AG this will remove the killed SPID. The second one, we can look into the Active Operations of packages. Integration service catalog โ€“ right click SSISDB โ€“ Active Operations  

  • DBA

    No sysadmin access Microsoft SQL server error 18461

    Login failed for user reason single user mode only one administrator can connect at this time Microsoft SQL server error 18461   You might get a situation that no sysadmin access to SQL server and server installed by someone. Breaking SQL server and adding SA sysadmin of yourself by SQLCMD. You should be OS administrator.   First find out โ€˜Binnโ€™ folder where it is installed C or D drive. Better search in my computer. Open a CMD with administrator Type: cd /d E:\Program Files\Microsoft SQL Server\130\Tools\Binn (OR) 1.Stop the SQL server service 2.Start the service in Single user mode by adding ‘;-mSQLCMD’ to the parameters from SQL server configuration manager…

  • DBA

    The Cluster service failed to bring clustered service or application completely online or offline. One or more resources may be in a failed state.

    Recently, one of alwaysON cluster had issue, cause of file share witness box down and we brought up the box online.   Errors: The Cluster service failed to bring clustered service or application completely online or offline. One or more resources may be in a failed state. This may impact the availability of the clustered service or application. Cluster resource ‘File Share Witness’ of type ‘File Share Witness’ in clustered role ‘Cluster Group’ failed Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart…

  • DBA

    How to use server side trace to capture running query T SQL

    Capturing queries by using server side trace In general, DBA will have a report most of time the server and application web is running slow. You have to find yourself what query is running slow and benchmark and tune it. Profiler trace is good to capture the running code. But it is a GUI and we have to start, capture and stop it. This will also make some performance slowness to the server and you it is hard to read and store data. The server side trace is another option and it is a lightweight and T-SQL code, we can create a stored procedure and schedule it on SQL server…