Create and Manage Databases in SQL Server 2019 | SQL Server | SkillPedia

preview_player
Показать описание
Databases
A database in SQL Server is made up of a collection of tables that stores a specific set of structured data.
A table contains a collection of rows, also referred to as records or tuples, and columns, also referred to as attributes.
Each column in the table is designed to store a certain type of information, for example, dates, names, dollar amounts, and numbers.
Basic Information about Databases
A computer can have one or more than one instance of SQL Server installed.
Each instance of SQL Server can contain one or many databases.
Within a database, there are one or many object ownership groups called schemas.
Within each schema there are database objects such as tables, views, and stored procedures.
Some objects such as certificates and asymmetric keys are contained within the database, but are not contained within a schema.
SQL Server databases are stored in the file system in files.
Create Database
In SQL Server, it creates a new database and the files used and their filegroups.
It can also be used to create a database snapshot, or attach database files to create a database from the detached files of another database.
View database information Permissions
You can use catalog views, system functions, and system stored procedures to return information about databases, files, and filegroups.
Requires CREATE DATABASE, CREATE ANY DATABASE, or ALTER ANY DATABASE permission.
E.g. to provide the permission to create a database to the user Sangwan.
Move User Databases
You can move the data, log, and full-text catalog files of a user database to a new location by specifying the new file location in the FILENAME clause of the ALTER DATABASE statement.
This method applies to moving database files within the same instance SQL Server.
Relocation for Scheduled Disk Maintenance
1. For each file to be moved, run the following statement.
ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name , FILENAME = 'new_path\os_file_name' );
2. Stop the instance of SQL Server or shut down the system to perform maintenance.
3. Move the file or files to the new location.
4. Restart the instance of SQL Server or the server.
5. Verify the file change by running the following query.
SQL Server 2019, SQL Server 2019 Databases, SQL Server 2019 Basic Information, SQL Server 2019 Create Database, Attach/Detach a database SQL Server 2019, SQL Server 2019 Create a database snapshot,
SQL Server 2019 Important Options, SQL Server View database information Permissions, SQL Server 2019 Move User Databases,
SQL Server 2019 Planned Relocation Procedure, SQL Server Relocation for Scheduled Disk Maintenance, SQL Server 2019 Failure Recovery Procedure, SQL Server 2019 tempdb database, SQL Server 2019 Optimizing Tempdb Performance,

Рекомендации по теме
Комментарии
Автор

Hello, very informative video. looking forward to learn more from you.
As a newbie to the SQL language, i am wondering if there are any limitations or drawbacks if i start as a beginner to work
with Microsoft SQL Server 2008 Express. (old version)
The reason that i am bounded with my pc hardware specification and windows 7 installed, but I am still eager to learn this language no matter what the boundaries are.

hasanmougharbel
welcome to shbcf.ru