osql and unusual database names | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

osql and unusual database names

This is probably a simple question but I have not been able to track down the solution. I have a database with the following name – STS_a0001-app01-s_01 I cannot reference this database with osql. I have tried the following and none seems to work: use "STS_a0001-app01-s_01"
use ‘STS_a0001-app01-s_01’
use `STS_a0001-app01-s_01`
use STS_a0001-app01-s_01 It does not seem to like the – portion of the database name. Can someone help with how I can reference this goofy database name within osql. I know the best solution is not to use goofy name like this but sometimes they are inherited or created by default during some installation processes. Thank You,
Have you tried square brackets, [dbname]? Tom Pullen
DBA, Oxfam GB
Tom, the square brakets work. Thanks for the information. Jethro