| Author |
Message |
ca8msm
Joined: 08 Oct 2008 Posts: 3
|
Posted: Wed Oct 08, 2008 3:05 pm Post subject: Error from command line |
|
|
Hi,
When I execute a package I have created via the command line, it throws an error. However, if I use the GUI to execute the package then it runs successfully.
The command I am using to execute the package is in the format:
MyPackage.exe /server:MyServer /database:MyDatabase /username:MyUserName /password:MyPassword
and the error message it generates is:
Data is null. This method or property cannot be called on Null values.
The event log shows this additional information:
| Code: |
Event Type: Error
Event Source: DBVersion_1_0
Event Category: None
Event ID: 0
Date: 08/10/2008
Time: 14:51:22
User: N/A
Computer: DS1000-2
Description:
Data is Null. This method or property cannot be called on Null values.
Server stack trace:
at System.Data.SqlClient.SqlBuffer.get_String()
at System.Data.SqlClient.SqlDataReader.GetString(Int32 i)
at Package.DBVersion_1_0.EnvironmentFolders.GetMasterDatabaseFolder(SqlCommand sqlCommand)
at Package.DBVersion_1_0.EnvironmentFolders.Init(SqlCommand sqlCommand)
at Package.DBVersion_1_0.PackageExecutor.ConnectToDatabase()
at Package.DBVersion_1_0.PackageExecutor.Execute()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at Package.DBVersion_1_0.ProgressDialog.Run(IProgressExecutor executor)
at Package.DBVersion_1_0.PackageApplication.ExecutePackageWithUI()
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. |
Does anyone have any ideas on what the problem may be and/or how I can resolve this as ideally I need to execute this procedure via the command line?
Thanks,
Mark |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Fri Oct 10, 2008 11:15 am Post subject: |
|
|
Thanks for your post.
I have been unable to reproduce this problem with any of my databases. Do you get the same problem if you generate the package again?
Would you be able to send me the problematic package so I can test it here?
If you can, please send it to support@red-gate.com.
If it is too large to send by email, can you send me an email and I will set you up an area on our ftp site. _________________ Chris |
|
| Back to top |
|
 |
ca8msm
Joined: 08 Oct 2008 Posts: 3
|
Posted: Fri Oct 10, 2008 11:22 am Post subject: |
|
|
Thanks Chris,
I've tried repackaging and still get the same error. I've sent an email to your support address so hopefully that will come through soon.
Thanks for looking into this,
Mark |
|
| Back to top |
|
 |
ca8msm
Joined: 08 Oct 2008 Posts: 3
|
Posted: Fri Oct 10, 2008 2:42 pm Post subject: |
|
|
Just to update the thread in case anyone else gets this issue, it looks as though it was a either a permissions error or a collation issue that was causing the problem.
I ran a presql script to change the collation of the database and ran the package under the "sa" account and the package installed successfully. |
|
| Back to top |
|
 |
thop
Joined: 10 Oct 2008 Posts: 1 Location: Michigan, USA
|
Posted: Fri Oct 10, 2008 7:24 pm Post subject: Data is null. This method or property cannot be called on Nu |
|
|
I had the same problem and found that the username that I was using did not having create database permissions.
Once I granted the Server Role of dbCreator it worked fine. |
|
| Back to top |
|
 |
|