<< < 9 10 11 12 13 14 15 16 17 18 19 > >>   ∑:509  Sort:Rank

"CREATE USER" Statements - Creating a User in SQL Server
How to create a user to access a database using "CREATE USER" statements in SQL Server? This is the second tutorial of a quick lesson on creating login and configure users for databases with Transact-SQL statements. Granting a user access to a database involves three steps. First, you create a login...
2016-11-27, 1644🔥, 0💬

"CREATE VIEW/PROCEDURE" Statements - Creating a View and a Stored Procedure in SQL Server
How to create a view and a stored procedure using "CREATE VIEW/PROCEDURE" statements in SQL Server? This is the third tutorial of a quick lesson on creating login and configure users for databases with Transact-SQL statements. Granting a user access to a database involves three steps. First, you cre...
2016-11-27, 1634🔥, 0💬

"USE" - Setting the Current Database in SQL Server
How to set the current database in SQL Server? Once you are connected to the SQL Server, you should select a database to work with and set it as the current database using the "USE" statement with this syntax: USE database_name The following tutorial example shows you how to set "FyiCenterData" as t...
2016-11-24, 3319🔥, 0💬

Location of Database Files in SQL Server
Where is my database stored on the hard disk in SQL Server? If a database is created with simple CREATE DATABASE statement, the server will create two database files on the hard disk to store data and configuration information about that data bases: database_name.mdf - SQL Server Database Primary Da...
2016-11-24, 1639🔥, 0💬

Creating Databases with Specified Physical Files in SQL Server
How to create database with physical files specified in SQL Server? If you don't like the default behavior of the CREATE DATABASE statement, you can specify the physical database files with a longer statement: CREATE DATABASE database_name ON (NAME = logical_data_name, FILENAME = physical_data_name,...
2016-11-24, 1613🔥, 0💬

Database in Use When Dropping a Database in SQL Server
Why I am getting this error when dropping a database in SQL Server? If you are trying to drop a database that is in use, you will get an error message like this: 'Cannot drop database "FyiCenterData" because it is currently in use.' Before dropping a database, you must stop all client sessions using...
2016-11-24, 1612🔥, 0💬

What Is a Database in SQL Server
What is a database in SQL Server? A database is a logical container that contains a set of related database objects: Tables - Storages of structured data. Views - Queries to present data from tables. Indexes - Sorting indexes to speed up searches. Stored Procedures - Predefined SQL program units. Us...
2016-11-24, 1590🔥, 0💬

Managing Databases and Physical Files in SQL Server
Where to find answers to frequently asked questions on Managing Databases and Physical Files in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing Databases and Physical Files in SQL Server. Clear answers are provided with tutori...
2016-11-24, 1575🔥, 0💬

Renaming Database Names in SQL Server
How to rename databases in SQL Server? If don't like the name of a database, you can change it by using the "ALTER DATABASE" statement with the following syntax: ALTER DATABASE database_name MODIFY NAME = new_database_name The tutorial example below shows you how change the database name from "FyiCe...
2016-11-24, 1553🔥, 0💬

"DROP DATABASE" - Deleting Databases in SQL Server
How to delete a database in SQL Server? If you created a database incorrectly, or you have a database that is not needed any more, you can delete it with the "DROP DATABASE" statement with this syntax: DROP DATABASE database_name For example, execute this statement: DROP DATABASE FyiCenterData GO Th...
2016-11-24, 1518🔥, 0💬

Getting a List of All Databases on the Server in SQL Server
How to get a list all databases on the SQL server in SQL Server? If you don't remember database names you have created, you can get a list of all databases on the server by query the "sys.databases" view as shown in this tutorial example: CREATE DATABASE FyiCenterData GO SELECT name, database_id, cr...
2016-11-24, 1468🔥, 0💬

Simplest Way To Create New Databases in SQL Server
What is the simplest way to create a new database in SQL Server? The simplest way to create a new database is to use the "CREATE DATABASE" statement with this syntax: CREATE DATABASE database_name For example, run this statement: CREATE DATABASE FyiCenterData GO A new database called "FyiCenterData"...
2016-11-24, 1401🔥, 0💬

READ_ONLY/READ_WRITE - Database Update Options in SQL Server
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: READ_WRITE - Data objects are allowed to be queried and modified. This is the default. READ_ONLY - Data objects are allowed to be queried, but not allowed to be modified. You can use the "ALTER DATABA...
2016-11-20, 3612🔥, 0💬

DDL (Data Definition Language) Statements for Tables? in SQL Server
What are DDL (Data Definition Language) statements for tables in SQL Server? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are three primary DDL statements to create and manage tables: CREATE TABLE - Creating a new table. ALTER TABLE ...
2016-11-20, 3610🔥, 0💬

OFFLINE - Taking a database offline in SQL Server
How to set a database state to OFFLINE in SQL Server? If you want to move database physical files, you should take the database offline by using the "ALTER DATABASE" statement with the following syntax: ALTER DATABASE database_name SET OFFLINE The following tutorial example will bring "FyiCenterComD...
2016-11-20, 2596🔥, 0💬

Database in Use When Renaming a Database in SQL Server
Why I am getting this error when renaming a database in SQL Server? If you are trying to rename a database that is in use, you will get an error message like this: "The database could not be exclusively locked to perform the operation." Before renaming a database, you must stop all client sessions u...
2016-11-20, 1823🔥, 0💬

ONLINE/OFFLINE - Database States in SQL Server
What are database states in SQL Server? A database is always in one specific state. For example, these states include ONLINE, OFFLINE, or SUSPECT. To verify the current state of a database, select the state_desc column in the sys.databases catalog view. The following table defines the database state...
2016-11-20, 1788🔥, 0💬

Managing Tables and Columns in SQL Server
Where to find answers to frequently asked questions on Managing Tables and Columns in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing Tables and Columns in SQL Server. Clear answers are provided with tutorial exercises on crea...
2016-11-20, 1739🔥, 0💬

Moving Database Physical Files to New Locations in SQL Server
How to move database physical files in SQL Server? If you want to move database physical files to a new location, you can use the "ALTER DATABASE" statements to bring the database offline, and link it to the files at the new location. The following tutorial gives you a good example: ALTER DATABASE F...
2016-11-20, 1637🔥, 0💬

What Is a Table in SQL Server
What is a table in SQL Server? A table in database is a data object used to store data. Tables have the following features: Data is stored in a table with a structure of rows and columns. Columns must be pre-defined with names, types and constrains. A table object may have other associated data obje...
2016-11-20, 1611🔥, 0💬

System Databases Used by SQL Servers in SQL Server
What are system databases in SQL Server? System databases are created by the SQL Server itself during the installation process. System databases are used by the SQL server to help manage other user databases and client execution sessions. SQL Server 2005 Express Edition uses 4 system databases: mast...
2016-11-20, 1564🔥, 0💬

SINGLE_USER/MULTI_USER - Database User Access Options in SQL Server
How to set database to be SINGLE_USER in SQL Server? Databases in SQL Server have three user access options: MULTI_USER - All users that have the appropriate permissions to connect to the database are allowed. This is the default. SINGLE_USER - One user at a time is allowed to connect to the databas...
2016-11-20, 1469🔥, 0💬

Generating CREATE TABLE Script on Existing Tables in SQL Server
How To Generate CREATE TABLE Script on an Existing Table in SQL Server? If you want to know how an existing table was created, you can use SQL Server Management Studio to automatically generate a "CREATE TABLE" script The following tutorial shows you how to do this: 1. Run SQL Server Management Stud...
2016-11-17, 3359🔥, 0💬

CREATE TABLE - Creating New Tables in SQL Server
How to create new tables with "CREATE TABLE" statements in SQL Server? If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip": CREATE TABLE tip (id INTEGER PRIMARY KEY, subject VARCHAR(80) NOT NULL, desc...
2016-11-17, 2746🔥, 0💬

<< < 9 10 11 12 13 14 15 16 17 18 19 > >>   ∑:509  Sort:Rank