SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


script errors


script errors

Author
Message
pmadhavapeddi22
pmadhavapeddi22
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2746 Visits: 1874
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.
Tom Brown
Tom  Brown
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6058 Visits: 1494
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.
twillcomp
twillcomp
Mr or Mrs. 500
Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)Mr or Mrs. 500 (526 reputation)

Group: General Forum Members
Points: 526 Visits: 2637
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.



pmadhavapeddi22
pmadhavapeddi22
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2746 Visits: 1874
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
Lowell
Lowell
SSC Guru
SSC Guru (157K reputation)SSC Guru (157K reputation)SSC Guru (157K reputation)SSC Guru (157K reputation)SSC Guru (157K reputation)SSC Guru (157K reputation)SSC Guru (157K reputation)SSC Guru (157K reputation)

Group: General Forum Members
Points: 157409 Visits: 41543
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
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
john_agger
john_agger
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 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
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)

Group: General Forum Members
Points: 110909 Visits: 22302
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.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search