SQL Server Attach Database

All,
Today morning I had an call from supplier that they need to get attached their files to the database . As SQL Server amazingly does this for us using SSMS , but i decided to give brain some food.

Here it goes syntaxtically . Open  SQL QUERY Session and apply the following as shown below .

CREATE DATABASE Transearch_KE  
    ON (FILENAME = 'D:\data\MSSQL14.KPHQTSRCH01SQP_1\MSSQL\Data\Transearch_KE.mdf'),  
    (FILENAME = 'L:\logs\MSSQL14.KPHQTSRCH01SQP_1\MSSQL\Log\Transearch_KE_log.ldf')  
    FOR ATTACH;


Messages
Converting database 'Transearch_KE' from version 852 to the current version 869.
Database 'Transearch_KE' running the upgrade step from version 852 to version 853.
Database 'Transearch_KE' running the upgrade step from version 853 to version 854.
Database 'Transearch_KE' running the upgrade step from version 854 to version 855.
Database 'Transearch_KE' running the upgrade step from version 855 to version 856.
Database 'Transearch_KE' running the upgrade step from version 856 to version 857.
Database 'Transearch_KE' running the upgrade step from version 857 to version 858.
Database 'Transearch_KE' running the upgrade step from version 858 to version 859.
Database 'Transearch_KE' running the upgrade step from version 859 to version 860.
Database 'Transearch_KE' running the upgrade step from version 860 to version 861.
Database 'Transearch_KE' running the upgrade step from version 861 to version 862.
Database 'Transearch_KE' running the upgrade step from version 862 to version 863.
Database 'Transearch_KE' running the upgrade step from version 863 to version 864.
Database 'Transearch_KE' running the upgrade step from version 864 to version 865.
Database 'Transearch_KE' running the upgrade step from version 865 to version 866.
Database 'Transearch_KE' running the upgrade step from version 866 to version 867.
Database 'Transearch_KE' running the upgrade step from version 867 to version 868.
Database 'Transearch_KE' running the upgrade step from version 868 to version 869.



Screenshot for your reference .

Comments

Popular posts from this blog

SQL SERVER – Event ID 107- Report Server Windows Service (MSSQLSERVER) cannot connect to the report server database.

SQL Server Builds Information

Using DBCA silent install and disabling automatic memory management