How to create Database using mdf file only





How to create Database using mdf file only


Step1: Copy below script which demonstrates how to create sample database in SQL Server 2012. This Script will create database using only mdf file

CREATE DATABASE AdventureWorksDW2012ON (FILENAME = 'C:\Data\AdventureWorksDW2012_Data.mdf')FOR ATTACH_REBUILD_LOG ;


Step2: Please change your path name appropriately


Comments

Popular posts from this blog

Calculating Age of the person in T-SQL

Removing and Manipulating Time portion from DateTime in SQLServer

Sharepoint Integrated Mode License