SQL Query error

Posted on 2010-01-08
Last Modified: 2012-05-08
I have the following script in a batch file.  I am trying to run a query.  The problem is that I get an error that says SQL Network Interfaces: The target principal name is incorrect.  Sqlcmd: Error: Microsoft SQL Native Client: Cannot generate SSPI context

sqlcmd -S . -i "C:\Terminated Transfer.sql"
Question by:al4629740
    LVL 41

    Accepted Solution

    LVL 9

    Assisted Solution

    Can you restart the both client and server and reset the dns settings. and then execute the query.
    LVL 7

    Assisted Solution

    osql -S (local)\SQLEXPRESS -d master -E -i CreateMasterDatabase.sql

    Author Closing Comment

    Could not find answer, but thanks for the extra insight

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now