24
Network Data Storage

Network data storage

  • Upload
    hadi-f

  • View
    47

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Network data storage

Network Data Storage

Page 2: Network data storage

Highlights

Data Storage using SQL Server

Network Attached Storage (NAS)

Storing SQL Server Files on a NAS

Page 3: Network data storage

Data Storage with SQL Server

Page 4: Network data storage

Data Storage with SQL Server

SQL Server maps a database over a set of operating-system files

Data and log information are never mixed in the same file, and individual files are used only by one database.

Filegroups are a named collections of files and are used to help with data placement and administrative tasks such as backup and restore operations.

Data storage with SQL Server

Page 5: Network data storage

Database Files

Primary data files

Secondary data files

Log files

Data storage with SQL Server

Page 6: Network data storage

Database Files

Primary data files:

The primary data file is the starting point of the database

and points to the other files in the database.

Every database has one primary data file.

The recommended file name extension for primary data

files is .mdf

Data storage with SQL Server

Page 7: Network data storage

Database Files

Secondary data files:Secondary data files make up all the data files, other than

the primary data file. Some databases may not have any secondary data files,

while others have several secondary data files. The recommended file name extension for secondary data

files is .ndf

Data storage with SQL Server

Page 8: Network data storage

Database Files

Log files:Log files hold all the log information that is used to recover

the database. There must be at least one log file for each database,

although there can be more than one. The recommended file name extension for log files is .ldf

Data storage with SQL Server

Page 9: Network data storage

Database Files

SQL Server does not enforce the .mdf, .ndf, and .ldf file name extensions, but these extensions help you identify the different kinds of files and their use.

SQL Server database files can be stored locally or on a network storage such as “Stored Area Network” (SAN) or “Network attached storage” (NAS).

Data storage with SQL Server

Page 10: Network data storage

Network Attached Storage

(NAS)

Page 11: Network data storage

Network Attached Storage

A network-attached storage (NAS) device is a server that is dedicated to nothing more than file sharing.

NAS does not provide any of the activities that a server in a server-centric system typically provides, such as e-mail, authentication or file management.

NAS allows more hard disk storage space to be added to a network that already utilizes servers without shutting them down for maintenance and upgrades.

Network Attached Storage (NAS)

Page 12: Network data storage

Network Attached StorageWith a NAS device, storage is not an integral part of the

server. Instead, in this storage-centric design, the server still

handles all of the processing of data but a NAS device delivers the data to the user.

A NAS device does not need to be located within the server but can exist anywhere in a LAN and can be made up of multiple networked NAS devices.

Network Attached Storage (NAS)

Page 13: Network data storage

Network Attached StorageNAS systems usually contain one or more hard disks,

often arranged into logical, redundant storage containers or RAID arrays.

The protocol used with NAS is a file based protocol such as NFS, Samba or Microsoft's Common Internet File System (CIFS).

In reality, there is a miniature operating system on the device such as Celerra on EMC's devices or NetOS on NetApp NAS devices.

Network Attached Storage (NAS)

Page 14: Network data storage

Network Attached StorageNAS devices become logical file system storage for a local

area network. The performance of NAS devices depends heavily on:

cached memory (the equivalent of RAM) network interface overhead (the speed of the router and

network cards.

Network Attached Storage (NAS)

Page 15: Network data storage

Benefit & disadvantage

The benefit is that the device can become a giant neighborhood hard drive for a whole building.

The disadvantage is that any constrictions in the local network will slow down the resulting access time.

Network Attached Storage (NAS)

Page 16: Network data storage

Network Attached Storage

NAS allows multiple server access through a file-based protocol. This allows administrators to implement simple and low cost load-balancing and fault-tolerant systems.

Network Attached Storage (NAS)

Page 17: Network data storage

Storing SQL Server Files

on NAS

Page 18: Network data storage

Using SQL server 2005,2008

Storing SQL server files on NAS

By default, use of network database files (stored on a networked server or Network Attached Storage “NAS”) is not enabled for SQL Server.

You can configure SQL Server to store a database on a networked server or NAS storage server.

Page 19: Network data storage

Using SQL server 2005,2008

Storing SQL server files on NAS

Step 1. Enable the Trace Flag 1807: (Bypasses the check and allows you to configure SQL Server with network-based database files)

DBCC TRACEON(1807, -1)

Page 20: Network data storage

Using SQL server 2005,2008

Storing SQL server files on NAS

Step 2. Identify a file share, where SQL Server Service start-up account has FULL access

Step 3. Create the databaseCREATE DATABASE [networked] ON PRIMARY

( NAME = N'networked', FILENAME = N'\\varund-win7\ATOMNETWORKDB\networked.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'networked_log', FILENAME = N'\\varund-win7\ATOMNETWORKDB\networked_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) GO

Page 21: Network data storage

Using SQL server 2005,2008

Storing SQL server files on NAS

You can map a network drive using SQL Server by following this steps:

Disable trace 1807DBCC TRACEON(1807, -1)

Allow advanced options to be changed.EXEC sp_configure 'show advanced options', 1GO

Update the currently configured value for advanced options.RECONFIGUREGO

Page 22: Network data storage

Using SQL server 2005,2008

Storing SQL server files on NAS

Enable the feature xp_cmdshellEXEC sp_configure 'xp_cmdshell', 1GO

Update the currently configured value for this feature.RECONFIGUREGO

Delete Old mappingEXEC xp_cmdshell 'net use J: /delete'GO

MAP network DriveEXEC xp_cmdshell 'net use J: \\xpwindows7\C admin

/User:xpwindows7\pc'

Page 23: Network data storage

Using SQL server 2008 R2

Storing SQL server files on NAS

You are allowed to create database on network file share (UNC path), without the need to Trace 1807.

Page 24: Network data storage

The End