Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with database named database.mdf
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Installation
Environment versions
Application:
Web
Miscellaneous
Thread ID:
01484696
Message ID:
01484710
Views:
47
>It's a bad idea to use reserved words as object names in SQL Server. You'll have to enclose them in delimiters [] every time you use them.
>
>>(Actually the version is server 2008 r2 express)
>>
>>I am working with Dotnetnuke (DNN) 505. On a brand new install my database file ended up being named database.mdf)
>>(by default I think?). I did the install on my local win 7 machine. I also installed sql management studio. (However the management studio won't start - but, I think, that is a separate issue).
>>
>>I got the install up and running and the DNN website going - but I never bothered to check out the details of the database because my management studio wasn't working. Then I used management studio on another machine to find the sql server database - but I couldn't find it. But I know that (well... pretty sure) that there is a database called database.mdf up and running on the machine.
>>Logged in as administrator on the account and as sa. If I try to do an "attach database of database.mdf" it says that it is in use by another process. My web.config file is pasted below.
>>
>>If I attempt the command "use database", I get "syntax error near the keyword database". Is it a problem that the database name is a keyword?
>>

I'm unable to access the original message, so the answer is to David - take a look at this blog post:
Don't use Invalid characters (and reserved words) in your database object names
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform