SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘database name’

FIX: Configuration Fails Pasting Distributor Database Name with a Leading Space

Symptoms
In the Configure Publishing and Distribution Wizard, if you select the option to customize the settings rather than accept the default values, you are given the opportunity to change the distribution database name from its default of “distribution.” Although you cannot type a space character in the Distribution Database Name box, it does accept a space character if you copy a text string (for example, “my database”) to the clipboard and paste it in.
If the name you use contains a space character, the database is still created. However, if the name that you paste in begins with a space character (for example, ” my database”), the wizard fails with the following error message:

SQL Server Enterprise Manager could not configure ’server_name’ as the distributor for ’server_name’.
Error 14262: The specified @database_name (‘db_name’) does not exist.
Resolution
To work around this problem:do not use spaces in the name
-or-
make sure that the database name you are pasting in does not contain a leading space character.

BUG: Recovery of database logical file names might fail after a RESTORE operation

Symptoms
When you restore a database, recovery of logical file names of the database can fail, and the logical file names that correspond to the database in the master..sysaltfiles and the <Database_name>..sysfiles tables may differ.
Resolution
When you perform a backup and restore operation with a database that is in full recovery mode, this problem occurs if you modify the logical file names in the database after you back up the database but before you back up the transaction log.

BUG: DOC Error: Documentation Incorrectly States that DB_Owner role has Restore Database Permissions

Symptoms
SQL Server 7.0 Books Online states that a member of the db_owner role has RESTORE DATABASE permission. However, when a member of the db_owner fixed database role tries to restore a database, the following error message occurs:

Server: Msg 3110, Level 14, State 1, Line 1
Only members of the sysadmin role or the database owner of ‘Database_Name’ can run RESTORE DATABASE.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.
Resolution
Members of the db_owner fixed database role do not have RESTORE permissions. This behavior is by design. Fixed database role membership can only be checked when the database is accessible and undamaged. Because this is not always the case when the RESTORE statement is executed, members of the db_owner fixed database role do not have RESTORE permissions.