EXEC sp_configure 'show advanced options',1;
RECONFIGURE;
EXEC sp_configure;

/*
EXEC sp_dboption 'Northwind';

USE AdventureWorks
DBCC CHECKDB; 

BACKUP DATABASE [AdventureWorks] 
TO DISK = N'E:\AdvWorks.bak' WITH NAME = N'AdventureWorks-Full', CHECKSUM;

RESTORE VERIFYONLY 
FROM DISK = N'E:\AdvWorks.bak';

ALTER DATABASE AdventureWorks
SET READ_ONLY
WITH ROLLBACK IMMEDIATE;

USE master
BACKUP DATABASE AdventureWorks
TO DISK ='E:\aw.bak'
WITH INIT;

USE master
RESTORE DATABASE AdventureWorks
FROM DISK = 'E:\aw.bak'
WITH MOVE 'AdventureWorks_Data' 
TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AW.mdf',
MOVE 'AdventureWorks_Log' TO 'E:\AW.ldf';

ALTER DATABASE AdventureWorks
SET READ_WRITE;

USE master
EXEC master.dbo.sp_detach_db @dbname = N'Northwind', @keepfulltextindexfile=N'true';

C:\COPY "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\NORTHWND.*" e:\

USE master
CREATE DATABASE [Northwind] ON 
( FILENAME = N'E:\northwnd.mdf' ),
( FILENAME = N'E:\northwnd.ldf' )
 FOR ATTACH;

DBCC CHECKDB ('AdventureWorks') 
WITH DATA_PURITY;

USE AdventureWorks
EXEC sp_change_users_login 'Report';


EXEC sp_change_users_login 'Auto_Fix', 'Test', NULL, 'Pa$$w0rd';

EXEC dbo.sp_dbcmptlevel 'AdventureWorks', 100;

EXEC sp_updatestats;

ALTER FULLTEXT INDEX 
ON HumanResources.JobCandidate
START FULL POPULATION;

USE master
ALTER DATABASE tempdb
MODIFY FILE ( NAME = N'tempdev', SIZE = 512MB );
GO
ALTER DATABASE tempdb
MODIFY FILE ( NAME = N'templog', SIZE = 128MB );
GO
ALTER DATABASE tempdb 
ADD FILE ( NAME = N'tempdev1', FILENAME = N'k:\tempdev1.ndf' , SIZE = 512MB , FILEGROWTH = 64MB );

USE master 
EXEC sp_configure 'clr enabled',1;
RECONFIGURE;

ALTER DATABASE Northwind 
SET PAGE_VERIFY CHECKSUM;

*/

EXEC sys.sp_configure'filestream access level','2'; 
RECONFIGURE
