Wednesday, March 28, 2012
How to force View to change automatically when table schema changes?
And even if sp_recompile does, it would require that I manually do it each time I change a table. Any idea?Is your view an indexed view?|||Originally posted by sbaru
Is your view an indexed view?
Nope, it's not an indexed view, the view joins a few tables so it's not eligible for that.
Another strange thing is that if I select Open View the results is still from the old view, but if I do Design View the output from running the SQL is correct (not the same as what I saw when I did Open View). It's only when I deliberately change a field or two in the view in Design mode will the Open View gives me the correct output. That's why I am thinking the View is still using the old, compiled execution plan until I changed something in the View. That is a pain though since I am constanly change table schema.|||You should run :
--First option
EXEC sp_refreshview @.ViewName
--Secnod option
CREATE PROCEDURE REFRESH_ALL_VIEWS
AS
DECLARE @.ViewName varchar(100)
DECLARE curViews CURSOR FOR select name from sysobjects where xtype='V'
OPEN curViews
FETCH NEXT FROM curViews INTO @.ViewName
WHILE @.@.FETCH_STATUS = 0
BEGIN
EXEC sp_refreshview @.ViewName
FETCH NEXT FROM curViews INTO @.ViewName
END
CLOSE curViews
DEALLOCATE curViews
GO|||Beautiful! Thank you!
Monday, March 26, 2012
How to fix dbcc checkcatalog error (Msg 3853)
error when running dbcc checkdb (which runs dbcc checkcatalog):
Msg 8992, Level 16, State 1, Line 1
Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of row
(role_principal_id=16384,member_principa
l_id=1) in sys.database_role_members
does not have a matching row (principal_id=16384) in sys.database_principals
.
From what I've read, dbcc checkcatalog errors cannot be fixed automatically.
Usually you have to re-create the object. But most of what I've seen on this
error refers to tables and stored procedures, things that are more easily
re-creatable.
How do I figure out what role is causing the problem and then how can I
resolve the error?
Thanks.I haven't seen this error before but it seems to indicate that the db_owner
role is missing. Do you see db_owner when you execute:
SELECT * FROM sys.database_principals
Hope this helps.
Dan Guzman
SQL Server MVP
"Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
news:275F4F6A-B222-4317-A132-F716D065E6CF@.microsoft.com...
> After upgrading two of my SQL2000 databases to SQL2005, I see the
> following
> error when running dbcc checkdb (which runs dbcc checkcatalog):
> Msg 8992, Level 16, State 1, Line 1
> Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of
> row
> (role_principal_id=16384,member_principa
l_id=1) in
> sys.database_role_members
> does not have a matching row (principal_id=16384) in
> sys.database_principals.
> From what I've read, dbcc checkcatalog errors cannot be fixed
> automatically.
> Usually you have to re-create the object. But most of what I've seen on
> this
> error refers to tables and stored procedures, things that are more easily
> re-creatable.
> How do I figure out what role is causing the problem and then how can I
> resolve the error?
> Thanks.|||You're right ... all of the db_* roles seem to be missing. I upgraded three
SQL2000 databases using the detach/attach method. One database has all the
proper roles (and db_owner is principal_id 16384) but the other two are
missing all of the 16xxx principal_id roles.
The databases seem to be working fine (they are for PeopleSoft applications)
even without those roles.
What can I do to fix this?
"Dan Guzman" wrote:
> I haven't seen this error before but it seems to indicate that the db_owne
r
> role is missing. Do you see db_owner when you execute:
> SELECT * FROM sys.database_principals
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
> news:275F4F6A-B222-4317-A132-F716D065E6CF@.microsoft.com...
>
>|||> What can I do to fix this?
In the good ole days, I'd have recommended some at-your-own-risk system
table hacking. This isn't allowed in SQL 2005 so your only options are to
either contact Microsoft support or copy your users and objects to new
databases you know to be good.
It would be nice to know how this happened. If you still have old copies of
the SQL 2000 db files around, that might help diagnosis.
Hope this helps.
Dan Guzman
SQL Server MVP
"Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
news:200040DC-E547-41DB-B358-88D041ADEC4F@.microsoft.com...[vbcol=seagreen]
> You're right ... all of the db_* roles seem to be missing. I upgraded
> three
> SQL2000 databases using the detach/attach method. One database has all the
> proper roles (and db_owner is principal_id 16384) but the other two are
> missing all of the 16xxx principal_id roles.
> The databases seem to be working fine (they are for PeopleSoft
> applications)
> even without those roles.
> What can I do to fix this?
> "Dan Guzman" wrote:
>|||I ended up re-creating the database from scratch and then manually reloaded
my tables. That seems to have resolved the problem: all of the proper roles
are there and the dbcc checkcatalog completes successfully.
Thanks.
"Dan Guzman" wrote:
> In the good ole days, I'd have recommended some at-your-own-risk system
> table hacking. This isn't allowed in SQL 2005 so your only options are to
> either contact Microsoft support or copy your users and objects to new
> databases you know to be good.
> It would be nice to know how this happened. If you still have old copies
of
> the SQL 2000 db files around, that might help diagnosis.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
> news:200040DC-E547-41DB-B358-88D041ADEC4F@.microsoft.com...
>
>sql
How to fix dbcc checkcatalog error (Msg 3853)
error when running dbcc checkdb (which runs dbcc checkcatalog):
Msg 8992, Level 16, State 1, Line 1
Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of row
(role_principal_id=16384,member_principal_id=1) in sys.database_role_members
does not have a matching row (principal_id=16384) in sys.database_principals.
From what I've read, dbcc checkcatalog errors cannot be fixed automatically.
Usually you have to re-create the object. But most of what I've seen on this
error refers to tables and stored procedures, things that are more easily
re-creatable.
How do I figure out what role is causing the problem and then how can I
resolve the error?
Thanks.I haven't seen this error before but it seems to indicate that the db_owner
role is missing. Do you see db_owner when you execute:
SELECT * FROM sys.database_principals
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
news:275F4F6A-B222-4317-A132-F716D065E6CF@.microsoft.com...
> After upgrading two of my SQL2000 databases to SQL2005, I see the
> following
> error when running dbcc checkdb (which runs dbcc checkcatalog):
> Msg 8992, Level 16, State 1, Line 1
> Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of
> row
> (role_principal_id=16384,member_principal_id=1) in
> sys.database_role_members
> does not have a matching row (principal_id=16384) in
> sys.database_principals.
> From what I've read, dbcc checkcatalog errors cannot be fixed
> automatically.
> Usually you have to re-create the object. But most of what I've seen on
> this
> error refers to tables and stored procedures, things that are more easily
> re-creatable.
> How do I figure out what role is causing the problem and then how can I
> resolve the error?
> Thanks.|||You're right ... all of the db_* roles seem to be missing. I upgraded three
SQL2000 databases using the detach/attach method. One database has all the
proper roles (and db_owner is principal_id 16384) but the other two are
missing all of the 16xxx principal_id roles.
The databases seem to be working fine (they are for PeopleSoft applications)
even without those roles.
What can I do to fix this?
"Dan Guzman" wrote:
> I haven't seen this error before but it seems to indicate that the db_owner
> role is missing. Do you see db_owner when you execute:
> SELECT * FROM sys.database_principals
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
> news:275F4F6A-B222-4317-A132-F716D065E6CF@.microsoft.com...
> > After upgrading two of my SQL2000 databases to SQL2005, I see the
> > following
> > error when running dbcc checkdb (which runs dbcc checkcatalog):
> >
> > Msg 8992, Level 16, State 1, Line 1
> > Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of
> > row
> > (role_principal_id=16384,member_principal_id=1) in
> > sys.database_role_members
> > does not have a matching row (principal_id=16384) in
> > sys.database_principals.
> >
> > From what I've read, dbcc checkcatalog errors cannot be fixed
> > automatically.
> > Usually you have to re-create the object. But most of what I've seen on
> > this
> > error refers to tables and stored procedures, things that are more easily
> > re-creatable.
> >
> > How do I figure out what role is causing the problem and then how can I
> > resolve the error?
> >
> > Thanks.
>
>|||> What can I do to fix this?
In the good ole days, I'd have recommended some at-your-own-risk system
table hacking. This isn't allowed in SQL 2005 so your only options are to
either contact Microsoft support or copy your users and objects to new
databases you know to be good.
It would be nice to know how this happened. If you still have old copies of
the SQL 2000 db files around, that might help diagnosis.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
news:200040DC-E547-41DB-B358-88D041ADEC4F@.microsoft.com...
> You're right ... all of the db_* roles seem to be missing. I upgraded
> three
> SQL2000 databases using the detach/attach method. One database has all the
> proper roles (and db_owner is principal_id 16384) but the other two are
> missing all of the 16xxx principal_id roles.
> The databases seem to be working fine (they are for PeopleSoft
> applications)
> even without those roles.
> What can I do to fix this?
> "Dan Guzman" wrote:
>> I haven't seen this error before but it seems to indicate that the
>> db_owner
>> role is missing. Do you see db_owner when you execute:
>> SELECT * FROM sys.database_principals
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
>> news:275F4F6A-B222-4317-A132-F716D065E6CF@.microsoft.com...
>> > After upgrading two of my SQL2000 databases to SQL2005, I see the
>> > following
>> > error when running dbcc checkdb (which runs dbcc checkcatalog):
>> >
>> > Msg 8992, Level 16, State 1, Line 1
>> > Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of
>> > row
>> > (role_principal_id=16384,member_principal_id=1) in
>> > sys.database_role_members
>> > does not have a matching row (principal_id=16384) in
>> > sys.database_principals.
>> >
>> > From what I've read, dbcc checkcatalog errors cannot be fixed
>> > automatically.
>> > Usually you have to re-create the object. But most of what I've seen on
>> > this
>> > error refers to tables and stored procedures, things that are more
>> > easily
>> > re-creatable.
>> >
>> > How do I figure out what role is causing the problem and then how can I
>> > resolve the error?
>> >
>> > Thanks.
>>|||I ended up re-creating the database from scratch and then manually reloaded
my tables. That seems to have resolved the problem: all of the proper roles
are there and the dbcc checkcatalog completes successfully.
Thanks.
"Dan Guzman" wrote:
> > What can I do to fix this?
> In the good ole days, I'd have recommended some at-your-own-risk system
> table hacking. This isn't allowed in SQL 2005 so your only options are to
> either contact Microsoft support or copy your users and objects to new
> databases you know to be good.
> It would be nice to know how this happened. If you still have old copies of
> the SQL 2000 db files around, that might help diagnosis.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
> news:200040DC-E547-41DB-B358-88D041ADEC4F@.microsoft.com...
> > You're right ... all of the db_* roles seem to be missing. I upgraded
> > three
> > SQL2000 databases using the detach/attach method. One database has all the
> > proper roles (and db_owner is principal_id 16384) but the other two are
> > missing all of the 16xxx principal_id roles.
> >
> > The databases seem to be working fine (they are for PeopleSoft
> > applications)
> > even without those roles.
> >
> > What can I do to fix this?
> >
> > "Dan Guzman" wrote:
> >
> >> I haven't seen this error before but it seems to indicate that the
> >> db_owner
> >> role is missing. Do you see db_owner when you execute:
> >>
> >> SELECT * FROM sys.database_principals
> >>
> >> --
> >> Hope this helps.
> >>
> >> Dan Guzman
> >> SQL Server MVP
> >>
> >> "Jeremy" <Jeremy@.discussions.microsoft.com> wrote in message
> >> news:275F4F6A-B222-4317-A132-F716D065E6CF@.microsoft.com...
> >> > After upgrading two of my SQL2000 databases to SQL2005, I see the
> >> > following
> >> > error when running dbcc checkdb (which runs dbcc checkcatalog):
> >> >
> >> > Msg 8992, Level 16, State 1, Line 1
> >> > Check Catalog Msg 3853, State 1: Attribute (role_principal_id=16384) of
> >> > row
> >> > (role_principal_id=16384,member_principal_id=1) in
> >> > sys.database_role_members
> >> > does not have a matching row (principal_id=16384) in
> >> > sys.database_principals.
> >> >
> >> > From what I've read, dbcc checkcatalog errors cannot be fixed
> >> > automatically.
> >> > Usually you have to re-create the object. But most of what I've seen on
> >> > this
> >> > error refers to tables and stored procedures, things that are more
> >> > easily
> >> > re-creatable.
> >> >
> >> > How do I figure out what role is causing the problem and then how can I
> >> > resolve the error?
> >> >
> >> > Thanks.
> >>
> >>
> >>
>
>
Friday, March 23, 2012
How to find which version of SQL 2005 (32bit vs. 64bit)
but how do you determine if you are running 32bit or 64 bit edition?
Thank you,
Mike
Seems xp_msver returns a platform property that for my machine say 'NT Intel X86'.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"M Craig" <mcraig88@.newsgroups.nospam> wrote in message
news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>I have found a kb on getting the Version/Build/ServicePack of SQL2005, but how do you determine if
>you are running 32bit or 64 bit edition?
> Thank you,
> Mike
|||"M Craig" <mcraig88@.newsgroups.nospam> wrote in message
news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
>how do you determine if you are running 32bit or 64 bit edition?
> Thank you,
> Mike
SELECT @.@.VERSION -- 32 bit box
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
NT 5.1 (Build 2600: Service Pack 2)
SELECT @.@.VERSION -- 64 bit box
Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
on Windows NT 5.2 (Build 3790: Service Pack 1)
One is (Intel X86), the other (X64), also the Edition section shows
(64-bit) on the big box.
Rick Sawtell
|||Rick Sawtell wrote:
> "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>
> SELECT @.@.VERSION -- 32 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
> NT 5.1 (Build 2600: Service Pack 2)
>
> SELECT @.@.VERSION -- 64 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> One is (Intel X86), the other (X64), also the Edition section shows
> (64-bit) on the big box.
>
> Rick Sawtell
>
>
Thank you I'll try that.
|||Rick Sawtell wrote:
> "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>
> SELECT @.@.VERSION -- 32 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
> NT 5.1 (Build 2600: Service Pack 2)
>
> SELECT @.@.VERSION -- 64 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> One is (Intel X86), the other (X64), also the Edition section shows
> (64-bit) on the big box.
>
> Rick Sawtell
>
>
Thank you I'll try that.
|||It is Help Full,
jat,
http://www.earthsketch.com/seopage.html
M Craig wrote:
> Rick Sawtell wrote:
> Thank you I'll try that.
How to find which version of SQL 2005 (32bit vs. 64bit)
but how do you determine if you are running 32bit or 64 bit edition?
Thank you,
MikeSeems xp_msver returns a platform property that for my machine say 'NT Intel
X86'.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"M Craig" <mcraig88@.newsgroups.nospam> wrote in message
news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
how do you determine if
>you are running 32bit or 64 bit edition?
> Thank you,
> Mike|||"M Craig" <mcraig88@.newsgroups.nospam> wrote in message
news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
>how do you determine if you are running 32bit or 64 bit edition?
> Thank you,
> Mike
SELECT @.@.VERSION -- 32 bit box
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
NT 5.1 (Build 2600: Service Pack 2)
SELECT @.@.VERSION -- 64 bit box
Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
on Windows NT 5.2 (Build 3790: Service Pack 1)
One is (Intel X86), the other (X64), also the Edition section shows
(64-bit) on the big box.
Rick Sawtell|||Rick Sawtell wrote:
> "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>
> SELECT @.@.VERSION -- 32 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:2
5
> Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Window
s
> NT 5.1 (Build 2600: Service Pack 2)
>
> SELECT @.@.VERSION -- 64 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> One is (Intel X86), the other (X64), also the Edition section shows
> (64-bit) on the big box.
>
> Rick Sawtell
>
>
Thank you I'll try that.|||Rick Sawtell wrote:
> "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>
> SELECT @.@.VERSION -- 32 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:2
5
> Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Window
s
> NT 5.1 (Build 2600: Service Pack 2)
>
> SELECT @.@.VERSION -- 64 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> One is (Intel X86), the other (X64), also the Edition section shows
> (64-bit) on the big box.
>
> Rick Sawtell
>
>
Thank you I'll try that.|||It is Help Full,
jat,
http://www.earthsketch.com/seopage.html
M Craig wrote:
> Rick Sawtell wrote:
> Thank you I'll try that.
How to find which version of SQL 2005 (32bit vs. 64bit)
but how do you determine if you are running 32bit or 64 bit edition?
Thank you,
MikeSeems xp_msver returns a platform property that for my machine say 'NT Intel X86'.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"M Craig" <mcraig88@.newsgroups.nospam> wrote in message
news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>I have found a kb on getting the Version/Build/ServicePack of SQL2005, but how do you determine if
>you are running 32bit or 64 bit edition?
> Thank you,
> Mike|||"M Craig" <mcraig88@.newsgroups.nospam> wrote in message
news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
>how do you determine if you are running 32bit or 64 bit edition?
> Thank you,
> Mike
SELECT @.@.VERSION -- 32 bit box
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
NT 5.1 (Build 2600: Service Pack 2)
SELECT @.@.VERSION -- 64 bit box
Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
on Windows NT 5.2 (Build 3790: Service Pack 1)
One is (Intel X86), the other (X64), also the Edition section shows
(64-bit) on the big box.
Rick Sawtell|||Rick Sawtell wrote:
> "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>> I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
>> how do you determine if you are running 32bit or 64 bit edition?
>> Thank you,
>> Mike
>
> SELECT @.@.VERSION -- 32 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
> NT 5.1 (Build 2600: Service Pack 2)
>
> SELECT @.@.VERSION -- 64 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> One is (Intel X86), the other (X64), also the Edition section shows
> (64-bit) on the big box.
>
> Rick Sawtell
>
>
Thank you I'll try that.|||Rick Sawtell wrote:
> "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
>> I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
>> how do you determine if you are running 32bit or 64 bit edition?
>> Thank you,
>> Mike
>
> SELECT @.@.VERSION -- 32 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
> NT 5.1 (Build 2600: Service Pack 2)
>
> SELECT @.@.VERSION -- 64 bit box
> Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on Windows NT 5.2 (Build 3790: Service Pack 1)
>
> One is (Intel X86), the other (X64), also the Edition section shows
> (64-bit) on the big box.
>
> Rick Sawtell
>
>
Thank you I'll try that.|||It is Help Full,
jat,
http://www.earthsketch.com/seopage.html
M Craig wrote:
> Rick Sawtell wrote:
> > "M Craig" <mcraig88@.newsgroups.nospam> wrote in message
> > news:e3$w%23SJ6GHA.5068@.TK2MSFTNGP06.phx.gbl...
> >> I have found a kb on getting the Version/Build/ServicePack of SQL2005, but
> >> how do you determine if you are running 32bit or 64 bit edition?
> >>
> >> Thank you,
> >>
> >> Mike
> >
> >
> > SELECT @.@.VERSION -- 32 bit box
> > Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25
> > Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows
> > NT 5.1 (Build 2600: Service Pack 2)
> >
> >
> > SELECT @.@.VERSION -- 64 bit box
> >
> > Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53
> > Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> > on Windows NT 5.2 (Build 3790: Service Pack 1)
> >
> >
> > One is (Intel X86), the other (X64), also the Edition section shows
> > (64-bit) on the big box.
> >
> >
> > Rick Sawtell
> >
> >
> >
> Thank you I'll try that.sql
how to find which line has error
INSERT INTO VALUES statement.
One of them is giving some error. While running it in Query Analyzer I am not able to know
which line is giving the problem. How do I make QA show me the offending line.
The script has lot of GO statements, usuall one after every 200 lines.
TIAData Cruncher wrote:
> I am running a script which inserts large number of rows thru
> INSERT INTO VALUES statement.
> One of them is giving some error. While running it in Query Analyzer
> I am not able to know which line is giving the problem. How do I make
> QA show me the offending line.
> The script has lot of GO statements, usuall one after every 200 lines.
> TIA
Try running them as separate batches; one at a time until you find the
batch with the error.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||If you put each insert into its own batch, on error, you can just double
click on the error message in the result pane which QA should bring you to
the line that fails.
--
-oj
"Data Cruncher" <dcruncher4@.netscape.net> wrote in message
news:3g6ttvFb1038U1@.individual.net...
>I am running a script which inserts large number of rows thru INSERT INTO
>VALUES statement.
> One of them is giving some error. While running it in Query Analyzer I am
> not able to know which line is giving the problem. How do I make QA show
> me the offending line.
> The script has lot of GO statements, usuall one after every 200 lines.
> TIA
how to find which line has error
INSERT INTO VALUES statement.
One of them is giving some error. While running it in Query Analyzer I am not able to know
which line is giving the problem. How do I make QA show me the offending line.
The script has lot of GO statements, usuall one after every 200 lines.
TIA
Data Cruncher wrote:
> I am running a script which inserts large number of rows thru
> INSERT INTO VALUES statement.
> One of them is giving some error. While running it in Query Analyzer
> I am not able to know which line is giving the problem. How do I make
> QA show me the offending line.
> The script has lot of GO statements, usuall one after every 200 lines.
> TIA
Try running them as separate batches; one at a time until you find the
batch with the error.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||If you put each insert into its own batch, on error, you can just double
click on the error message in the result pane which QA should bring you to
the line that fails.
-oj
"Data Cruncher" <dcruncher4@.netscape.net> wrote in message
news:3g6ttvFb1038U1@.individual.net...
>I am running a script which inserts large number of rows thru INSERT INTO
>VALUES statement.
> One of them is giving some error. While running it in Query Analyzer I am
> not able to know which line is giving the problem. How do I make QA show
> me the offending line.
> The script has lot of GO statements, usuall one after every 200 lines.
> TIA
how to find which line has error
INSERT INTO VALUES statement.
One of them is giving some error. While running it in Query Analyzer I am no
t able to know
which line is giving the problem. How do I make QA show me the offending lin
e.
The script has lot of GO statements, usuall one after every 200 lines.
TIAData Cruncher wrote:
> I am running a script which inserts large number of rows thru
> INSERT INTO VALUES statement.
> One of them is giving some error. While running it in Query Analyzer
> I am not able to know which line is giving the problem. How do I make
> QA show me the offending line.
> The script has lot of GO statements, usuall one after every 200 lines.
> TIA
Try running them as separate batches; one at a time until you find the
batch with the error.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||If you put each insert into its own batch, on error, you can just double
click on the error message in the result pane which QA should bring you to
the line that fails.
-oj
"Data Cruncher" <dcruncher4@.netscape.net> wrote in message
news:3g6ttvFb1038U1@.individual.net...
>I am running a script which inserts large number of rows thru INSERT INTO
>VALUES statement.
> One of them is giving some error. While running it in Query Analyzer I am
> not able to know which line is giving the problem. How do I make QA show
> me the offending line.
> The script has lot of GO statements, usuall one after every 200 lines.
> TIAsql
How to find what SQL 2000 service pack is running?
We are running SQL 2000 and I just want to know how to find what service
pack is installed and running on the system.
TIA,
Clayton
P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
You can find it at: http://www.nikoli.net/itunepod
*******************
http://support.microsoft.com/kb/321185/
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Clayton Sutton" <none@.none.com> wrote in message
news:JxOQh.216567$Jt2.120445@.fe04.news.easynews.co m...
> Hey everyone,
> We are running SQL 2000 and I just want to know how to find what service
> pack is installed and running on the system.
> --
> TIA,
>
> Clayton
>
> P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
> You can find it at: http://www.nikoli.net/itunepod
> *******************
>
>
|||Thanks Aaron, that did the trick!
TIA,
Clayton
P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
You can find it at: http://www.nikoli.net/itunepod
*******************
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eHyPAdsdHHA.3960@.TK2MSFTNGP02.phx.gbl...
> http://support.microsoft.com/kb/321185/
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.sqlblog.com/
> http://www.aspfaq.com/5006
> "Clayton Sutton" <none@.none.com> wrote in message
> news:JxOQh.216567$Jt2.120445@.fe04.news.easynews.co m...
>
How to find what SQL 2000 service pack is running?
We are running SQL 2000 and I just want to know how to find what service
pack is installed and running on the system.
TIA,
Clayton
P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
You can find it at: http://www.nikoli.net/itunepod
*******************http://support.microsoft.com/kb/321185/
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Clayton Sutton" <none@.none.com> wrote in message
news:JxOQh.216567$Jt2.120445@.fe04.news.easynews.com...
> Hey everyone,
> We are running SQL 2000 and I just want to know how to find what service
> pack is installed and running on the system.
> --
> TIA,
>
> Clayton
>
> P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
> You can find it at: http://www.nikoli.net/itunepod
> *******************
>
>|||Thanks Aaron, that did the trick!
TIA,
Clayton
P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
You can find it at: http://www.nikoli.net/itunepod
*******************
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in mess
age
news:eHyPAdsdHHA.3960@.TK2MSFTNGP02.phx.gbl...
> http://support.microsoft.com/kb/321185/
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.sqlblog.com/
> http://www.aspfaq.com/5006
> "Clayton Sutton" <none@.none.com> wrote in message
> news:JxOQh.216567$Jt2.120445@.fe04.news.easynews.com...
>sql
How to find what SQL 2000 service pack is running?
We are running SQL 2000 and I just want to know how to find what service
pack is installed and running on the system.
--
TIA,
Clayton
P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
You can find it at: http://www.nikoli.net/itunepod
*******************http://support.microsoft.com/kb/321185/
--
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"Clayton Sutton" <none@.none.com> wrote in message
news:JxOQh.216567$Jt2.120445@.fe04.news.easynews.com...
> Hey everyone,
> We are running SQL 2000 and I just want to know how to find what service
> pack is installed and running on the system.
> --
> TIA,
>
> Clayton
>
> P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
> You can find it at: http://www.nikoli.net/itunepod
> *******************
>
>|||Thanks Aaron, that did the trick!
--
TIA,
Clayton
P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
You can find it at: http://www.nikoli.net/itunepod
*******************
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eHyPAdsdHHA.3960@.TK2MSFTNGP02.phx.gbl...
> http://support.microsoft.com/kb/321185/
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.sqlblog.com/
> http://www.aspfaq.com/5006
> "Clayton Sutton" <none@.none.com> wrote in message
> news:JxOQh.216567$Jt2.120445@.fe04.news.easynews.com...
>> Hey everyone,
>> We are running SQL 2000 and I just want to know how to find what service
>> pack is installed and running on the system.
>> --
>> TIA,
>>
>> Clayton
>>
>> P.S.: I wrote an iTunes podcast tutorial and just want to publicize it.
>> You can find it at: http://www.nikoli.net/itunepod
>> *******************
>>
>>
>
How to find version (build)
I need to load build 8.00.534 to solve my problem connecting using
linked servers with a Progress database as this is supposed to fix our
problem.
Thanks,
Tom.Hi,
Execute the below command from Query Analyzer:-
Select @.@.version
8.00.534 is for SP2 , after that install the patch for slammer worm as well.
Check the versions and build number in below site :-
http://www.krell-software.com/mssql-builds.htm
Thanks
Hari
MCDBA
"Thomas Scheiderich" <tfs@.deltanet.com> wrote in message
news:408DF32E.2040205@.deltanet.com...
> How do you find out what version of SQL 2000 you are running?
> I need to load build 8.00.534 to solve my problem connecting using
> linked servers with a Progress database as this is supposed to fix our
> problem.
> Thanks,
> Tom.
>|||SELECT @.@.VERSION ? http://www.aspfaq.com/2160
I strongly, strongly, strongly recommend using this build only for the
required time and only if you are installing it on an isolated machine. If
this build is exposed to the Internet, you are very likely to be complaining
of Slammer very soon...
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Thomas Scheiderich" <tfs@.deltanet.com> wrote in message
news:408DF32E.2040205@.deltanet.com...
> How do you find out what version of SQL 2000 you are running?
> I need to load build 8.00.534 to solve my problem connecting using linked
> servers with a Progress database as this is supposed to fix our problem.
> Thanks,
> Tom.
>
Wednesday, March 21, 2012
How to find the IP of someone repeatedly trying to login as SA
mixed mode security. The SQL server is being used for development and
testing purposes.
The server needs to be exposed to the internet as it is also accessed off
site
When checking the windows logs, the application log showed repeated failed
login attempts to the sa SQL account and new entries were being created at a
rate for a few a minuet.
How can I find out the IP address of where these login attempts were coming
from?
and also how can I get the SQL server to ignore requests for this address or
maybe ip range?
To temporarily stop this I just disabled the TCP/IP network protocol for the
SQL server.
Thanks for any help,
GrantGreat questions:
How can I find out the IP address of where these login attempts were coming
from?
Answer: Best ways are either running Microsoft Network Monitor on the
server & make a capture of the traffic.
Or, netstat -an to capture the sessions connected via IP. To send a login
the client first needs to make
a tcp session using the 3 way handshake.
and also how can I get the SQL server to ignore requests for this address or
maybe ip range?
Answer: By default there is no way to do this from SQL. You'd need to
configure a firewall in front of SQL to allow connection requests from only
one machine.
I've requested that we allow auding for failed login request & log the IP
address for the next release of SQL.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:
> and also how can I get the SQL server to ignore requests for this address
or
> maybe ip range?
> Answer: By default there is no way to do this from SQL. You'd need to
> configure a firewall in front of SQL to allow connection requests from onl
y
> one machine.
If you are familiar with IPSec you could set up a custom IP Sec policy
to only allow connections from machines that you trust. You don't want
to specify who you deny, but instead specify who you trust.
> I've requested that we allow auding for failed login request & log the IP
> address for the next release of SQL.
>
It would be nice if the auditing was built to use windows auditing,
however I'm sure that this is only available if using windows
authentication, and in this case it was sql auth that was tried.
Aaron Weiker
http://blogs.sqladvice.com/aweiker
http://aaronweiker.com/sql
how to find the edition of SQL Server 2000/2005 through registry?
you don't have to go through the registry for that - look up the SERVERPROPERTY() function in Books Online. You can find a lot of information about the server using that function.
If for some reason you still need the registry, everything SQL Server stores is in this base hive:
HKLM\Software\Microsoft\MSSqlserver\
|||
in query analyzer type: SELECT @.@.VERSION
or try HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion
also see
http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/50660f9ebffa92c8/c132c39beb51c4c2?lnk=st&q=how+to+find+sql+server+2000+version+in+registry&rnum=1&hl=en#c132c39beb51c4c2
Microsoft Knowledge Base Article – 321185
http://support.microsoft.com/default.aspx?scid=kb;en-us;321185#3
Hope this helps
dscastro
Monday, March 19, 2012
How to find sql server agent running using tsql
is running or stopped.
--
Thanks
Amish
SQL Server DBA
ExtraQuest"AM" <anonymous@.developersdex.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article/ArticleID/46083/46083.html
AMB
"AM" wrote:
> How to find using TSQL or some sql server function that SQL Server agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.developersdex.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
How to find sql server agent running using tsql
is running or stopped.
Thanks
Amish
SQL Server DBA
ExtraQuest
"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA
|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article/...083/46083.html
AMB
"AM" wrote:
> How to find using TSQL or some sql server function that SQL Server agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>
|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
How to find sql server agent running using tsql
is running or stopped.
Thanks
Amish
SQL Server DBA
ExtraQuest"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article...6083/46083.html
AMB
"AM" wrote:
> How to find using TSQL or some sql server function that SQL Server age
nt
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
How to find SQL SERVER ?
network m/cs, through C# or from one of SQL Server? - Thanks in adv.Hi
ISQL -L or SQL DMO.
http://groups.google.com.au/group/m...b87e4f264795ce0
Regards
----------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"murali.trichy" <murali.trichy@.gmail.com> wrote in message
news:1124524045.477179.313090@.o13g2000cwo.googlegr oups.com...
> How to find total number of SQL Server which is running in local
> network m/cs, through C# or from one of SQL Server? - Thanks in adv.|||Hi
If you wanted a tool that does this then SQLRecon should fit!
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=26
John
"murali.trichy" <murali.trichy@.gmail.com> wrote in message
news:1124524045.477179.313090@.o13g2000cwo.googlegr oups.com...
> How to find total number of SQL Server which is running in local
> network m/cs, through C# or from one of SQL Server? - Thanks in adv.
Monday, March 12, 2012
how to find out what sqlserver i am running
I am taking over a existing sqlserver
The sqlserver is working fine
Is there a way to find out whether the prev guy installed
sqlserver standard edition o
sqlserver developer edition o
sqlserver personal editio
may b
from registry or active log msg during boot up or
using select @.@.version from system table etc
thanks a million for your valuable time to answerMike,
If you check the output of SELECT @.@.VERSION , it would mention the SQLServer
edition in the last line.For example, I see:
...
"Enterprise Edition on Windows ..."
Or you can simply do SELECT SERVERPROPERTY('EDITION')
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"mike" <anonymous@.discussions.microsoft.com> wrote in message
news:CFA71390-27A4-407B-9232-A4BDE3F9E856@.microsoft.com...
> Hi:
> I am taking over a existing sqlserver.
> The sqlserver is working fine.
> Is there a way to find out whether the prev guy installed
> sqlserver standard edition or
> sqlserver developer edition or
> sqlserver personal edition
> may be
> from registry or active log msg during boot up or
> using select @.@.version from system table etc.
>
> thanks a million for your valuable time to answer.
>|||http://www.aspfaq.com/2160
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"mike" <anonymous@.discussions.microsoft.com> wrote in message
news:CFA71390-27A4-407B-9232-A4BDE3F9E856@.microsoft.com...
> Hi:
> I am taking over a existing sqlserver.
> The sqlserver is working fine.
> Is there a way to find out whether the prev guy installed
> sqlserver standard edition or
> sqlserver developer edition or
> sqlserver personal edition
> may be
> from registry or active log msg during boot up or
> using select @.@.version from system table etc.
>
> thanks a million for your valuable time to answer.
>