Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Invalid Object Name : 'sysdatabases'

Invalid Object Name : 'sysdatabases'

Scheduled Pinned Locked Moved Database
databasehelpsql-serversysadmin
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VikashGohil
    wrote on last edited by
    #1

    Hello, This is Vikash. I have an application where on starting the application it connects to SQL Server 2000. At this point of connection I also execute the query 'Select Name From Sysdatabases' to get a list of database names. The problem is at my PC using My SQL Server 2000, the Query is getting executed properly giving me a list of databases. But when I install the software on one of the clients PC where my database is attached to their existing MSSQL Server 2000, it display the error message, "Invalid Object Name 'sysdatabases'". Can somebody tell me why this is happening. Has somebody faced similar problems. Please any help would be highly appreciated. Thanks in Advance.

    M R 2 Replies Last reply
    0
    • V VikashGohil

      Hello, This is Vikash. I have an application where on starting the application it connects to SQL Server 2000. At this point of connection I also execute the query 'Select Name From Sysdatabases' to get a list of database names. The problem is at my PC using My SQL Server 2000, the Query is getting executed properly giving me a list of databases. But when I install the software on one of the clients PC where my database is attached to their existing MSSQL Server 2000, it display the error message, "Invalid Object Name 'sysdatabases'". Can somebody tell me why this is happening. Has somebody faced similar problems. Please any help would be highly appreciated. Thanks in Advance.

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Check the permissions of your connection credentials. Typically a developer assigns himself god rights to their database and lose sight of the fact that a DBA will never do that on a production server.

      Never underestimate the power of human stupidity RAH

      V 1 Reply Last reply
      0
      • M Mycroft Holmes

        Check the permissions of your connection credentials. Typically a developer assigns himself god rights to their database and lose sight of the fact that a DBA will never do that on a production server.

        Never underestimate the power of human stupidity RAH

        V Offline
        V Offline
        VikashGohil
        wrote on last edited by
        #3

        Thanks for the reply Mycroft. but can you tell me what credentials you are talking about. My Connection string is : Server=<Servername>;Database=<DBname>;Uid=<UserID>;Pwd=<Password>; what else do I need to provide. Is It That Sysdatabases will work only if I have access rights to all the databases in the instance. bcoz, my client also has several other databases in this instance which I am connecting and I might not have rights to those databases. Awaiting your reply.

        M 1 Reply Last reply
        0
        • V VikashGohil

          Thanks for the reply Mycroft. but can you tell me what credentials you are talking about. My Connection string is : Server=<Servername>;Database=<DBname>;Uid=<UserID>;Pwd=<Password>; what else do I need to provide. Is It That Sysdatabases will work only if I have access rights to all the databases in the instance. bcoz, my client also has several other databases in this instance which I am connecting and I might not have rights to those databases. Awaiting your reply.

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          sysdatabases lives in the master database, your credentials may not have rights to that database. You probably need to arrange r/o access for those credentials to the master database or event the sysdatabase table if that is the only table you need.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • V VikashGohil

            Hello, This is Vikash. I have an application where on starting the application it connects to SQL Server 2000. At this point of connection I also execute the query 'Select Name From Sysdatabases' to get a list of database names. The problem is at my PC using My SQL Server 2000, the Query is getting executed properly giving me a list of databases. But when I install the software on one of the clients PC where my database is attached to their existing MSSQL Server 2000, it display the error message, "Invalid Object Name 'sysdatabases'". Can somebody tell me why this is happening. Has somebody faced similar problems. Please any help would be highly appreciated. Thanks in Advance.

            R Offline
            R Offline
            Rob Philpott
            wrote on last edited by
            #5

            Have you tried prepending 'sys.' to it. eg. select * from sys.sysdatabases?

            Regards, Rob Philpott.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups