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. sp_databases dosn't return any value in Sql server 2008 express.

sp_databases dosn't return any value in Sql server 2008 express.

Scheduled Pinned Locked Moved Database
helpsharepointdatabasesql-serversysadmin
9 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.
  • P Offline
    P Offline
    prasadbuddhika
    wrote on last edited by
    #1

    i'm trying to execute the "sp_databases" proc in sql sever 2008 express as "sa" but it doesn't return any value even though there are two customer created DBs available. what must be the problem.. any idea about this issue. thanx in advance.

    S 1 Reply Last reply
    0
    • P prasadbuddhika

      i'm trying to execute the "sp_databases" proc in sql sever 2008 express as "sa" but it doesn't return any value even though there are two customer created DBs available. what must be the problem.. any idea about this issue. thanx in advance.

      S Offline
      S Offline
      Simon_Whale
      wrote on last edited by
      #2

      what happens if you execute

      select * from sys.databases

      As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

      P 1 Reply Last reply
      0
      • S Simon_Whale

        what happens if you execute

        select * from sys.databases

        As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

        P Offline
        P Offline
        prasadbuddhika
        wrote on last edited by
        #3

        hmm i get all the DBs in the server . at the same time a found some articles saying that there is a permission problem i used

        USE master;
        GRANT EXECUTE ON OBJECT::dbo.sp_databases
        TO public;
        GO

        but still get the "Cannot find the object 'sp_databases', because it does not exist or you do not have permission." message. and also in the same machine i have another standard instance is installed and running, but there i get the list of DBs with this sp_databases. have any idea... thanx in advance..

        S C 2 Replies Last reply
        0
        • P prasadbuddhika

          hmm i get all the DBs in the server . at the same time a found some articles saying that there is a permission problem i used

          USE master;
          GRANT EXECUTE ON OBJECT::dbo.sp_databases
          TO public;
          GO

          but still get the "Cannot find the object 'sp_databases', because it does not exist or you do not have permission." message. and also in the same machine i have another standard instance is installed and running, but there i get the list of DBs with this sp_databases. have any idea... thanx in advance..

          S Offline
          S Offline
          Simon_Whale
          wrote on last edited by
          #4

          try

          exec master..sp_database

          As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

          P 1 Reply Last reply
          0
          • S Simon_Whale

            try

            exec master..sp_database

            As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

            P Offline
            P Offline
            prasadbuddhika
            wrote on last edited by
            #5

            exec master..sp_databases executes but it shows nothing

            1 Reply Last reply
            0
            • P prasadbuddhika

              hmm i get all the DBs in the server . at the same time a found some articles saying that there is a permission problem i used

              USE master;
              GRANT EXECUTE ON OBJECT::dbo.sp_databases
              TO public;
              GO

              but still get the "Cannot find the object 'sp_databases', because it does not exist or you do not have permission." message. and also in the same machine i have another standard instance is installed and running, but there i get the list of DBs with this sp_databases. have any idea... thanx in advance..

              C Offline
              C Offline
              Corporal Agarn
              wrote on last edited by
              #6

              prasadbuddhika wrote:

              dbo.sp_databases

              Could this need changed to sys.sp_databases? I have 2008R2 and the sp is sys not dbo.

              S 1 Reply Last reply
              0
              • C Corporal Agarn

                prasadbuddhika wrote:

                dbo.sp_databases

                Could this need changed to sys.sp_databases? I have 2008R2 and the sp is sys not dbo.

                S Offline
                S Offline
                Simon_Whale
                wrote on last edited by
                #7

                sys.database is a system table introduced with SQL 2005 and used in sql 2008 where sp_database is an actual stored procedure that has been present since sql server 2000 I believe

                As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

                C 1 Reply Last reply
                0
                • S Simon_Whale

                  sys.database is a system table introduced with SQL 2005 and used in sql 2008 where sp_database is an actual stored procedure that has been present since sql server 2000 I believe

                  As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

                  C Offline
                  C Offline
                  Corporal Agarn
                  wrote on last edited by
                  #8

                  I guess I will wake up sooner or later. :zzz: The sp is sys.sp_databases

                  S 1 Reply Last reply
                  0
                  • C Corporal Agarn

                    I guess I will wake up sooner or later. :zzz: The sp is sys.sp_databases

                    S Offline
                    S Offline
                    Simon_Whale
                    wrote on last edited by
                    #9

                    oh that something new learnt today it also works executing it on sys.sp_databases too :-D

                    As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.

                    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