Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7943205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:12:04+00:00 2026-06-04T00:12:04+00:00

I am using SQLserver 2008 R2 edition. I am trying to create a database

  • 0

I am using SQLserver 2008 R2 edition. I am trying to create a database using SQL CMD.

When I try to run the following command

Sqlcmd -S 10.2.202.213 -U sa -P 123@123 -Q "create database 125Build5"

I get the following error:

Msg 102, Level 15, State 1, Server WS-INBLR567, Line 1 Incorrect
syntax near ‘125’.

If I use the database name that does not start with a number, something like ‘Build5125’, then it works.
However I can create the database from SSMS without any problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:12:06+00:00Added an answer on June 4, 2026 at 12:12 am

    I’d really encourage you to re-think creating a database that starts with a number, as it’s going to make cross-database selects miserable by always requiring a qualifier.

    However, that said, just wrap the name of the database in brackets, like [123Whatever]. The brackets tell SQL to take the name as literal, so you can break whatever standard normal naming rules you want, including spaces or other special characters. The reason SSMS lets you start with a number is because the SQL statement it executes behind the scenes uses these brackets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using SQL Server 2008 developer edition. I was trying to attach the
I've just installed SQL Server 2008 Developer edition and I'm trying to connect using
I am using SQL Server 2008, developer edition. I connect to my database from
I am using SQL Server 2008 Web Edition and it seems my SQL queries
I am using SQL Server 2008 management studio to execute the following SQL statements,
I am trying to create an SQL Server Compact edition in SQL Server Management
i am trying to compare two databases on my SQL Server 2008 using the
I am using SQL Server 2008 express edition but I want to make my
I install SQL server 2008 developer edition and I connect to it using Windows
We are currently using SQL Server 2008 Express Edition, but would like to upgrade

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.