How to attach AdventureWorksLT physical files to the server?
Submitted by: AdministratorAfter installed the sample database AdventureWorksLT, you need to attach it to your SQL server to make it available by follow this tutorial:
EXEC sp_attach_db @dbname=N'AdventureWorksLT',
@filename1=N'C:Program FilesMicrosoft SQL Server'
+'MSSQL.1MSSQLDataAdventureWorks_Data.mdf',
@filename2=N'C:Program FilesMicrosoft SQL Server'
+'MSSQL.1MSSQLDataAdventureWorks_Log.ldf'
GO
USE AdventureWorksLT
GO
SELECT TOP 10 CustomerID, FirstName, LastName, Phone
FROM SalesLT.Customer
GO
<pre>CustomerID FirstName LastName Phone
1 Orlando Gee 245-555-0173
2 Keith Harris 170-555-0127
3 Donna Carreras 279-555-0130
4 Janet Gates 710-555-0173
5 Lucy Harrington 828-555-0186
6 Rosmarie Carroll 244-555-0112
7 Dominic Gash 192-555-0173
10 Kathleen Garza 150-555-0127
11 Katherine Harding 926-555-0159
12 Johnny Caprio 112-555-0191</pre>
Looks like the sample database AdventureWorksLT is ready for you play.
Submitted by: Administrator
EXEC sp_attach_db @dbname=N'AdventureWorksLT',
@filename1=N'C:Program FilesMicrosoft SQL Server'
+'MSSQL.1MSSQLDataAdventureWorks_Data.mdf',
@filename2=N'C:Program FilesMicrosoft SQL Server'
+'MSSQL.1MSSQLDataAdventureWorks_Log.ldf'
GO
USE AdventureWorksLT
GO
SELECT TOP 10 CustomerID, FirstName, LastName, Phone
FROM SalesLT.Customer
GO
<pre>CustomerID FirstName LastName Phone
1 Orlando Gee 245-555-0173
2 Keith Harris 170-555-0127
3 Donna Carreras 279-555-0130
4 Janet Gates 710-555-0173
5 Lucy Harrington 828-555-0186
6 Rosmarie Carroll 244-555-0112
7 Dominic Gash 192-555-0173
10 Kathleen Garza 150-555-0127
11 Katherine Harding 926-555-0159
12 Johnny Caprio 112-555-0191</pre>
Looks like the sample database AdventureWorksLT is ready for you play.
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | PHP MSSQL - How To Display a Past Time in Days, Hours and Minutes? |
☺ | How To Use Subqueries with the IN Operators in MS SQL Server? |
☺ | How To Create a Testing Table with Test Data in MS SQL Server? |
☺ | How To Configure and Test ODBC DSN Settings? |
☺ | How To Create a Large Table with Random Data for Index Testing in MS SQL Server? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |