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
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Yesterday @ 3:15 AM
Points: 174, Visits: 334
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: Yesterday @ 9:02 AM
Points: 1,196, Visits: 1,320

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: Monday, May 20, 2013 2:26 AM
Points: 198, Visits: 2,372
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
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Yesterday @ 3:15 AM
Points: 174, Visits: 334
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 @ 6:41 PM
Points: 11,648, Visits: 27,760
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
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse