Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2002
    Posts
    6

    Unanswered: Enterprise Manager problem with views

    We have a user who is a db_owner on a database that he can't create a view using Enterprise Manager. When he tries to create a view it returns: "ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '240'." His NT Domain username is 240DBH.

    We've tried it on my computer with him logging on and get the same result. He can create views just fine using query analyzer. Does anybody know what's wrong with doing this in Enterprise Manager? By the way, I can create views in the db using Enterprise Manager just fine.

    Thanks for your help!

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Turn Profiler on and see what commands Enterprise is sending to the server to create this view. It may shed some light.
    MCDBA

  3. #3
    Join Date
    Apr 2002
    Posts
    6
    Thanks for the suggestion! I hadn't used the profiler before. It is trying to execute the following:

    CREATE VIEW 240dbh.VIEW1
    AS
    SELECT ID, [Start Date]
    FROM T_DATA

    Now, when I run this in query analyzer, I get the same error. It seems like that should work to me.

  4. #4
    Join Date
    Apr 2002
    Posts
    6
    Now I think I have it narrowed down. His username starts with numbers. If you can't have a username that starts with numbers, that is pretty lame.

    Does anyone know if there is a better front-end than enterprise manager for creating tables/views/stored procedures?

    Thanks!

  5. #5
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    User names with numbers are not a problem. Does the user have ddladmin rights?

    If you are using SS2K than use the Query Analyzer! Much better for users than the EM!
    Paul Young
    (Knowledge is power! Get some!)

  6. #6
    Join Date
    Apr 2002
    Posts
    6
    I set up a user under sql server 7 with a username that has no numbers with the exact same permissions as that user who can't create a view.

    That new user with no numbers can create views just fine.

    So, the only difference between the two users is that one is a sql server logon and one uses NT domain authentication, and the fact that one has numbers in the username.

    What I'm finding is that if enterprise manager would do something like:
    CREATE VIEW [240dbh].VIEW1

    instead of:
    CREATE VIEW 240dbh.VIEW1

    it would work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •