Hi everyone
I'm trying to find a way to query data from a web service and bring it
back into SQL to join with other relational data already in the
database. From what I've read you're required to compile an assembly
(which serves as a middle tier between the database and web service)
and register that assembly in sql server. Your T-SQL query then calls
the assembly which calls the webservice to get the data.
1. Is this correct?
2. If there was so much effort to make SQL procedures exposed via
webservice, why can't SQL do the opposite? I think that consuming a
webservice is much easier than providing it... is this a feature that
no one asked for in SQL server?
3. I can't seem to find any documentation on what is required in these
assemblies... does anyone have any good links on how to write one of
these?
Thanks!
Brandon
Hello
You are saying SQLCLR. Type the word in MSDN search box and you may see some
walkthrough as the first result.
Interesting question is #2. One thing is Microsoft makes the CLR not for
webservice but for including whole dotnet framework functionalities. Now
they become so lazy as not to do anything more;;
<brandon.richter@.gmail.com> wrote in message
news:1162912948.288024.140830@.e3g2000cwe.googlegro ups.com...
> Hi everyone
> I'm trying to find a way to query data from a web service and bring it
> back into SQL to join with other relational data already in the
> database. From what I've read you're required to compile an assembly
> (which serves as a middle tier between the database and web service)
> and register that assembly in sql server. Your T-SQL query then calls
> the assembly which calls the webservice to get the data.
> 1. Is this correct?
> 2. If there was so much effort to make SQL procedures exposed via
> webservice, why can't SQL do the opposite? I think that consuming a
> webservice is much easier than providing it... is this a feature that
> no one asked for in SQL server?
> 3. I can't seem to find any documentation on what is required in these
> assemblies... does anyone have any good links on how to write one of
> these?
> Thanks!
> Brandon
>
Showing posts with label service. Show all posts
Showing posts with label service. Show all posts
Friday, March 23, 2012
outbound SOAP requests from native SQL
Hi everyone
I'm trying to find a way to query data from a web service and bring it
back into SQL to join with other relational data already in the
database. From what I've read you're required to compile an assembly
(which serves as a middle tier between the database and web service)
and register that assembly in sql server. Your T-SQL query then calls
the assembly which calls the webservice to get the data.
1. Is this correct?
2. If there was so much effort to make SQL procedures exposed via
webservice, why can't SQL do the opposite? I think that consuming a
webservice is much easier than providing it... is this a feature that
no one asked for in SQL server?
3. I can't seem to find any documentation on what is required in these
assemblies... does anyone have any good links on how to write one of
these?
Thanks!
BrandonHello
You are saying SQLCLR. Type the word in MSDN search box and you may see some
walkthrough as the first result.
Interesting question is #2. One thing is Microsoft makes the CLR not for
webservice but for including whole dotnet framework functionalities. Now
they become so lazy as not to do anything more;;
<brandon.richter@.gmail.com> wrote in message
news:1162912948.288024.140830@.e3g2000cwe.googlegroups.com...
> Hi everyone
> I'm trying to find a way to query data from a web service and bring it
> back into SQL to join with other relational data already in the
> database. From what I've read you're required to compile an assembly
> (which serves as a middle tier between the database and web service)
> and register that assembly in sql server. Your T-SQL query then calls
> the assembly which calls the webservice to get the data.
> 1. Is this correct?
> 2. If there was so much effort to make SQL procedures exposed via
> webservice, why can't SQL do the opposite? I think that consuming a
> webservice is much easier than providing it... is this a feature that
> no one asked for in SQL server?
> 3. I can't seem to find any documentation on what is required in these
> assemblies... does anyone have any good links on how to write one of
> these?
> Thanks!
> Brandon
>sql
I'm trying to find a way to query data from a web service and bring it
back into SQL to join with other relational data already in the
database. From what I've read you're required to compile an assembly
(which serves as a middle tier between the database and web service)
and register that assembly in sql server. Your T-SQL query then calls
the assembly which calls the webservice to get the data.
1. Is this correct?
2. If there was so much effort to make SQL procedures exposed via
webservice, why can't SQL do the opposite? I think that consuming a
webservice is much easier than providing it... is this a feature that
no one asked for in SQL server?
3. I can't seem to find any documentation on what is required in these
assemblies... does anyone have any good links on how to write one of
these?
Thanks!
BrandonHello
You are saying SQLCLR. Type the word in MSDN search box and you may see some
walkthrough as the first result.
Interesting question is #2. One thing is Microsoft makes the CLR not for
webservice but for including whole dotnet framework functionalities. Now
they become so lazy as not to do anything more;;
<brandon.richter@.gmail.com> wrote in message
news:1162912948.288024.140830@.e3g2000cwe.googlegroups.com...
> Hi everyone
> I'm trying to find a way to query data from a web service and bring it
> back into SQL to join with other relational data already in the
> database. From what I've read you're required to compile an assembly
> (which serves as a middle tier between the database and web service)
> and register that assembly in sql server. Your T-SQL query then calls
> the assembly which calls the webservice to get the data.
> 1. Is this correct?
> 2. If there was so much effort to make SQL procedures exposed via
> webservice, why can't SQL do the opposite? I think that consuming a
> webservice is much easier than providing it... is this a feature that
> no one asked for in SQL server?
> 3. I can't seem to find any documentation on what is required in these
> assemblies... does anyone have any good links on how to write one of
> these?
> Thanks!
> Brandon
>sql
Tuesday, March 20, 2012
Our Application dosn't work with Sql Service pack 3
Hi , My name is Tomas
I work for a Software Developing Company ,
Our applications has been written and developed by
Power Builder 5.0 , and they can work with Sql Server 2000
normally , but when I install service pack 3.0 on our sql
server after that our application can't work with sql
server correctly , for example some queries doesn't run
and there is no result for them after installing service
pack 3,,
Please Help MeHi
First thing you need to do is run profiler on the server to see what queries
are being submitted. then pick some of those queries and run them in Query
Analyzer. In that situation, you will be able to tell if your code is
running with errors.
If your application is using more than 1 database at the same time, look at
the "Cross-Database Ownership Chaining" in books online. This was a change
introduced by SP3.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Epprecht Consulting (PTY) LTD
Johannesburg, South Africa
Mobile: +27-82-552-0268
IM: mike@.NOSPAMepprecht.net
Specialist SQL Server Solutions and Consulting
"Tomas" <anonymous@.discussions.microsoft.com> wrote in message
news:01a101c3d429$41ba6c70$a001280a@.phx.gbl...
> Hi , My name is Tomas
> I work for a Software Developing Company ,
> Our applications has been written and developed by
> Power Builder 5.0 , and they can work with Sql Server 2000
> normally , but when I install service pack 3.0 on our sql
> server after that our application can't work with sql
> server correctly , for example some queries doesn't run
> and there is no result for them after installing service
> pack 3,,
> Please Help Me
>|||you should really consider upgrading powerbuilder. when did 5.0 come
out, the mid 90's?
Tomas wrote:
> Hi , My name is Tomas
> I work for a Software Developing Company ,
> Our applications has been written and developed by
> Power Builder 5.0 , and they can work with Sql Server 2000
> normally , but when I install service pack 3.0 on our sql
> server after that our application can't work with sql
> server correctly , for example some queries doesn't run
> and there is no result for them after installing service
> pack 3,,
> Please Help Me|||Especially since PB5 is no longer supported much less supported for use with
SQL2000. We're using PB9 and it works great with SQL2K.
Mike Kruchten
"ch" <ch@.dontemailme.com> wrote in message
news:3FFB0C2E.A65CF347@.dontemailme.com...
> you should really consider upgrading powerbuilder. when did 5.0 come
> out, the mid 90's?
>
> Tomas wrote:
> > Hi , My name is Tomas
> > I work for a Software Developing Company ,
> > Our applications has been written and developed by
> > Power Builder 5.0 , and they can work with Sql Server 2000
> > normally , but when I install service pack 3.0 on our sql
> > server after that our application can't work with sql
> > server correctly , for example some queries doesn't run
> > and there is no result for them after installing service
> > pack 3,,
> > Please Help Me
>
I work for a Software Developing Company ,
Our applications has been written and developed by
Power Builder 5.0 , and they can work with Sql Server 2000
normally , but when I install service pack 3.0 on our sql
server after that our application can't work with sql
server correctly , for example some queries doesn't run
and there is no result for them after installing service
pack 3,,
Please Help MeHi
First thing you need to do is run profiler on the server to see what queries
are being submitted. then pick some of those queries and run them in Query
Analyzer. In that situation, you will be able to tell if your code is
running with errors.
If your application is using more than 1 database at the same time, look at
the "Cross-Database Ownership Chaining" in books online. This was a change
introduced by SP3.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Epprecht Consulting (PTY) LTD
Johannesburg, South Africa
Mobile: +27-82-552-0268
IM: mike@.NOSPAMepprecht.net
Specialist SQL Server Solutions and Consulting
"Tomas" <anonymous@.discussions.microsoft.com> wrote in message
news:01a101c3d429$41ba6c70$a001280a@.phx.gbl...
> Hi , My name is Tomas
> I work for a Software Developing Company ,
> Our applications has been written and developed by
> Power Builder 5.0 , and they can work with Sql Server 2000
> normally , but when I install service pack 3.0 on our sql
> server after that our application can't work with sql
> server correctly , for example some queries doesn't run
> and there is no result for them after installing service
> pack 3,,
> Please Help Me
>|||you should really consider upgrading powerbuilder. when did 5.0 come
out, the mid 90's?
Tomas wrote:
> Hi , My name is Tomas
> I work for a Software Developing Company ,
> Our applications has been written and developed by
> Power Builder 5.0 , and they can work with Sql Server 2000
> normally , but when I install service pack 3.0 on our sql
> server after that our application can't work with sql
> server correctly , for example some queries doesn't run
> and there is no result for them after installing service
> pack 3,,
> Please Help Me|||Especially since PB5 is no longer supported much less supported for use with
SQL2000. We're using PB9 and it works great with SQL2K.
Mike Kruchten
"ch" <ch@.dontemailme.com> wrote in message
news:3FFB0C2E.A65CF347@.dontemailme.com...
> you should really consider upgrading powerbuilder. when did 5.0 come
> out, the mid 90's?
>
> Tomas wrote:
> > Hi , My name is Tomas
> > I work for a Software Developing Company ,
> > Our applications has been written and developed by
> > Power Builder 5.0 , and they can work with Sql Server 2000
> > normally , but when I install service pack 3.0 on our sql
> > server after that our application can't work with sql
> > server correctly , for example some queries doesn't run
> > and there is no result for them after installing service
> > pack 3,,
> > Please Help Me
>
Other ways to execute Integration package?
Hi all,
I am just wondering is there any other ways to execute an integration service package other than using sql server agent, dos command and manually execute the package in BIDS? I am thinking of running the package on web, is this possible?
What I am trying to do is let user to run the integration service when they need to, so instead using SQL Server Management Studio to run the task being set in SQL Server Agent, I am thinking of something where user can log into a website (like the report server) and then run the integration, so that the data for the report server's reports are being update. Please help out if any know a solution to it. Thanks in advance.
I am just wondering is there any other ways to execute an integration service package other than using sql server agent, dos command and manually execute the package in BIDS? I am thinking of running the package on web, is this possible?
What I am trying to do is let user to run the integration service when they need to, so instead using SQL Server Management Studio to run the task being set in SQL Server Agent, I am thinking of something where user can log into a website (like the report server) and then run the integration, so that the data for the report server's reports are being update. Please help out if any know a solution to it. Thanks in advance.
Daren
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=110020&SiteID=1
Monday, March 12, 2012
OT: SQLCLR/Broker etc
Sorry for the Off-Topic post, but is this now the recommended place to post
re SQL 2005 new development features; SQLCLR, Service Broker etc?
Niels
--
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********Niels Berglund <nielsb@.no-spam.develop.com> wrote in
news:Xns971267D34D552nielsbdevelopcom@.20
7.46.248.16:
> Sorry for the Off-Topic post, but is this now the recommended place to
> post re SQL 2005 new development features; SQLCLR, Service Broker etc?
As SQL Server 2005 has been released, I would definitely think so
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging|||"Ole Kristian Bangs" <olekristian.bangas@.masterminds.no> wrote in
news:Xns971281D712DFolekristianbangaas@.2
07.46.248.16:
> Niels Berglund <nielsb@.no-spam.develop.com> wrote in
> news:Xns971267D34D552nielsbdevelopcom@.20
7.46.248.16:
>
> As SQL Server 2005 has been released, I would definitely think so
>
Thanks!
Niels|||Hello Ole and Niels,
> As SQL Server 2005 has been released, I would definitely think so
At the MVP summit, two new NGs specifically for these topics were discussed
and I believe MS said they'd be getting them set up. I've asked a few times
about it since RTM, looks like its time to go directly to the source for
an answer...
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
re SQL 2005 new development features; SQLCLR, Service Broker etc?
Niels
--
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********Niels Berglund <nielsb@.no-spam.develop.com> wrote in
news:Xns971267D34D552nielsbdevelopcom@.20
7.46.248.16:
> Sorry for the Off-Topic post, but is this now the recommended place to
> post re SQL 2005 new development features; SQLCLR, Service Broker etc?
As SQL Server 2005 has been released, I would definitely think so
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging|||"Ole Kristian Bangs" <olekristian.bangas@.masterminds.no> wrote in
news:Xns971281D712DFolekristianbangaas@.2
07.46.248.16:
> Niels Berglund <nielsb@.no-spam.develop.com> wrote in
> news:Xns971267D34D552nielsbdevelopcom@.20
7.46.248.16:
>
> As SQL Server 2005 has been released, I would definitely think so
>
Thanks!
Niels|||Hello Ole and Niels,
> As SQL Server 2005 has been released, I would definitely think so
At the MVP summit, two new NGs specifically for these topics were discussed
and I believe MS said they'd be getting them set up. I've asked a few times
about it since RTM, looks like its time to go directly to the source for
an answer...
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
osql versus stored procedural using in a web service
I have many problems with the stored procedural used at web service (and
this′s used by aspx page) because i get a timeout expired or this stored
procedural is very very very slowly (more than 30 minutes). Although if i use
the console and osql this stored procedural runs very very quickly (some
seconds).
Can i do somethings?
Regards, and thank very much,
Hello,
Perheaps you can try with SET FORCEPLAN
to be sure that sql server will take the correct plan
Marc Allard
Allcomp
"fravelgueAThotmailDOTcom"
<fravelgueAThotmailDOTcom@.discussions.microsoft.co m> a crit dans le message
de news: E02F7AAB-7EAE-4CA7-80B1-5A88FB2A85EF@.microsoft.com...
>I have many problems with the stored procedural used at web service (and
> thiss used by aspx page) because i get a timeout expired or this stored
> procedural is very very very slowly (more than 30 minutes). Although if i
> use
> the console and osql this stored procedural runs very very quickly (some
> seconds).
> Can i do somethings?
> Regards, and thank very much,
|||hi,
"Allcomp" <fa097770@.nospam.skynet.be> ha scritto nel messaggio
news:uaPZusetEHA.2300@.TK2MSFTNGP09.phx.gbl
> Hello,
> Perheaps you can try with SET FORCEPLAN
> to be sure that sql server will take the correct plan
SET FORCEPLAN will instuct the query optimizer to execute the join
condition(s) in the (manual) order they are presented by the developer, and
I'd be very carefull in it's use...
as oSql.exe executes the very same query in short time, I'd rather think the
problem should be bound to the web service it self or elsewhere in the
connection...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||"Andrea Montanari" wrote:
> hi,
> "Allcomp" <fa097770@.nospam.skynet.be> ha scritto nel messaggio
> news:uaPZusetEHA.2300@.TK2MSFTNGP09.phx.gbl
> SET FORCEPLAN will instuct the query optimizer to execute the join
> condition(s) in the (manual) order they are presented by the developer, and
> I'd be very carefull in it's use...
> as oSql.exe executes the very same query in short time, I'd rather think the
> problem should be bound to the web service it self or elsewhere in the
> connection...
Can you help me more?
I have changed timeout of web.config and and i set the connect timeout,
but i don′t know how i can do it
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi,
"fravelgueAThotmailDOTcom"
> Can you help me more?
> I have changed timeout of web.config and and i set the connect
> timeout, but i don′t know how i can do it
actually not... I'm very bad on web tihgs =;-D
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
this′s used by aspx page) because i get a timeout expired or this stored
procedural is very very very slowly (more than 30 minutes). Although if i use
the console and osql this stored procedural runs very very quickly (some
seconds).
Can i do somethings?
Regards, and thank very much,
Hello,
Perheaps you can try with SET FORCEPLAN
to be sure that sql server will take the correct plan
Marc Allard
Allcomp
"fravelgueAThotmailDOTcom"
<fravelgueAThotmailDOTcom@.discussions.microsoft.co m> a crit dans le message
de news: E02F7AAB-7EAE-4CA7-80B1-5A88FB2A85EF@.microsoft.com...
>I have many problems with the stored procedural used at web service (and
> thiss used by aspx page) because i get a timeout expired or this stored
> procedural is very very very slowly (more than 30 minutes). Although if i
> use
> the console and osql this stored procedural runs very very quickly (some
> seconds).
> Can i do somethings?
> Regards, and thank very much,
|||hi,
"Allcomp" <fa097770@.nospam.skynet.be> ha scritto nel messaggio
news:uaPZusetEHA.2300@.TK2MSFTNGP09.phx.gbl
> Hello,
> Perheaps you can try with SET FORCEPLAN
> to be sure that sql server will take the correct plan
SET FORCEPLAN will instuct the query optimizer to execute the join
condition(s) in the (manual) order they are presented by the developer, and
I'd be very carefull in it's use...
as oSql.exe executes the very same query in short time, I'd rather think the
problem should be bound to the web service it self or elsewhere in the
connection...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||"Andrea Montanari" wrote:
> hi,
> "Allcomp" <fa097770@.nospam.skynet.be> ha scritto nel messaggio
> news:uaPZusetEHA.2300@.TK2MSFTNGP09.phx.gbl
> SET FORCEPLAN will instuct the query optimizer to execute the join
> condition(s) in the (manual) order they are presented by the developer, and
> I'd be very carefull in it's use...
> as oSql.exe executes the very same query in short time, I'd rather think the
> problem should be bound to the web service it self or elsewhere in the
> connection...
Can you help me more?
I have changed timeout of web.config and and i set the connect timeout,
but i don′t know how i can do it
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi,
"fravelgueAThotmailDOTcom"
> Can you help me more?
> I have changed timeout of web.config and and i set the connect
> timeout, but i don′t know how i can do it
actually not... I'm very bad on web tihgs =;-D
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Saturday, February 25, 2012
OS Service pack
Is there a way from within a SQL Script to determine what OS service
pack is installed other than SELECT @.@.VERSION? I am trying to
automate a script based upon the OS service pack installed (if any),
and having to somehow parse the results of @.@.VERSION seems unreliable.
Any ideas?
Brandon
--
"In the beginning the universe was created. This has made a lot of
people very angry, and has been widely regarded as a bad move." -
Douglas Noel Adams (1952-2001)Have a look at SERVERPROPERTY and xp_msver.
Off the top of my head I think you need to run :- xp_msver windowsversion
--
HTH
Ryan Waight, MCDBA, MCSE
"Brandon Lilly" <brandon.lilly@.nospam_medevolve.com> wrote in message
news:eZw5EB3kDHA.3612@.TK2MSFTNGP11.phx.gbl...
> Is there a way from within a SQL Script to determine what OS service
> pack is installed other than SELECT @.@.VERSION? I am trying to
> automate a script based upon the OS service pack installed (if any),
> and having to somehow parse the results of @.@.VERSION seems unreliable.
> Any ideas?
> Brandon
> --
> "In the beginning the universe was created. This has made a lot of
> people very angry, and has been widely regarded as a bad move." -
> Douglas Noel Adams (1952-2001)
>|||You can get the OS information by running the
xp_msver 'WindowsVersion' extended stored procedure.
Like so...
CREATE TABLE #windows_info
(
idx INT
, name NVARCHAR(128)
, internal_value INT
, character_value NVARCHAR(255)
)
INSERT #windows_info
EXECUTE xp_msver 'WindowsVersion'
SELECT * FROM #windows_info
I don't know if this is easier than parsing the @.@.VERSION
string though.
Tim
>--Original Message--
>Is there a way from within a SQL Script to determine
what OS service
>pack is installed other than SELECT @.@.VERSION? I am
trying to
>automate a script based upon the OS service pack
installed (if any),
>and having to somehow parse the results of @.@.VERSION
seems unreliable.
>Any ideas?
>Brandon
>--
>"In the beginning the universe was created. This has
made a lot of
>people very angry, and has been widely regarded as a bad
move." -
>Douglas Noel Adams (1952-2001)
>
>.
>|||You can get it from the registry, using the undocumented
xp_regread. Try:
exec
master..xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWARE\Microsof
t\Windows NT\CurrentVersion', 'CSDVersion'
If your OS is NT 4, this won't distinguish between SP6 and
SP6a.
HTH
Vern
>--Original Message--
>Is there a way from within a SQL Script to determine what
OS service
>pack is installed other than SELECT @.@.VERSION? I am
trying to
>automate a script based upon the OS service pack
installed (if any),
>and having to somehow parse the results of @.@.VERSION
seems unreliable.
>Any ideas?
>Brandon
>--
>"In the beginning the universe was created. This has
made a lot of
>people very angry, and has been widely regarded as a bad
move." -
>Douglas Noel Adams (1952-2001)
>
>.
>
pack is installed other than SELECT @.@.VERSION? I am trying to
automate a script based upon the OS service pack installed (if any),
and having to somehow parse the results of @.@.VERSION seems unreliable.
Any ideas?
Brandon
--
"In the beginning the universe was created. This has made a lot of
people very angry, and has been widely regarded as a bad move." -
Douglas Noel Adams (1952-2001)Have a look at SERVERPROPERTY and xp_msver.
Off the top of my head I think you need to run :- xp_msver windowsversion
--
HTH
Ryan Waight, MCDBA, MCSE
"Brandon Lilly" <brandon.lilly@.nospam_medevolve.com> wrote in message
news:eZw5EB3kDHA.3612@.TK2MSFTNGP11.phx.gbl...
> Is there a way from within a SQL Script to determine what OS service
> pack is installed other than SELECT @.@.VERSION? I am trying to
> automate a script based upon the OS service pack installed (if any),
> and having to somehow parse the results of @.@.VERSION seems unreliable.
> Any ideas?
> Brandon
> --
> "In the beginning the universe was created. This has made a lot of
> people very angry, and has been widely regarded as a bad move." -
> Douglas Noel Adams (1952-2001)
>|||You can get the OS information by running the
xp_msver 'WindowsVersion' extended stored procedure.
Like so...
CREATE TABLE #windows_info
(
idx INT
, name NVARCHAR(128)
, internal_value INT
, character_value NVARCHAR(255)
)
INSERT #windows_info
EXECUTE xp_msver 'WindowsVersion'
SELECT * FROM #windows_info
I don't know if this is easier than parsing the @.@.VERSION
string though.
Tim
>--Original Message--
>Is there a way from within a SQL Script to determine
what OS service
>pack is installed other than SELECT @.@.VERSION? I am
trying to
>automate a script based upon the OS service pack
installed (if any),
>and having to somehow parse the results of @.@.VERSION
seems unreliable.
>Any ideas?
>Brandon
>--
>"In the beginning the universe was created. This has
made a lot of
>people very angry, and has been widely regarded as a bad
move." -
>Douglas Noel Adams (1952-2001)
>
>.
>|||You can get it from the registry, using the undocumented
xp_regread. Try:
exec
master..xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWARE\Microsof
t\Windows NT\CurrentVersion', 'CSDVersion'
If your OS is NT 4, this won't distinguish between SP6 and
SP6a.
HTH
Vern
>--Original Message--
>Is there a way from within a SQL Script to determine what
OS service
>pack is installed other than SELECT @.@.VERSION? I am
trying to
>automate a script based upon the OS service pack
installed (if any),
>and having to somehow parse the results of @.@.VERSION
seems unreliable.
>Any ideas?
>Brandon
>--
>"In the beginning the universe was created. This has
made a lot of
>people very angry, and has been widely regarded as a bad
move." -
>Douglas Noel Adams (1952-2001)
>
>.
>
Subscribe to:
Posts (Atom)