TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P78

Microsoft SQL Server 2008 R2 Unleashed- P78:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 714 CHAPTER 23 Creating and Managing Databases NAME N mydb_index1 FILENAME N I mssql2008 data SIZE 2048KB FILEGROWTH 1024KB FILEGROUP UserData_FG NAME N mydb_userdata1 FILENAME N D mssql2008 data SIZE 2048KB FILEGROWTH 1024KB NAME N mydb_userdata2 FILENAME N E mssql2008 data SIZE 2048KB FILEGROWTH 1024KB NAME N mydb_userdata3 FILENAME N F mssql2008 data SIZE 2048KB FILEGROWTH 1024KB LOG ON NAME N mydb_log FILENAME N L mssql2008 log SIZE 1024KB FILEGROWTH 10 This example creates a database named mydb that has three filegroups. The first filegroup PRIMARY contains the .mdf file. Index_FG contains one file I mssql2008 data mydb_ . The third filegroup UserData_FG contains three data files located on the D E and F drives. This example demonstrates the relationship between databases file-groups and the underlying operating system files. The T-SQL for creating a database is discussed in detail later in this chapter. After you create a database with multiple filegroups you can then create a database object on a specific filegroup. In the preceding example you could use the filegroup named UserData_FG to hold user-defined tables and you could use the filegroup named Index_FG for the database indexes. You assign database objects at the time you create the object. The following example demonstrates the creation of a user-defined table on the UserData_FG filegroup and the creation of an index for that table on the Index_FG filegroup CREATE TABLE TableId int NULL TableDesc varchar 50 NULL ON UserData_FG CREATE CLUSTERED INDEX CI_Table1_TableID ON dbo . Table1 TableId ASC ON Index_FG Any objects not explicitly created on a filegroup are created on the default filegroup. The PRIMARY filegroup is the default filegroup when a database is created. You can change the default filegroup if necessary. If you want to change the default group to another group you can use the ALTER .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.