none
Database Name with dot/period "." RRS feed

  • Question

  • I've got an SQL 2000 database that the administrator rather foolishly created with a dot in the name ("secure.IB"). This DB is used by a numer of legacy apps, so it cannot be changed or moved or upgraded at this time.

    I am now working in Visual Studio 2010 and though there was no problem connecting to this database in VS 2008, now I cannot connect to it in 2010. The problem is the dot in the name. When I add the DB to the server explorer, it works (using OLEDB only of course, since MS decided we don't need to be able to connect to SQL server 200 databases anymore, the bastards)- clicking test connection in the dialog works, and the db is even added into the server explorer. But if I try to expand any of the folders, like "Tables" I get an error "Could not find server "Secure" in sysservers." So it is clearly thinking the name of the DB is Secure, and not "secure.IB".

    I have tried enclosing the initialcatalog name in double quotes, single quotes, brackets, curly braces, nothing works.

    So what do I do? Seems like there is nothing else I can try to get it to work.

    Thanks in advance,
    Josh

    • Moved by Victor_Chen Monday, November 22, 2010 6:03 AM database name issue (From:Visual Studio Editor)
    Friday, November 19, 2010 7:59 PM

Answers

  • Refer to the database as [secure.IB]

    select * from secure.IB.sys.objects
    --Could not find server 'secure'
    -- in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

    select * from [secure.IB].sys.objects --this works OK

     


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, November 22, 2010 6:08 AM
    Moderator

All replies

  • Hi Josh,

     

    Thanks for your post.

    I think this issue is more relevant to SQL, I'm going to move it.

    Hope you can get more useful information there.

    Best Regards,

    Ziwei Chen

     

     

    Monday, November 22, 2010 6:01 AM
  • Refer to the database as [secure.IB]

    select * from secure.IB.sys.objects
    --Could not find server 'secure'
    -- in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

    select * from [secure.IB].sys.objects --this works OK

     


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, November 22, 2010 6:08 AM
    Moderator