Thursday, March 29, 2012
Error when using more then one comment
I=B4ve two comments and between them i put some code, but=20
when i execute Query Analyser show the following error
"Server: Msg 113, Level 15, State 1, Line 40
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 34
Line 34: Incorrect syntax near '/'."
If i execute the code with the first comment it executes=20
without any error but if i try to execute evrything it=20
shows me the error
When was created the second comment i've done it like in=20
the first part of code, this is not a problem but i dont=20
know why SQL shows this message to me!!!
Best regards
Sounds like you have a 'go' in the middle of a multi line comment... Query
Analyzer behaves poorly when this occurs... Use a single line comment -- to
comment out the go statement.
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:1c03b01c42143$7e978080$a101280a@.phx.gbl...
Helo,
Ive two comments and between them i put some code, but
when i execute Query Analyser show the following error
"Server: Msg 113, Level 15, State 1, Line 40
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 34
Line 34: Incorrect syntax near '/'."
If i execute the code with the first comment it executes
without any error but if i try to execute evrything it
shows me the error
When was created the second comment i've done it like in
the first part of code, this is not a problem but i dont
know why SQL shows this message to me!!!
Best regards
|||Thanks Wayne, you're right
Best regards
>--Original Message--
>Sounds like you have a 'go' in the middle of a multi line=20
comment... Query
>Analyzer behaves poorly when this occurs... Use a single=20
line comment -- to
>comment out the go statement.
>"CC&JM" <anonymous@.discussions.microsoft.com> wrote in=20
message
>news:1c03b01c42143$7e978080$a101280a@.phx.gbl...
>Helo,
>I=B4ve two comments and between them i put some code, but
>when i execute Query Analyser show the following error
>"Server: Msg 113, Level 15, State 1, Line 40
>Missing end comment mark '*/'.
>Server: Msg 170, Level 15, State 1, Line 34
>Line 34: Incorrect syntax near '/'."
>If i execute the code with the first comment it executes
>without any error but if i try to execute evrything it
>shows me the error
>When was created the second comment i've done it like in
>the first part of code, this is not a problem but i dont
>know why SQL shows this message to me!!!
>Best regards
>
>.
>
sql
Error when using more then one comment
I=B4ve two comments and between them i put some code, but=20
when i execute Query Analyser show the following error
"Server: Msg 113, Level 15, State 1, Line 40
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 34
Line 34: Incorrect syntax near '/'."
If i execute the code with the first comment it executes=20
without any error but if i try to execute evrything it=20
shows me the error
When was created the second comment i've done it like in=20
the first part of code, this is not a problem but i dont=20
know why SQL shows this message to me!!!
Best regardsSounds like you have a 'go' in the middle of a multi line comment... Query
Analyzer behaves poorly when this occurs... Use a single line comment -- to
comment out the go statement.
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:1c03b01c42143$7e978080$a101280a@.phx
.gbl...
Helo,
Ive two comments and between them i put some code, but
when i execute Query Analyser show the following error
"Server: Msg 113, Level 15, State 1, Line 40
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 34
Line 34: Incorrect syntax near '/'."
If i execute the code with the first comment it executes
without any error but if i try to execute evrything it
shows me the error
When was created the second comment i've done it like in
the first part of code, this is not a problem but i dont
know why SQL shows this message to me!!!
Best regards|||Thanks Wayne, you're right
Best regards
>--Original Message--
>Sounds like you have a 'go' in the middle of a multi line=20
comment... Query
>Analyzer behaves poorly when this occurs... Use a single=20
line comment -- to
>comment out the go statement.
>"CC&JM" <anonymous@.discussions.microsoft.com> wrote in=20
message
> news:1c03b01c42143$7e978080$a101280a@.phx
.gbl...
>Helo,
>I=B4ve two comments and between them i put some code, but
>when i execute Query Analyser show the following error
>"Server: Msg 113, Level 15, State 1, Line 40
>Missing end comment mark '*/'.
>Server: Msg 170, Level 15, State 1, Line 34
>Line 34: Incorrect syntax near '/'."
>If i execute the code with the first comment it executes
>without any error but if i try to execute evrything it
>shows me the error
>When was created the second comment i've done it like in
>the first part of code, this is not a problem but i dont
>know why SQL shows this message to me!!!
>Best regards
>
>.
>
Error when using more then one comment
I=B4ve two comments and between them i put some code, but when i execute Query Analyser show the following error
"Server: Msg 113, Level 15, State 1, Line 40
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 34
Line 34: Incorrect syntax near '/'."
If i execute the code with the first comment it executes without any error but if i try to execute evrything it shows me the error
When was created the second comment i've done it like in the first part of code, this is not a problem but i dont know why SQL shows this message to me!!!
Best regardsSounds like you have a 'go' in the middle of a multi line comment... Query
Analyzer behaves poorly when this occurs... Use a single line comment -- to
comment out the go statement.
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:1c03b01c42143$7e978080$a101280a@.phx.gbl...
Helo,
I´ve two comments and between them i put some code, but
when i execute Query Analyser show the following error
"Server: Msg 113, Level 15, State 1, Line 40
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 34
Line 34: Incorrect syntax near '/'."
If i execute the code with the first comment it executes
without any error but if i try to execute evrything it
shows me the error
When was created the second comment i've done it like in
the first part of code, this is not a problem but i dont
know why SQL shows this message to me!!!
Best regards|||Thanks Wayne, you're right
Best regards
>--Original Message--
>Sounds like you have a 'go' in the middle of a multi line comment... Query
>Analyzer behaves poorly when this occurs... Use a single line comment -- to
>comment out the go statement.
>"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
>news:1c03b01c42143$7e978080$a101280a@.phx.gbl...
>Helo,
>I=B4ve two comments and between them i put some code, but
>when i execute Query Analyser show the following error
>"Server: Msg 113, Level 15, State 1, Line 40
>Missing end comment mark '*/'.
>Server: Msg 170, Level 15, State 1, Line 34
>Line 34: Incorrect syntax near '/'."
>If i execute the code with the first comment it executes
>without any error but if i try to execute evrything it
>shows me the error
>When was created the second comment i've done it like in
>the first part of code, this is not a problem but i dont
>know why SQL shows this message to me!!!
>Best regards
>
>.
>
Tuesday, March 27, 2012
Error when running sp_helpdb query
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
insert the value NULL into column 'owner', table
'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
column does not allow nulls. INSERT fails.
The statement has been terminated.Kush
use master
go
sp_helptext 'sp_helpdb'
I think it fails to find suser_sname of the current session
"Kush" <Kush@.discussions.microsoft.com> wrote in message
news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
>I get the following error when running command "sp_helpdb" in Query
>Analyzer.
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> insert the value NULL into column 'owner', table
> 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||Here's an URL that might explain it. Google is your friend :-)
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/bc6f4659bb8dd60c/50f0170456dd13b5?q=sp_helpdb+insert+NULL&rnum=3#50f0170456dd13b5
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kush" <Kush@.discussions.microsoft.com> wrote in message
news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
>I get the following error when running command "sp_helpdb" in Query Analyzer.
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> insert the value NULL into column 'owner', table
> 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||I will try that and let you know what happens!
"Tibor Karaszi" wrote:
> Here's an URL that might explain it. Google is your friend :-)
> http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/bc6f4659bb8dd60c/50f0170456dd13b5?q=sp_helpdb+insert+NULL&rnum=3#50f0170456dd13b5
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Kush" <Kush@.discussions.microsoft.com> wrote in message
> news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
> >I get the following error when running command "sp_helpdb" in Query Analyzer.
> >
> > Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> > insert the value NULL into column 'owner', table
> > 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> > column does not allow nulls. INSERT fails.
> > The statement has been terminated.
>
Wednesday, March 21, 2012
error when I run script
I can't not run the query to update data but it raice an error as below:
"Server: Msg 1101, Level 17, State 10, Line 1
Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."
HDD free space: 5GB
RAM: 1GB
CPU: 2.8MHz
What should I do?
Please advice me on this.
Thanks in advance,
TNLooks like your TempDb is running out of space.
Are you the database administrator?
The Fonzi approach (not reccomended) would be to restart the SQL Server Service on the server because the tempdb is recreated each time SQL Server is restarted.
In the Enterprise Manager you can right click on the tempdb and check the file growth propeties and adjust them as necessary.
Finally, I wonder what your query might be doing to fill up the tempdb. Do you want to post your script or tell us what you are trying to do?
Friday, March 9, 2012
error when attaching DB
Could not open new database 'Asset5'. CREATE DATABASE is aborted.
Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 9, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
I am just starting with a book sql server 2005 stored proc programming in tsql & .net and cant get the db to attach, any help pls
I find most publishers of SQL Server books are not careful but Microsoft is changing with their SQL Server books by posting mile long errata for a very respected writer. Their documentation however is the best in the business and their samples AdventureWorks is good size database easy to attach and play with. Try the link below for the samples it also comes with reporting services sample. Install it then go to Managment Studio right click and attach it. Download X86 case insensitive. Hope this helps.
http://www.microsoft.com/downloads/details.aspx?familyid=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en
|||thanks allot, but... all the sprocs in this book are related to this asset5 db. can anyone help me with this error?|||I already did could not find a solution so the questions is did you put the MDF and LDF in the location below before trying to attach it in Management Studio? Try deleting every thing and starting new put the MDF and LDF in the location below and go to Managment Studio and attach.
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
|||it was in the right place, when i try to install adventure works i get the same error. I havent used this install in 1yr, could it be an issue with needed service pack?|||I have installed AdventureWorks with service packs and without all without problems, I am using the developer edition. I remember getting problems with AdventureWorks install in with install.sql in 2000 but I looked in that location and found MDF and LDF created without a database so I deleted both files and the install was completed.Wednesday, March 7, 2012
Error using scalar valued function in Stored Procedure
Hi,
I am getting the following error msg while executing a stored procedure (getAllCollections) which uses a scalar valued function.
error msg:
Could not find server 'Select dbo' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.
Stored procedure:
ALTER PROCEDURE [dbo].[getAllCollections]
(
@.pCids varchar(7500)
)
AS
declare @.cmd varchar(8000)
set @.cmd='Select dbo.getCollectionList(c.collection_id) as cList from CollectionT c WHERE c.collection_id in (' +@.pCids + ')'
print @.cmd
exec @.cmd
Where as the 'dbo.getCollectionList' is the scalar valued function. If i execute the query separately as below it works fine:
Select dbo.getCollectionList(c.collection_id) as cList from CollectionT c WHERE c.collection_id in (1234)
I believe i am doing some silly mistake somewhere. Any help will be much appreciated.
Thanks.
Saran:
I think all you need to do is change this:
exec @.cmd
to this:
exec ( @.cmd )
|||
Dave
When you do exec @.cmd it takes the contents of @.cmd as a stored procedure name. Since you had 3 periods in your string, it was thinking 'SELECT dbo' was a server name, and 'collection_id) as cList from CollectionT c WHERE c' as a database.
Like Dave said, use exec (@.cmd)
|||You should replace the dynamic SQL with a safer solution. You can use a TSQL table-valued function to split the list of IDs and use it like:
Select dbo.getCollectionList(c.collection_id) as cList from CollectionT c
WHERE exists(
select * from split_str as s
where s.value = c.collection_id
)
Please see the link below for some solutions that show how to split a string into a table or list of values.
http://www.sommarskog.se/arrays-in-sql.html
|||Thanks a lot. It solved the issue. Silly me. :)
- Saran.
Error using QA
I found something about the problem on the support site
but did not find the hot fix.
Server: Msg 8624, Level 16, State 13, Line 1
Internal SQL Server error.
Please help,
Stefaan
Stefaan,
This error is most often due to a bug. If you found a knowledge base
article that corresponds to your particular situation, the next step is
probably to contact Microsoft Product Support to request the hotfix. If
you want another opinion on whether you have actually encountered a bug,
in which case the normal product support fee would possibly be waived,
feel free to provide some information about what caused the error, and
also give the output you see when you run
select @.@.version
Steve Kass
Drew University
Stefaan Dewulf wrote:
>I keep getting the following error, but the sql is OK.
>I found something about the problem on the support site
>but did not find the hot fix.
>Server: Msg 8624, Level 16, State 13, Line 1
>Internal SQL Server error.
>Please help,
>Stefaan
>
|||When I run the sql:
select count(*) ... I get the counter with no column name
when I change the sql:
select(select count(*) ...) as a
Then I get the error message:
Server: Msg 8624, Level 16, State 13, Line 1
Internal SQL Server error.
"Steve Kass" wrote:
> Stefaan,
> This error is most often due to a bug. If you found a knowledge base
> article that corresponds to your particular situation, the next step is
> probably to contact Microsoft Product Support to request the hotfix. If
> you want another opinion on whether you have actually encountered a bug,
> in which case the normal product support fee would possibly be waived,
> feel free to provide some information about what caused the error, and
> also give the output you see when you run
> select @.@.version
> Steve Kass
> Drew University
> Stefaan Dewulf wrote:
>
>
|||Stefaan,
1. What result do you get from
select @.@.version
?
2. The following produces no error for me:
select count(*) from Northwind..Orders
select(select count(*) from Northwind..Orders) as a
so I can only assume that your actual query is more than a simple select
from a single table. Can you post the actual query?
SK
Stefaan Dewulf wrote:
[vbcol=seagreen]
>When I run the sql:
>select count(*) ... I get the counter with no column name
>when I change the sql:
>select(select count(*) ...) as a
>Then I get the error message:
>Server: Msg 8624, Level 16, State 13, Line 1
>Internal SQL Server error.
>
>"Steve Kass" wrote:
>
|||Perhaps you may want to check the KBAs : 290817, 317527 & 286249
Anith
Sunday, February 19, 2012
Error to manually add subscription to an article
in transactional replication I get the following error
Server: Msg 14100, Level 16, State 1, Procedure sp_addsubscription, Line 240
Specify all articles when subscribing to a publication using concurrent
snapshot processing.
Apparently concurrent snapshot is enabled and when I did issue the
sp_addsubscription and specified the @.article parameter with the table name
, it didnt like it and threw the above error..
It wanted 'all' .. and I was afraid it would do some reinitializing,etc..
Just curious to know why we need that 'all'.. Seems kinda buggy
Interesting. I remember seeing this on Vyas's blog:
http://vyaskn.tripod.com/sqlblog/. He didn't report a solution and I'll also
take a look.
Rgds,
Paul Ibison
|||I just substituted all and it worked. It did take care of just the
respective articles.. Thank God..
With that Im thinking, should we just use all even if we dont have
concurrent snapshot enabled . Will it just take care of just those articles
we want to add manually. I'll try it out and let u know
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23zcnRGXSFHA.1528@.TK2MSFTNGP09.phx.gbl...
> Interesting. I remember seeing this on Vyas's blog:
> http://vyaskn.tripod.com/sqlblog/. He didn't report a solution and I'll
also
> take a look.
> Rgds,
> Paul Ibison
>
>
Friday, February 17, 2012
Error SQL server when try to select or delete or add new
when i try to get data or insert new from some table.
SQL show this message error
Server: Msg 3624, Level 20, State 1, Line 1
Location: q:\SPHINX\NTDBMS\storeng\drs\include\record.inl:1447
Expression: m_SizeRec > 0 && m_SizeRec <= MAXDATAROW
SPID: 52
Process ID: 2116
Connection Broken
-
how to fix this problem ? These table have around 2,900,000 records.
thanks.
Unfortunately, that seems like some form of data corruption. Try running DBCC CHECKDB and DBCC CHECKTABLE to see if you can locate the inconsistency errors. It may be that you'll have to perform a restore from a backup or perhaps a REPAIR_REBUILD will solve the problem.
Check Books Online for further information on the commands.
HTH!
error sql 2000
Line 53
Cannot insert the value NULL into column '', table '';
column does not allow nulls. INSERT fails.
The statement has been terminated.HI,
You might get this error if you have an invalid database owner. Execute the
below script to verify,
SELECT name, SUSER_SNAME(sid)
FROM master..sysdatabases
WHERE SUSER_SNAME(sid) IS NULL
Incase if you have any invalid users , execute sp_changedbowner (refer books
online) stored procedure.
Thanks
Hari
MCDBA
"harold apolinar" <anonymous@.discussions.microsoft.com> wrote in message
news:f7b201c40cf5$533b69e0$a501280a@.phx.gbl...
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb,
> Line 53
> Cannot insert the value NULL into column '', table '';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||Are you running sp_helpdb with a database name or without? If the latter,
does it work if you explicitly set a database name that you have access to?
"harold apolinar" <anonymous@.discussions.microsoft.com> wrote in message
news:f7b201c40cf5$533b69e0$a501280a@.phx.gbl...
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb,
> Line 53
> Cannot insert the value NULL into column '', table '';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.
Error security level explanation please.
Why would this error stop the execution of my Stored procedure.
Server: Msg 8501, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server '
Server1' is
unavailable.
I thought that only errors with level 20 to 25 did that.
IanHi,
Read these about error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Check XACT_ABORT setting...
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server
1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||You had batch abort... There is not much documentation from MS on these
kinds of things, but Erland Sommerskog's articles that the previous
respondent points to is the best information available anywhere on the
subject. (Thanks Erland.)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server
1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||Thanks heaps.
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server
1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
Wednesday, February 15, 2012
Error security level explanation please.
Why would this error stop the execution of my Stored procedure.
Server: Msg 8501, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1' is
unavailable.
I thought that only errors with level 20 to 25 did that.
Ian
Hi,
Read these about error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Check XACT_ABORT setting...
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
|||You had batch abort... There is not much documentation from MS on these
kinds of things, but Erland Sommerskog's articles that the previous
respondent points to is the best information available anywhere on the
subject. (Thanks Erland.)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
|||Thanks heaps.
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
Error security level explanation please.
Why would this error stop the execution of my Stored procedure.
Server: Msg 8501, Level 16, State 3, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1' is
unavailable.
I thought that only errors with level 20 to 25 did that.
IanHi,
Read these about error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Check XACT_ABORT setting...
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||You had batch abort... There is not much documentation from MS on these
kinds of things, but Erland Sommerskog's articles that the previous
respondent points to is the best information available anywhere on the
subject. (Thanks Erland.)
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>|||Thanks heaps.
"Ian" <ian@.NoWhere.com> wrote in message
news:%23ZcyUFpiEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> Why would this error stop the execution of my Stored procedure.
> Server: Msg 8501, Level 16, State 3, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]MSDTC on server 'Server1'
is
> unavailable.
> I thought that only errors with level 20 to 25 did that.
>
> Ian
>
Error running sp_helpdb
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53
Cannot insert the value NULL into column 'owner', table 'tempdb.dbo.#spdbdesc_ 0010001A6EF'; column does not allow nulls. INSERT fails. The statement has been terminated.
I have about 20 DBs on a SQL Server 2000 Standard Edition Instance with sp3a .
There have been no changes made to the Server or the SQL Server Instance in quite some time. Can anyone tell me how I should proceed??I think spid is null in master.dbo.sysdatabases,
check that first.
select spid from master.dbo.sysdatabases
u can use sp, sp_changedbowner 'ownername' if it is null .
And check that link,it may help u.
http://dbforums.com/t554105.html|||I did check select * from master.dbo.sysdatabases and I don't see anything unusual. and thanks.. but that other post wasn't very helpful... : (
I did some poking around and noticed that when I look at the properties of my Model and msdb databases in Enterprise Manager, they BOTH have {unknown} for Owner !!?? that CAN'T be a good thing !!
I checked BOL for sp_changedbowner and it says that you can't change the owner on master, msdb and ,model - so I'm a little leary to try it... Anyone have an suggestions? ... please..
Can I use sp_changdbowner on model and msdb if they are already Null or as Enterprise Manager puts it... UNKNOWN ? ?|||Yes u cannot chage owner of master,msdb and model db,Onlyway is,
eg:this will will change model db owner to 'sa'
exec sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
go
update sysdatabases
set sid = 0x01
where name = 'model'
go
sp_configure 'allow updates', 0
RECONFIGURE WITH OVERRIDE|||Can I ask a dumb question??
How does that code change the owner? I see where it sets the SID. and, should the SID be set the same for model and msdb?|||0x01 is the sid of sa user,msdb,model db's owner should be under sa.
u can see that in,
select name, suser_sname(sid),sid
from master.dbo.sysdatabases|||Told you it was a dumb question. Thanks much!