Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

script errors Expand / Collapse
Author
Message
Posted Thursday, May 21, 2009 3:50 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 4:34 AM
Points: 534, Visits: 780
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.
Post #721195
Posted Thursday, May 21, 2009 4:12 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 2:08 AM
Points: 1,269, Visits: 1,400

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.


Post #721206
Posted Thursday, May 21, 2009 5:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, April 02, 2014 7:16 AM
Points: 198, Visits: 2,431
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.



Post #721234
Posted Thursday, May 21, 2009 6:06 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 4:34 AM
Points: 534, Visits: 780
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
Post #721253
Posted Thursday, May 21, 2009 6:45 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 4:29 PM
Points: 12,741, Visits: 31,053
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #721280
Posted Wednesday, June 26, 2013 1:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, September 17, 2013 5:51 AM
Points: 1, Visits: 17
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
Post #1467841
Posted Wednesday, June 26, 2013 10:02 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 1:50 PM
Points: 4,828, Visits: 11,179
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.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1467943
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse