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. using the osql command

using the osql command

Scheduled Pinned Locked Moved Database
tutorialdatabasesql-serversysadminquestion
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.
  • D Offline
    D Offline
    dundealing
    wrote on last edited by
    #1

    I have a book which shows an example of using the osql command but when I try it, I get a message that the SQL Server does not exist or access is denied. The command I am entering is: osql -E Can anyone tell me how to grant access or find another way around this?

    R 1 Reply Last reply
    0
    • D dundealing

      I have a book which shows an example of using the osql command but when I try it, I get a message that the SQL Server does not exist or access is denied. The command I am entering is: osql -E Can anyone tell me how to grant access or find another way around this?

      R Offline
      R Offline
      Rob Graham
      wrote on last edited by
      #2

      Is your server set up for windows authentication or sql server authentication? If the latter, -E will fail. This will also fail if the server is not running... Absolute faith corrupts as absolutely as absolute power Eric Hoffer All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke

      A 1 Reply Last reply
      0
      • R Rob Graham

        Is your server set up for windows authentication or sql server authentication? If the latter, -E will fail. This will also fail if the server is not running... Absolute faith corrupts as absolutely as absolute power Eric Hoffer All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke

        A Offline
        A Offline
        Arjan Einbu
        wrote on last edited by
        #3

        The options are either both windows auth AND sql server auth at the same time, or only windows auth. So osql -E should be available always. If it doesnt work, it might be that you're logged on to Windows using an account that has not been granted access to MS SQL Server.

        D 1 Reply Last reply
        0
        • A Arjan Einbu

          The options are either both windows auth AND sql server auth at the same time, or only windows auth. So osql -E should be available always. If it doesnt work, it might be that you're logged on to Windows using an account that has not been granted access to MS SQL Server.

          D Offline
          D Offline
          dundealing
          wrote on last edited by
          #4

          When I installed the MSDE version of SQL Server, I did so with Windows authorisation. If I need to grant my account access to the SQL Server, could you tell me how to do this? When my computer starts, the Server is showing as running, and so I don't think this is the problem.

          A 1 Reply Last reply
          0
          • D dundealing

            When I installed the MSDE version of SQL Server, I did so with Windows authorisation. If I need to grant my account access to the SQL Server, could you tell me how to do this? When my computer starts, the Server is showing as running, and so I don't think this is the problem.

            A Offline
            A Offline
            Arjan Einbu
            wrote on last edited by
            #5

            In Enterprise Manager: Expand the server your trying to access, then expand the Security node and click on the Logins node under Security. Here you can create a new login with Windows Authentication. -a

            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