From SQL Server 2005, Adventureworks was blinq'ed perfectly. But then I went to blinq TWO (Dynamics Great Plains sample database) and it failed with the code -532459699. Don't know if it's due to the large number of tables?
When SQLMetal fails, the error message Blinq displays should give you the command line to run SQLMetal with the same options Blinq used. Try running SQLMetal directly with those options- it will give you a more precise error.
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
From SqlMetal exited with code -532459699. The command it executed was C:\Program Files\LINQ Preview\bin\sqlmetal.exe /pluralize /dataAttributes /code:"C:\Documents and Settings\david\Local Settings\Temp\TWO.vb" /language:vb /sprocs /server:LATITUDE810-1\SQL2K5
/user:sa /password:secret /database:"TWO".
This is the error I got :
Unhandled Exception: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is notresponding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData,
Boolean moreInfo)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
Behavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, S
tring method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at SqlMetal.Extractor.GetSprocAndFunctionDefinitions()
at SqlMetal.Extractor.ExtractDatabase(String database)
at SqlMetal.SqlMetalMain.Main(String[] args)
If it means anything, here is some additional info...I killed the /sprocs flag from that sqlmetal command and it returned me to the C:\ prompt with no errors. I see that I have a TWO.vb file in my Temp directory. So is there something I can do with
that?
And before you say, "run blinq without the /sprocs flag"..i'll tell you why i can't. sqlmetal and sqlserver run in the task manager for a few seconds while they think of stuff to do and then the application hangs on vbc.exe at 100% and will sit there
for (well i didn't let it go longer than 30 minutes). When I stopped the process I got the Error 1 that a few other people got.
The timeout error you're seeing is a connection error from SQL. You said that SqlMetal runs successfully if you leave off the /sproc flag- if you run SqlMetal without the /sproc flag and successfully connect, then run it again with the /sproc flag, what
happens?
The compiler issue sounds like a separate issue to me. Are you able to run the compiler against that source file on the command line successfully?
One other thing to try- if you try using C# instead of VB, does your TWO.cs file compile correctly?
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
no, the issue isn't timeout on this machine. that error message is masking the real problem. something else is locking up the process. again, adventureworks worked without issue.
ok when i run sqlmetal with the /sproc this time at least i got a verbose error message. and by verbose i mean the equivalent of shakespeare's collected works...unabridged. I went for coffee, grabbed a bagel, went to the gym..hey, it's still running!
not even sure why i need /sprocs or not...but at least I see where some problems exist. it apparently get nauseaus with sp's that have references to # or ## tables or tables not yet created in tempdb (assumption that the sp will do that). Then a boatload
of "schema errors".
But I am not sure that this is possible. This is a vanilla install of Dynamics Great Plains sample database TWO that works on my laptop. I think if schema problems existed on this scale the application (Great Plains) wouldn't work. But anyway, this doesn't
matter because it proceeds past those errors and the parasite eats up all my ram until there is none left.
Incidentally these apps consume 100% resources when running. Hmm. now that i think of it, since sqlmetal consumes 90%-100% resources, that might be why i was previously getting the timeout. sqlserver never got a crack at the cpu because of that hog.
So here is the troubleshooting breakdown so far:
1) blinq on adventureworks - works like a charm
2) blinq on TWO with /sproc flag - hangs on task manager process vbc.exe . Fails after 30 minutes after it chews up all my memory.
3) blinq on TWO without /sproc flag - runs for only about 2 minutes and then i get the SQLMetal exited with code -532459699 error
4) sqlmetal on TWO with /sproc flag - tons 'o errors I mentioned above. Then it finally fails with an out of memory exception (it had consumed 1.8G of my RAM) just step 2
5) sqlmetal on TWO without /sproc flag - runs for about a minute, and drops the TWO.vb file in the temp directory
6) And I tried blinqing with C# (even though C# is Chinese to me..Mandarin to be exact) and that didn't work either. Same errors. I think since i got a .vb file from step 5 thats good, huh?
So...is the TWO.vb file something I can plug into another app to continue the process? Or can you get your hands on a Great Plains TWO database? I can send you the schema if you need but i figure it's closer to you being MS and all. Also, TWO has a LARGE
number of tables. Is there a limitation due to number of tables?
ok, more info on point #6. Mandarin Chinese gets us a little closer.
Specifically, i blinqed WITHOUT /sprocs but WITH C#. This completed with a "WebApp created message"
Unfortunately the website does not run.
I get the following when trying the default.aspx page:
Thread was being aborted.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Threading.ThreadAbortException: Thread was being aborted.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I was able to repro this issue with VB and C#. Thanks- we'll investigate this immediately.
It looks to me that this is an issue with the number of tables in the database. Several hundreds of tables may be just too many for SqlMetal and Blinq to handle, but we'll look into it to see if there's any workaround. I'm curious- do you have a real database
that's got this many tables in it?
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
Yes. All MS Dynamics Great Plains db's have that many tables.
I work for an ISV/VAR in the MBS space so I have been testing a number of the Dynamics products. Most of the MBS line has a large number of SQL Server tables.
Here is what I have so far:
GP - You know about Solomon (Dynamics SL) - Sample database Contoso that ships with it, on SQL 2005. The Web App was successfully created, but there are performance issues at runtime.
When you click a table to view records, the status bar on the bottom of the browser flips to completion and says "Done" but does not yet display the data. I don't know if this is an ajax thing, but then (if you are impatient) you'll click the table again to
give it another shot. Anyway if you give your mouse a rest, after about a minute the records actually do display. But it seems the length of time taken is not a result of the number of returned records. I clicked a table "Snotes" that had only 2 records and
it took approx 45 seconds. I compare this performace to Adventureworks on the same machine and ALL tables take about 1-2 seconds to retrieve; and some have over 10 pages of data.
Some tables with NO data in the Contoso sample for this sample also take 45 seconds. And all the while not only is there no indication in the brower that wheels are turning (status, or mouse turning to hourglass), but the aspnet_wp.exe process is hogging 100%
resources.
It seems like the table issue isn't just at the code creation stage, but also at runtime?
Axapta (Dynamics AX) - I have a sample database running on the same machine in SQL Server 2k5 Express. Blinq failed with the -532459699 error when trying to create this one, just like GP's TWO.
I ran Blinq with /sprocs against one of our production databases as a test and received the same SqlMetal -532459699 error concerning a timeout. I then ran the "Linq" statement for Linq directly and again received a timeout error in greater detail as described
in another post. Since there was speculation as to whether or not this was truly a timeout error, I ran SQL Profiler on the server and tried the "Linq" statement again. It ran multiple statements to get table information and then ran a select statement to
get the constraints of the tables. This is the statement that timed out. I copied the select statement that was timing out in Linq and ran it in Query Analyzer and it ran without error, taking a little over a minute to complete. I then ran the Linq statement
again, this time setting the /timeout parameter to 500 seconds. This time the Linq statement ran in completion. I received some errors from sprocs that referenced temp tables and I also received errors for objects that no longer matched such as sprocs with
field names that had been changed, etc. At the end the Linq run, there were messages listing all the sprocs that were not stubbed due to the temp tables or missing objects.
My problem now is that I do not see a way to set a timeout in the Blinq command to be passed to the Linq command. So, is there a way to run Blinq, allowing it to use what Linq created on it's own? Thanks for any help.
DSLMaxQ
Member
50 Points
10 Posts
SqlMetal exited with code -532459699
Jul 10, 2006 08:09 PM|LINK
I'm batting .500 on two sample databases.
From SQL Server 2005, Adventureworks was blinq'ed perfectly. But then I went to blinq TWO (Dynamics Great Plains sample database) and it failed with the code -532459699. Don't know if it's due to the large number of tables?
Any thoughts?
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: SqlMetal exited with code -532459699
Jul 11, 2006 12:44 AM|LINK
This posting is provided "AS IS" with no warranties, and confers no rights.
DSLMaxQ
Member
50 Points
10 Posts
Re: SqlMetal exited with code -532459699
Jul 11, 2006 01:58 PM|LINK
From SqlMetal exited with code -532459699. The command it executed was C:\Program Files\LINQ Preview\bin\sqlmetal.exe /pluralize /dataAttributes /code:"C:\Documents and Settings\david\Local Settings\Temp\TWO.vb" /language:vb /sprocs /server:LATITUDE810-1\SQL2K5 /user:sa /password:secret /database:"TWO".
This is the error I got :
Unhandled Exception: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is notresponding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData,
Boolean moreInfo)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, Run
Behavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBe
havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, S
tring method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at SqlMetal.Extractor.GetSprocAndFunctionDefinitions()
at SqlMetal.Extractor.ExtractDatabase(String database)
at SqlMetal.SqlMetalMain.Main(String[] args)
If it means anything, here is some additional info...I killed the /sprocs flag from that sqlmetal command and it returned me to the C:\ prompt with no errors. I see that I have a TWO.vb file in my Temp directory. So is there something I can do with that?
And before you say, "run blinq without the /sprocs flag"..i'll tell you why i can't. sqlmetal and sqlserver run in the task manager for a few seconds while they think of stuff to do and then the application hangs on vbc.exe at 100% and will sit there for (well i didn't let it go longer than 30 minutes). When I stopped the process I got the Error 1 that a few other people got.
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: SqlMetal exited with code -532459699
Jul 11, 2006 06:18 PM|LINK
The timeout error you're seeing is a connection error from SQL. You said that SqlMetal runs successfully if you leave off the /sproc flag- if you run SqlMetal without the /sproc flag and successfully connect, then run it again with the /sproc flag, what happens?
The compiler issue sounds like a separate issue to me. Are you able to run the compiler against that source file on the command line successfully?
One other thing to try- if you try using C# instead of VB, does your TWO.cs file compile correctly?
This posting is provided "AS IS" with no warranties, and confers no rights.
DSLMaxQ
Member
50 Points
10 Posts
Re: SqlMetal exited with code -532459699
Jul 11, 2006 08:22 PM|LINK
no, the issue isn't timeout on this machine. that error message is masking the real problem. something else is locking up the process. again, adventureworks worked without issue.
ok when i run sqlmetal with the /sproc this time at least i got a verbose error message. and by verbose i mean the equivalent of shakespeare's collected works...unabridged. I went for coffee, grabbed a bagel, went to the gym..hey, it's still running!
not even sure why i need /sprocs or not...but at least I see where some problems exist. it apparently get nauseaus with sp's that have references to # or ## tables or tables not yet created in tempdb (assumption that the sp will do that). Then a boatload of "schema errors".
But I am not sure that this is possible. This is a vanilla install of Dynamics Great Plains sample database TWO that works on my laptop. I think if schema problems existed on this scale the application (Great Plains) wouldn't work. But anyway, this doesn't matter because it proceeds past those errors and the parasite eats up all my ram until there is none left.
Incidentally these apps consume 100% resources when running. Hmm. now that i think of it, since sqlmetal consumes 90%-100% resources, that might be why i was previously getting the timeout. sqlserver never got a crack at the cpu because of that hog.
So here is the troubleshooting breakdown so far:
1) blinq on adventureworks - works like a charm
2) blinq on TWO with /sproc flag - hangs on task manager process vbc.exe . Fails after 30 minutes after it chews up all my memory.
3) blinq on TWO without /sproc flag - runs for only about 2 minutes and then i get the SQLMetal exited with code -532459699 error
4) sqlmetal on TWO with /sproc flag - tons 'o errors I mentioned above. Then it finally fails with an out of memory exception (it had consumed 1.8G of my RAM) just step 2
5) sqlmetal on TWO without /sproc flag - runs for about a minute, and drops the TWO.vb file in the temp directory
6) And I tried blinqing with C# (even though C# is Chinese to me..Mandarin to be exact) and that didn't work either. Same errors. I think since i got a .vb file from step 5 thats good, huh?
So...is the TWO.vb file something I can plug into another app to continue the process? Or can you get your hands on a Great Plains TWO database? I can send you the schema if you need but i figure it's closer to you being MS and all. Also, TWO has a LARGE number of tables. Is there a limitation due to number of tables?
Thanks for your help.
DSLMaxQ
Member
50 Points
10 Posts
Re: SqlMetal exited with code -532459699
Jul 11, 2006 08:30 PM|LINK
ok, more info on point #6. Mandarin Chinese gets us a little closer.
Specifically, i blinqed WITHOUT /sprocs but WITH C#. This completed with a "WebApp created message"
Unfortunately the website does not run.
I get the following when trying the default.aspx page:
Thread was being aborted.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Threading.ThreadAbortException: Thread was being aborted.
Source Error:
Stack Trace:
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: SqlMetal exited with code -532459699
Jul 12, 2006 12:38 AM|LINK
I was able to repro this issue with VB and C#. Thanks- we'll investigate this immediately.
It looks to me that this is an issue with the number of tables in the database. Several hundreds of tables may be just too many for SqlMetal and Blinq to handle, but we'll look into it to see if there's any workaround. I'm curious- do you have a real database that's got this many tables in it?
This posting is provided "AS IS" with no warranties, and confers no rights.
DSLMaxQ
Member
50 Points
10 Posts
Re: SqlMetal exited with code -532459699
Jul 12, 2006 02:12 PM|LINK
Yes. All MS Dynamics Great Plains db's have that many tables.
I work for an ISV/VAR in the MBS space so I have been testing a number of the Dynamics products. Most of the MBS line has a large number of SQL Server tables.
Here is what I have so far:
GP - You know about
Solomon (Dynamics SL) - Sample database Contoso that ships with it, on SQL 2005. The Web App was successfully created, but there are performance issues at runtime.
When you click a table to view records, the status bar on the bottom of the browser flips to completion and says "Done" but does not yet display the data. I don't know if this is an ajax thing, but then (if you are impatient) you'll click the table again to give it another shot. Anyway if you give your mouse a rest, after about a minute the records actually do display. But it seems the length of time taken is not a result of the number of returned records. I clicked a table "Snotes" that had only 2 records and it took approx 45 seconds. I compare this performace to Adventureworks on the same machine and ALL tables take about 1-2 seconds to retrieve; and some have over 10 pages of data.
Some tables with NO data in the Contoso sample for this sample also take 45 seconds. And all the while not only is there no indication in the brower that wheels are turning (status, or mouse turning to hourglass), but the aspnet_wp.exe process is hogging 100% resources.
It seems like the table issue isn't just at the code creation stage, but also at runtime?
Axapta (Dynamics AX) - I have a sample database running on the same machine in SQL Server 2k5 Express. Blinq failed with the -532459699 error when trying to create this one, just like GP's TWO.
DSLMaxQ
Member
50 Points
10 Posts
Re: SqlMetal exited with code -532459699
Aug 02, 2006 03:05 PM|LINK
HashKeyLime
Member
10 Points
2 Posts
Re: SqlMetal exited with code -532459699
Aug 03, 2006 05:08 PM|LINK
I ran Blinq with /sprocs against one of our production databases as a test and received the same SqlMetal -532459699 error concerning a timeout. I then ran the "Linq" statement for Linq directly and again received a timeout error in greater detail as described in another post. Since there was speculation as to whether or not this was truly a timeout error, I ran SQL Profiler on the server and tried the "Linq" statement again. It ran multiple statements to get table information and then ran a select statement to get the constraints of the tables. This is the statement that timed out. I copied the select statement that was timing out in Linq and ran it in Query Analyzer and it ran without error, taking a little over a minute to complete. I then ran the Linq statement again, this time setting the /timeout parameter to 500 seconds. This time the Linq statement ran in completion. I received some errors from sprocs that referenced temp tables and I also received errors for objects that no longer matched such as sprocs with field names that had been changed, etc. At the end the Linq run, there were messages listing all the sprocs that were not stubbed due to the temp tables or missing objects.
My problem now is that I do not see a way to set a timeout in the Blinq command to be passed to the Linq command. So, is there a way to run Blinq, allowing it to use what Linq created on it's own? Thanks for any help.