HELP! SQL is freaking out.

  • Hoping someone has run into something like this before. The server running our SQL 7 is also our primary domain controller. Our sysadmin has been doing some stuff over the last few days that has been wreaking havoc on SQL. Yesterday, SQL Server Agent woudln't even start. That's fixed now, but one of my important SP's isn't working. I've narrowed it down to this line:

    execute master..xp_cmdshell 'bcp "select * from intranet..btprintqueue" queryout d:\sqlbackup\printfile.dd -T -c -t,'

    which causes this error:

    output

    ------------------------------------------------------------------------------

    SQLState = 08001, NativeError = 17

    Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.

    SQLState = 01000, NativeError = 2

    Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).

    Does anyone have ANY idea what could be causing this? I'm not completely sure what my admin has changed in the environment, so it would be helpful to at least have a direction. I look forward to any thoughts anyone might have...

    Thanks!

  • Might be helpful to narrow it down further:

    can you get any cmdshells to work?

    does the select work ok on its own in QA?

    can you run the bcp command (with servername) from a commandline?

    Paul Ibison

    Paul.Ibison@btinternet.com


    Paul Ibison
    Paul.Ibison@replicationanswers.com

  • Has the name of the server changed? Or perhaps the changes have caused connectivity issues.

    Steve Jones

    steve@dkranch.net

  • The most important question: What all has the sysadmin done over the last few days (I'm assuming he's kept a change log)?

    K. Brian Kelley

    bk@warpdrivedesign.org

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • A change log? Hahahaha... That's a good one.

    Well, I figured it out. I had to add the -S flag and specify the server. Don't ask me why... it worked 3 days ago and we only have one server, but that's what the fix was.

    Thanks for your help!

  • Thanks for the followup. Was this an instance? Is this a startup parameter? Where was -s used?

    Steve Jones

    steve@dkranch.net

  • I used the -S flag for the BCP command to specify the servername. Once again, we only have one server and it worked just days ago, but that does appear to be my answer.

  • Thanks.

    Steve Jones

    steve@dkranch.net

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply