Skip to content

Commit d29a42a

Browse files
committed
Refreshing more articles
1 parent d1383cf commit d29a42a

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

docs/relational-databases/databases/rename-a-database.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Rename a Database"
33
description: "Rename a Database"
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
6-
ms.date: "04/06/2022"
6+
ms.date: "08/22/2023"
77
ms.service: sql
88
ms.topic: conceptual
99
helpviewer_keywords:
@@ -14,22 +14,21 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
1414
# Rename a Database
1515

1616
[!INCLUDE [SQL Server Azure SQL Database](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
17-
This article describes how to rename a user-defined database in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] or Azure SQL Database by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. The name of the database can include any characters that follow the rules for identifiers.
17+
This article describes how to rename a user-defined database in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], Azure SQL Database, or Azure SQL Managed Instance by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] (SSMS) or [!INCLUDE[tsql](../../includes/tsql-md.md)] (T-SQL). The name of the database can include any characters that follow the rules for identifiers.
1818

1919
> [!NOTE]
2020
> To rename a database in Azure Synapse Analytics or Parallel Data Warehouse, use the [RENAME (Transact-SQL)](../../t-sql/statements/rename-transact-sql.md) statement.
2121
2222
## Limitations and restrictions
2323

24-
- System databases cannot be renamed.
25-
- The database name cannot be changed while other users are accessing the database.
24+
- System databases can't be renamed.
25+
- The database name can't be changed while other users are accessing the database.
2626
- Use SQL Server Management Studio Activity Monitor to find other connections to the database, and close them. For more information, see [Open Activity Monitor in SQL Server Management Studio (SSMS)](../performance-monitor/open-activity-monitor-sql-server-management-studio.md).
2727
- In SQL Server, you can set a database in single user mode to close any open connections. For more information, see [set the database to single-user mode](../../relational-databases/databases/set-a-database-to-single-user-mode.md).
2828
- In Azure SQL Database, you must make sure no other users have an open connection to the database to be renamed.
29-
- Renaming a database does not change the physical name of the database files on disk, or the logical names of the files. For more information, see [Database Files and Filegroups](database-files-and-filegroups.md#logical-and-physical-file-names).
29+
- Renaming a database doesn't change the physical name of the database files on disk, or the logical names of the files. For more information, see [Database Files and Filegroups](database-files-and-filegroups.md#logical-and-physical-file-names).
3030
- It's not possible to rename an Azure SQL database configured in an [active geo-replication](/azure/azure-sql/database/active-geo-replication-overview) relationship.
3131

32-
3332
## Permissions
3433

3534
Requires ALTER permission on the database.
@@ -42,7 +41,7 @@ Use the following steps to rename a SQL Server or Azure SQL database using SQL S
4241

4342
2. In **Object Explorer**, connect to an instance of SQL Server, and then expand that instance.
4443

45-
3. Make sure that there are no open connections to the database. If you are using SQL Server, you can [set the database to single-user mode](../../relational-databases/databases/set-a-database-to-single-user-mode.md) to close any open connections and prevent other users from connecting while you are changing the database name.
44+
3. Make sure that there are no open connections to the database. If you're using SQL Server, you can [set the database to single-user mode](../../relational-databases/databases/set-a-database-to-single-user-mode.md) to close any open connections and prevent other users from connecting while you're changing the database name.
4645

4746
4. In Object Explorer, expand **Databases**, right-click the database to rename, and then select **Rename**.
4847

@@ -93,7 +92,7 @@ Use the following steps to rename an Azure SQL database using T-SQL in SQL Serve
9392

9493
## Backup after renaming a database
9594

96-
After renaming a database in SQL Server, back up the `master` database. In Azure SQL Database, this is not needed as backups occur automatically.
95+
After renaming a database in SQL Server, back up the `master` database. In Azure SQL Database, this isn't needed as backups occur automatically.
9796

9897
## Reset your default database after rename
9998

docs/relational-databases/tables/specify-computed-columns-in-a-table.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Specify Computed Columns in a Table"
33
description: "Specify Computed Columns in a Table"
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
6-
ms.date: "10/21/2021"
6+
ms.date: "08/22/2023"
77
ms.service: sql
88
ms.subservice: table-view-index
99
ms.topic: conceptual
@@ -15,13 +15,13 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
1515

1616
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
1717

18-
A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)].
18+
A computed column is a virtual column that isn't physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] (SSMS) or [!INCLUDE[tsql](../../includes/tsql-md.md)] (T-SQL).
1919

2020
## <a name="Limitations"></a> Limitations and Restrictions
2121

22-
- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations.
23-
- A computed column cannot be the target of an INSERT or UPDATE statement.
24-
- `SET QUOTED_IDENTIFIER` must be ON when you are creating or changing indexes on computed columns or indexed views. For more information, see [SET QUOTED_IDENTIFIER (Transact-SQL)](../../t-sql/statements/set-quoted-identifier-transact-sql.md).
22+
- A computed column can't be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) can't be indexed, because the value might change in subsequent invocations.
23+
- A computed column can't be the target of an INSERT or UPDATE statement.
24+
- `SET QUOTED_IDENTIFIER` must be ON when you're creating or changing indexes on computed columns or indexed views. For more information, see [SET QUOTED_IDENTIFIER (Transact-SQL)](../../t-sql/statements/set-quoted-identifier-transact-sql.md).
2525

2626
## <a name="Security"></a><a name="Permissions"></a> Permissions
2727

@@ -37,7 +37,7 @@ Requires ALTER permission on the table.
3737
4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table.
3838

3939
> [!IMPORTANT]
40-
> When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type **nvarchar** is combined with a column of type **int**, the integer type must be converted to **nvarchar** as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT &#40;Transact-SQL&#41;](../../t-sql/functions/cast-and-convert-transact-sql.md).
40+
> When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error `Error validating the formula for column column_name.` is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type **nvarchar** is combined with a column of type **int**, the integer type must be converted to **nvarchar** as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT &#40;Transact-SQL&#41;](../../t-sql/functions/cast-and-convert-transact-sql.md).
4141
4242
5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property.
4343

0 commit comments

Comments
 (0)