Command Line Error: Object Reference Not Set

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Command Line Error: Object Reference Not Set

Postby hagenl » Tue Oct 01, 2013 1:30 am

I'm running SQL Compare from the Command Line to create a script for deploying objects into a (currently empty) database. The database uses SQL Authentication & the script is being saved to a network drive.

When I run the script, I receive the following error:
Code: Select all
17:18:15.677|Fatal  |Command Line        |1  |Object reference not set to an instance of an object.
RedGate.Shared.Utils.CommandLine.FatalExecutionException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at #8rg.#PC0c.#oxVb(Database #xXrc, Database #RHc)
   at #Y5rb.#Z5rb.#um()
   at #Y5rb.#15rb.#xOh(#XrPb #tIc, #en #5OPb, Boolean #hkl)
   at #Y5rb.#15rb.#HOh(#XrPb #tIc, Difference #6Urc, #en #5OPb, Boolean #hkl)
   at RedGate.SQLCompare.Common.CompareEngineExecutor.#Y9G()
   at RedGate.SQLCompare.CommandLine.CommandLineCompareEngineExecutor.#Y9G()
   at #dRb.#8Rb.#kco()
   at #dRb.#eRb.#Pao()
   --- End of inner exception stack trace ---
   at #namb.#tamb.#q1r(ExitCodes #M6rc, Exception #9Z)
   at RedGate.SQLToolsCommandLine.CommandProcessor.#Acmb(Exception #9Z)
   at RedGate.SQLToolsCommandLine.CommandProcessor.#Acmb()
   at RedGate.SQLToolsCommandLine.CommandProcessor.#ZjD()
   at RedGate.SQLToolsCommandLine.CommandProcessor.#kcmb()
   at RedGate.SQLCompare.CommandLine.CommandProcessor.#kcmb()
   at RedGate.SQLToolsCommandLine.CommandProcessor.#OUb()


Using Verbose logging, this happens after the object differences are printed out + 2 Synchronization warnings are shown re: my user account.

Could someone point me in the direction of what might be causing this error to appear?
hagenl
 
Posts: 6
Joined: Tue Sep 24, 2013 7:04 pm
Location: United States

Postby hagenl » Tue Oct 01, 2013 2:01 am

My mistake: the variable passed into the database name was null.

Would be nice if that error message were slightly more helpful, but problem resolved.
hagenl
 
Posts: 6
Joined: Tue Sep 24, 2013 7:04 pm
Location: United States


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest