May 21, 2009 at 3:50 am
Hi,
I am getting an error msg while executing a script file like " script executed with errors" but not showing any errors in the results pane.
This file includes insert scripts for at least 40 tables. the file size is 15mb. Its is not showing any errors in the reulsts pane but it is giving message like "script executed with errors" but not executing the complete scripts becuase i can find some data is missing. I felt there may be any memory issue but this is happening while running this script alone. But it exactly contains only insert scripts
How can I resolve this issue.
May 21, 2009 at 4:12 am
I guess you're referring to the alert in the status line of management studio: "Query complete with errors"
For a very long insert script the Messages pane may be full of things like '(x row(s) affected)' - but you will just have to scroll through to find the red error message. - There may be several.
You should post the exact error mssages.
May 21, 2009 at 5:10 am
Rather than just trying to scroll through the Messages tab looking for the errors, just hit Ctrl+F and search for 'Msg' or 'Error' (can't remember which it is now). This should take you straight to the error description.
When you get there, double click the red error message and it should take you to (roughly) the point in the script that caused the error.
May 21, 2009 at 6:06 am
Hi
I have done the stepts mentioned earlier itself. But still not able to trace the error becuase of memory issue script is not getting executed properly and when I split the insert scripts I am able to run them
but I want to run this file at one time instead of breaking
So any method to clear cache memory
Any good suggestions?????
Thanks
May 21, 2009 at 6:45 am
without seeing your script, here is a common issue:
if you ALTER a table by adding a column, and then try to INSERTfeaturing that new column , an error is raised unless a GO occurs after the ALTER
if you run each statement separately, no problem...run this as a batch, and you will get an error:
create table #test( testtext varchar(30), MyRand varchar(5) DEFAULT(REPLACE( STR( ABS( CHECKSUM( NEWID() ) ) % 10000, 5 ), ' ', '1' ) ) )
alter table #test add whentext datetime
insert into #test(testtext,whentext)
select 'apples',getdate() union all
select 'grapes',getdate() union all
select 'bananas',getdate()
select * from #test
Lowell
June 26, 2013 at 1:32 pm
This works!
create table #test( testtext varchar(30)
, MyRand varchar(5) DEFAULT(REPLACE( STR( ABS( CHECKSUM( NEWID() ) ) % 10000, 5 ), ' ', '1' ) ) )
go
alter table #test add whentext datetime
go
insert into #test(testtext,whentext)
select 'apples',getdate() union all
select 'grapes',getdate() union all
select 'bananas',getdate()
go
select * from #test
go
June 26, 2013 at 10:02 pm
john_agger (6/26/2013)
This works!create table #test( testtext varchar(30)
, MyRand varchar(5) DEFAULT(REPLACE( STR( ABS( CHECKSUM( NEWID() ) ) % 10000, 5 ), ' ', '1' ) ) )
go
alter table #test add whentext datetime
go
insert into #test(testtext,whentext)
select 'apples',getdate() union all
select 'grapes',getdate() union all
select 'bananas',getdate()
go
select * from #test
go
Note: four-year-old thread.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply