Red Gate forums :: View topic - Error from command line
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 6
SQL Packager 6 forum

Error from command line

Search in SQL Packager 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
ca8msm



Joined: 08 Oct 2008
Posts: 3

PostPosted: Wed Oct 08, 2008 3:05 pm    Post subject: Error from command line Reply with quote

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
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Fri Oct 10, 2008 11:15 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ca8msm



Joined: 08 Oct 2008
Posts: 3

PostPosted: Fri Oct 10, 2008 11:22 am    Post subject: Reply with quote

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
View user's profile Send private message
ca8msm



Joined: 08 Oct 2008
Posts: 3

PostPosted: Fri Oct 10, 2008 2:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
thop



Joined: 10 Oct 2008
Posts: 1
Location: Michigan, USA

PostPosted: Fri Oct 10, 2008 7:24 pm    Post subject: Data is null. This method or property cannot be called on Nu Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group