SQL Server - Remote Command Line Management

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JDB

    SQL Server - Remote Command Line Management

    As a Sys Admin, I was wondering - if I have admin rights to a Win2k machine
    that is hosting SQL Server 2000, do I have the ability using any
    command-line tools such as OSQL or ISQL to add, delete, or change accounts
    registered in SQL Server for the various databases if I don't have access to
    a specific account within SQL Server?

    I ask, because the question that came up was - what if we have a DBA leave
    under less than amicable circumstances? Could I, someone who has admin
    rights on the machine, be able to log into that machine remotely and somehow
    via command line (I don't maintain active SQL clients centrally), change the
    SA password, remove an account, and/or add an account with sysadmin rights,
    etc?

    Thanks in advance for any help -







  • Erland Sommarskog

    #2
    Re: SQL Server - Remote Command Line Management

    JDB (jbell@vitria.c om) writes:[color=blue]
    > As a Sys Admin, I was wondering - if I have admin rights to a Win2k
    > machine that is hosting SQL Server 2000, do I have the ability using any
    > command-line tools such as OSQL or ISQL to add, delete, or change
    > accounts registered in SQL Server for the various databases if I don't
    > have access to a specific account within SQL Server?
    >
    > I ask, because the question that came up was - what if we have a DBA
    > leave under less than amicable circumstances? Could I, someone who has
    > admin rights on the machine, be able to log into that machine remotely
    > and somehow via command line (I don't maintain active SQL clients
    > centrally), change the SA password, remove an account, and/or add an
    > account with sysadmin rights, etc?[/color]

    If you have administrator rights on the machine SQL Server is running on,
    the you can log in through integrated security, and in the default
    configuration, you would have sysadmin access through the role
    BUILTIN\Adminis trators. However, I think this can be revoked.

    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server SP3 at
    SQL Server 2025 redefines what's possible for enterprise data. With developer-first features and integration with analytics and AI models, SQL Server 2025 accelerates AI innovation using the data you already have.

    Comment

    • ScottT

      #3
      Re: SQL Server - Remote Command Line Management

      Thanks for the response.

      Can this be done via command line? Or a thin SQL Server client such as
      SQLExpress?

      Thanks ...


      "Erland Sommarskog" <esquel@sommars kog.se> wrote in message
      news:Xns950F5D3 05BD8Yazorman@1 27.0.0.1...[color=blue]
      > JDB (jbell@vitria.c om) writes:[color=green]
      > > As a Sys Admin, I was wondering - if I have admin rights to a Win2k
      > > machine that is hosting SQL Server 2000, do I have the ability using any
      > > command-line tools such as OSQL or ISQL to add, delete, or change
      > > accounts registered in SQL Server for the various databases if I don't
      > > have access to a specific account within SQL Server?
      > >
      > > I ask, because the question that came up was - what if we have a DBA
      > > leave under less than amicable circumstances? Could I, someone who has
      > > admin rights on the machine, be able to log into that machine remotely
      > > and somehow via command line (I don't maintain active SQL clients
      > > centrally), change the SA password, remove an account, and/or add an
      > > account with sysadmin rights, etc?[/color]
      >
      > If you have administrator rights on the machine SQL Server is running on,
      > the you can log in through integrated security, and in the default
      > configuration, you would have sysadmin access through the role
      > BUILTIN\Adminis trators. However, I think this can be revoked.
      >
      > --
      > Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se
      >
      > Books Online for SQL Server SP3 at
      > http://www.microsoft.com/sql/techinf...2000/books.asp[/color]


      Comment

      • Erland Sommarskog

        #4
        Re: SQL Server - Remote Command Line Management

        ScottT (rdb@drewscott. com) writes:[color=blue]
        > Can this be done via command line? Or a thin SQL Server client such as
        > SQLExpress?[/color]

        Yes, you can use Integrated Security with any tool that supports it.
        (And most tools should to that, since Integrated Security is always
        available, whereas SQL authentication is not.)

        So OSQL should do. SQLExpress is nothing I know about.

        --
        Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

        Books Online for SQL Server SP3 at
        SQL Server 2025 redefines what's possible for enterprise data. With developer-first features and integration with analytics and AI models, SQL Server 2025 accelerates AI innovation using the data you already have.

        Comment

        Working...