schemazen icon indicating copy to clipboard operation
schemazen copied to clipboard

Changing in permissions causing "Unable to cast object of type 'System.DBNull' to type 'System.String'." error

Open elijj opened this issue 4 years ago • 2 comments

Hi,

I had been succesfully running schemazen routinely like this:

SchemaZen.exe script --server serverName --database dbName --scriptDir "c:\Users\.." -o

with no issues and finally today i am catching

"Unable to cast object of type 'System.DBNull' to type 'System.String'." error

any ideas what is going on? I am thinking possibly my permissions changed on the server. If so what permissions are required to run? Please let me know if I can provide any more helpful information.

elijj avatar May 22 '20 16:05 elijj

if you're able to run a sql trace you could maybe see which query is returning null and causing this problem, or if the stack trace shows any details like filename, line number etc. we could guess what sql object you need view permission on.

keith-hall avatar May 23 '20 05:05 keith-hall

Hello. I have the exact same problem... any news on this?

PedroMiguelFigueiredo avatar Apr 16 '22 10:04 PedroMiguelFigueiredo