Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Thursday, March 29, 2012

Default language and dates

I've just moved servers - WK3 to WK3 - installed SQLserver 2005 and uploaded the database. Code base has not changed but now I'm getting

"String was not recognized as a valid DateTime.Couldn't store <21/07/2006>" . I suspect its to do with the default language , but although the default is English (United States) as in my last server, I have set the language in Advanced settings to be British English. I can't see any difference between the settings and my last server. I'm British BTW .

I also ran

EXEC @.ret=sp_defaultlanguage'sa','British English'

as the only login is sa . WK3 is itself set to English (United Kingdom) - I thought SQL 2005 would inherit this setting? Any help would be much appreciated.

ashaig:

"String was not recognized as a valid DateTime.Couldn't store <21/07/2006>" . I suspect its to do with the default language , but although the default is English (United States) as in my last server, I have set the language in Advanced settings to be British English. I can't see any difference between the settings and my last server. I'm British BTW .

Yes it may be related to the language setting. Actually there are some differences between English (United States) and British English, including date format. You can use the following command to check details of all language settings:

EXEC sp_helplanguage

From the result we can see the dateformat of us_en is mdy, while the dateformate of British is dmy.

ashaig:

as the only login is sa . WK3 is itself set to English (United Kingdom) - I thought SQL 2005 would inherit this setting? Any help would be much appreciated.

You can change the default language setting of a SQL instance by using such command:

EXEC sp_configure 'default language',0
reconfigure with override

Where 0 is the id of the language. Here are some useful links about the language setting in SQL Server:

Default Language option:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_3xny.asp

sp_configure:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ca-cz_0put.asp

sql

Default Instance

I have two instances running one is on SqlServer 7 and second one is on
SqlServer 2000 (default). I want to make the default instance to SqlServer 7
, how can I ?
Thanks
Noor
hi Noor,
"Noor" <noor@.ngsol.com> ha scritto nel messaggio
news:OELbeuZaEHA.972@.TK2MSFTNGP12.phx.gbl...
> I have two instances running one is on SqlServer 7 and second one is on
> SqlServer 2000 (default). I want to make the default instance to SqlServer
7
> , how can I ?
AFAIK, in a scenario where both a SQL Server 7.0 and a SQL Server 2000 are
installed on the same computer, only the SQL Server 7.0 can be the default
instance, as SQL Server 7.0 has not been designed to support named
instance...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Okie now let's assume I have two instances running one is on SqlServer
2000 - SQL1 and second one is on
SqlServer 2000 - SQL2 (default). I want to make the default instance to
SQL1.
how can I ?
Thanks
NOOR
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:2lkvfdFe02fhU1@.uni-berlin.de...[vbcol=seagreen]
> hi Noor,
> "Noor" <noor@.ngsol.com> ha scritto nel messaggio
> news:OELbeuZaEHA.972@.TK2MSFTNGP12.phx.gbl...
SqlServer
> 7
> AFAIK, in a scenario where both a SQL Server 7.0 and a SQL Server 2000 are
> installed on the same computer, only the SQL Server 7.0 can be the default
> instance, as SQL Server 7.0 has not been designed to support named
> instance...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||Hi,
You cant change the Named Instance of SQL Server to a Default instance. The
only solution is to reinstall
the SQL Server both instances.
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:#XQtMSiaEHA.1656@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Okie now let's assume I have two instances running one is on SqlServer
> 2000 - SQL1 and second one is on
> SqlServer 2000 - SQL2 (default). I want to make the default instance to
> SQL1.
> how can I ?
> Thanks
> NOOR
> "Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
> news:2lkvfdFe02fhU1@.uni-berlin.de...
on[vbcol=seagreen]
> SqlServer
are[vbcol=seagreen]
default
>
|||Right Thanks, Let's assume I already have Default Instance running on my
system and now I am going to install new Instance and at the run time I
wanna set it as a default Instance so Can I do this or I have to remove the
Default Instance first ?
Thanks
Noor
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:uFmbaejaEHA.3596@.tk2msftngp13.phx.gbl...
> Hi,
> You cant change the Named Instance of SQL Server to a Default instance.
The[vbcol=seagreen]
> only solution is to reinstall
> the SQL Server both instances.
>
> --
> Thanks
> Hari
> MCDBA
> "Noor" <noor@.ngsol.com> wrote in message
> news:#XQtMSiaEHA.1656@.TK2MSFTNGP09.phx.gbl...
> on
> are
> default
visual
>
|||Hi,
No, you cant do that. If you have a default instance already running then
you can only install a named instance. I feel that "default " check box will
be disabled.
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:u9JQQkjaEHA.1248@.TK2MSFTNGP11.phx.gbl...
> Right Thanks, Let's assume I already have Default Instance running on my
> system and now I am going to install new Instance and at the run time I
> wanna set it as a default Instance so Can I do this or I have to remove
the[vbcol=seagreen]
> Default Instance first ?
> Thanks
> Noor
> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
> news:uFmbaejaEHA.3596@.tk2msftngp13.phx.gbl...
> The
to[vbcol=seagreen]
is[vbcol=seagreen]
2000
> visual
>
|||but you could fool network clients into thinking it was the default instance
by changing the network listening endpoints (i.e. stop your default instance
and have your named instance listen on tcp port 1433, for example), and have
clients connect up to "servername,1433".
It's a hack but it might work for what you want to do.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:O4llMrkaEHA.2812@.tk2msftngp13.phx.gbl...
> Hi,
> No, you cant do that. If you have a default instance already running then
> you can only install a named instance. I feel that "default " check box
> will
> be disabled.
> --
> Thanks
> Hari
> MCDBA
> "Noor" <noor@.ngsol.com> wrote in message
> news:u9JQQkjaEHA.1248@.TK2MSFTNGP11.phx.gbl...
> the
> to
> is
> 2000
>

Sunday, March 25, 2012

Default database location?

I have the default location for Data setup to be G:\Microsoft SQL
Server\Data (Database Settings under server properties).
But, when I invoke "Copy Database" from Management, it places the data on
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA.
Why doesn't the Copy Database Wizard respect my setting?
OlavOlav
It probably takes it from a model database
SELECT REPLACE(filename, 'model.mdf', '') FROM master..SysDatabases
WHERE [name] = 'model'
"Olav" <x@.y.com> wrote in message
news:%23xMVx0WXGHA.1348@.TK2MSFTNGP05.phx.gbl...
>I have the default location for Data setup to be G:\Microsoft SQL
>Server\Data (Database Settings under server properties).
> But, when I invoke "Copy Database" from Management, it places the data on
> C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA.
> Why doesn't the Copy Database Wizard respect my setting?
> Olav
>|||I'm confused!
Why are there multiple places to configure the same kind of option?
Olav
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uUaZJ8WXGHA.4248@.TK2MSFTNGP05.phx.gbl...
> Olav
> It probably takes it from a model database
> SELECT REPLACE(filename, 'model.mdf', '') FROM master..SysDatabases
> WHERE [name] = 'model'
>
>
>
> "Olav" <x@.y.com> wrote in message
> news:%23xMVx0WXGHA.1348@.TK2MSFTNGP05.phx.gbl...
>|||You can view the default directory with the following :-
exec master..xp_regread
'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft
\MSSQLServer\Setup','SQLDataRoot'
It can be changed with EnterPrise Manager, but... this change may not stick
as you need sufficient permsion to write to registry. If you find it isn't
saving you will need to logon to the box as administrator.
HTH. Ryan
"Olav" <x@.y.com> wrote in message
news:%23xMVx0WXGHA.1348@.TK2MSFTNGP05.phx.gbl...
>I have the default location for Data setup to be G:\Microsoft SQL
>Server\Data (Database Settings under server properties).
> But, when I invoke "Copy Database" from Management, it places the data on
> C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA.
> Why doesn't the Copy Database Wizard respect my setting?
> Olav
>|||This is the result I got from the query on that machine:
RegQueryValueEx() returned error 2, 'The system cannot find the file
specified.'
Msg 22001, Level 1, State 1
(0 row(s) affected)
What does this indicate?
Olav
"Ryan" <Ryan_Waight@.nospam.hotmail.com> wrote in message
news:uDgpjEXXGHA.1196@.TK2MSFTNGP03.phx.gbl...

> You can view the default directory with the following :-
> exec master..xp_regread
> 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft
\MSSQLServer\Setup','SQLDataRoot'
> It can be changed with EnterPrise Manager, but... this change may not
> stick as you need sufficient permsion to write to registry. If you find it
> isn't saving you will need to logon to the box as administrator.
> --
> HTH. Ryan
>
> "Olav" <x@.y.com> wrote in message
> news:%23xMVx0WXGHA.1348@.TK2MSFTNGP05.phx.gbl...
>|||I checked in the Registry and it shows the following value for that key:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL
In SQL Server Management Studio it shows:
G:\Microsoft SQL Server\Data
I'm still confused!
Why are there two different values for the same thing stored?
I'm running Management Studio logged in as an Administrator, so there should
be no problem writing to the registry.
Olav
"Ryan" <Ryan_Waight@.nospam.hotmail.com> wrote in message
news:uDgpjEXXGHA.1196@.TK2MSFTNGP03.phx.gbl...
> You can view the default directory with the following :-
> exec master..xp_regread
> 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft
\MSSQLServer\Setup','SQLDataRoot'
> It can be changed with EnterPrise Manager, but... this change may not
> stick as you need sufficient permsion to write to registry. If you find it
> isn't saving you will need to logon to the box as administrator.
> --
> HTH. Ryan
>
> "Olav" <x@.y.com> wrote in message
> news:%23xMVx0WXGHA.1348@.TK2MSFTNGP05.phx.gbl...
>

Thursday, March 22, 2012

Default charset in sqlserver 2000? / jtds

Hi,

I am writing to a text column in my SQL Server 2000 database. The text
comes from a web form in my java web application, where the character
encoding is ISO-8859-1. (I have no control over the charset, my app is
a plugin inside another app.)
Characters such as (ascii 128) and '(ascii 146) are inserted into
the db as '?'.

I'm connecting using the free jtds driver, and I'm not specifying any
details about charsets in my usage of the driver.

Can anyone tell me what the default charset in sqlserver 2000 is?
Should I be specifying this charset when using my driver?
Thanks.downlode@.gmail.com wrote:
> Hi,
> I am writing to a text column in my SQL Server 2000 database. The text
> comes from a web form in my java web application, where the character
> encoding is ISO-8859-1. (I have no control over the charset, my app is
> a plugin inside another app.)
> Characters such as (ascii 128) and '(ascii 146) are inserted into
> the db as '?'.
> I'm connecting using the free jtds driver, and I'm not specifying any
> details about charsets in my usage of the driver.
> Can anyone tell me what the default charset in sqlserver 2000 is?
> Should I be specifying this charset when using my driver?
> Thanks.

You probably want to use ntext instead of text, nvarchar instead of
varchar, etc.|||(downlode@.gmail.com) writes:
> I am writing to a text column in my SQL Server 2000 database. The text
> comes from a web form in my java web application, where the character
> encoding is ISO-8859-1. (I have no control over the charset, my app is
> a plugin inside another app.)
> Characters such as ?(ascii 128) and '(ascii 146) are inserted into
> the db as '?'.

Hm, in iso-8859-1, the slots 128-159 not graphic characters. In Windows-
1252, Microsoft's extension of 8859-1, some of them are indeed graphic.

> I'm connecting using the free jtds driver, and I'm not specifying any
> details about charsets in my usage of the driver.
> Can anyone tell me what the default charset in sqlserver 2000 is?

No, because this depends on the regional settings of the machine. For
instance, if I install SQL Server on my machine, and do not make any
selection, I will get Finnish_Swedish_CI_AS, which implies code page
1252. People in Poland are likely to get Polish_CI_AS, which implies
code page 1250. And that's only the default. This can be overridden
at installation. And then the collation can be set independently by
column.

So start doing

SELECT serverproperty('Collation') -- Server default collation.
SELECT databasepropertyex('db', 'Collation') -- Database default

And then use sp_help to determine the coilations of the columns you
are working with. If you don't know which code page a certain collation
has, there is a function Collationproperty() for this.

If the columns are of different code pages, you will have to use
Unicode somewhere on the way, and as Trevor said, ntext nvarchar are
probably better options.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi,
sorry for the late follow up to this.
My database has the same collation throughout -
SQL_Latin1_General_CP1_CI_AS
The columns share this collation.
Even when I use a preparedStatement, ensuring that the outgoing text is
treated as Unicode by the free jtds driver, I get the same problems.

I am stumped by this one.

If I change my text column to an ntext column, will this affect the
existing entries?
Thanks,
Mike|||(downlode@.gmail.com) writes:
> sorry for the late follow up to this.
> My database has the same collation throughout -
> SQL_Latin1_General_CP1_CI_AS
> The columns share this collation.
> Even when I use a preparedStatement, ensuring that the outgoing text is
> treated as Unicode by the free jtds driver, I get the same problems.
> I am stumped by this one.

Since SQL_Latin1_General_CP1_CI_AS is share code page with iso-8859-1,
it's indeed a little funny. But as I noted in my previous post, the
characters you have problem with are not in iso-8859-1 - these code
points are control characters to 8859-1. In Windows Latin-1 they are
indeed printable characters.

My guess is that the free jtds takes a strict definiton of what is
8859-1. But I don't it, so you should inquire in a forum for that driver.

> If I change my text column to an ntext column, will this affect the
> existing entries?

No.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql

Default base

Hi,

On first sqlserver install, what's the default base to test connect
with JDBC please ?
Is it "system" base with sa/master password ?

Thanks,

--
Jean-Luc M."Jean-Luc M." <alphomega@.free.fr> wrote in message
news:mn.5bb97d537c60e520.28556@.free.fr...
> Hi,
> On first sqlserver install, what's the default base to test connect with
> JDBC please ?
> Is it "system" base with sa/master password ?
> Thanks,
> --
> Jean-Luc M.

By default, you are 'in' the master database when you connect to MSSQL. If
you have just installed MSSQL, then you can either connect with the sa
account if you chose mixed mode authentication, or a Windows user in the
local administrators group is you chose Windows-only authentication. But I
guess if you're using JDBC, then you'll probably need to use the sa account.

Simon|||>
> By default, you are 'in' the master database when you connect to MSSQL. If
> you have just installed MSSQL, then you can either connect with the sa
> account if you chose mixed mode authentication, or a Windows user in the
> local administrators group is you chose Windows-only authentication. But I
> guess if you're using JDBC, then you'll probably need to use the sa account.

Thanks a lot !

--
Jean-Luc M.

Wednesday, March 21, 2012

Dedicaced or shared connection ?

Exit it in sqlserver notion of shared connection or dedicaced connection like there is exist in oracle ?
Exit it a part of memory (like PGA in oracle) who exist just for the connections ?
Else what are constitued the memory in sqlserver ?
ThanksThe concepts are completely different, and they are implemented in different ways, but the answer to both of the questions you've posed are probably yes. If you can come up with a more specific question, I'm sure that someone here can answer it in a more specific way.

-PatP

Monday, March 19, 2012

decrypt password

Hi,
Sql server 2000
We have a column called password in sqlserver table.
which is encrypted. we have forgot the password. and want to decrypt it. for which i used cast and convert functions but in vain.
pls help me.!!!!!!!!!
Regards,
TIAYou are probably out of luck. If it could be decrypted, it wouldn't be very secure, would it?

What encryption method was used?

Can you delete the passwords or manually set it to a known value?

blindman|||Why is the password needed ? You might have other options - however, knowing how is was encrypted would probably help you find a solution quicker.

Sunday, March 11, 2012

Declare dynamicly variable

I'd like to know, if there is a possibility reference declare SQLServer dynamically?

For example, I've tried execute this query(under), but I received this message (Server: Msg 137, Level 15, State 1, Line 6
Must declare the variable '@.t1'.):

declare @.Frase varchar(50)
set @.Frase = 'declare @.t1 varchar(10), @.t2 int'
exec (@.Frase)
select @.t1 = 'AAAAA'
select @.t2 = 1000
Print @.t1
Print @.t2

ThanksMay be because Dynamic SQL is executed/Parsed last by the query Parser and the variable declared are within the statement which is limited to the "exec" and is considered a seperate stored procedure outside of main query|||The EXEC statement executes within its own scope, outside of the procedure that calls it. Therefore, EXEC cannot share variables with its calling procedure. As soon as EXEC completes, the variables go out of scope and "poof", they disappear. Temporary tables, however, are connection specific and can be referenced within EXEC statements.

blindman

Friday, February 24, 2012

Debugging SQL Server 2000

I'm using SQL Server 2000 for about six months and never has a problems, but since three day ago sqlserver is freezing the server ( Win 2000 advanced server ) with no apparent reason. We're sure that is SQLServer who's causing the problem because the serv
er freezes when we are inserting records to a table.
It throws no errors... just a timeout and we have to restart the computer.
Table log is not full.
Sql Server Logs says nothing...
Is there any form to log all activities of the sql server? How can I found the cause of this problem?
Any ideas?
Thanks.
Tools you can use when this happens:
sp_who2 to check blocking and runnable processes
profiler to see what's going on
sp_lock to see what tables are being locked
perfmon to monitor resource: cpu, memory, disk I/O, etc.
"MiCiudadDevs" <MiCiudadDevs@.discussions.microsoft.com> wrote in message
news:198F91B3-E85F-456A-855D-DAE5E4D088DA@.microsoft.com...
> I'm using SQL Server 2000 for about six months and never has a problems,
but since three day ago sqlserver is freezing the server ( Win 2000 advanced
server ) with no apparent reason. We're sure that is SQLServer who's causing
the problem because the server freezes when we are inserting records to a
table.
> It throws no errors... just a timeout and we have to restart the computer.
> Table log is not full.
> Sql Server Logs says nothing...
> Is there any form to log all activities of the sql server? How can I found
the cause of this problem?
> Any ideas?
> Thanks.
|||Try using the SQL Server Profiler to monitor all the SQL statements and
writing the output to a table.
"MiCiudadDevs" <MiCiudadDevs@.discussions.microsoft.com> wrote in message
news:198F91B3-E85F-456A-855D-DAE5E4D088DA@.microsoft.com...
> I'm using SQL Server 2000 for about six months and never has a problems,
but since three day ago sqlserver is freezing the server ( Win 2000 advanced
server ) with no apparent reason. We're sure that is SQLServer who's causing
the problem because the server freezes when we are inserting records to a
table.
> It throws no errors... just a timeout and we have to restart the computer.
> Table log is not full.
> Sql Server Logs says nothing...
> Is there any form to log all activities of the sql server? How can I found
the cause of this problem?
> Any ideas?
> Thanks.

Debugging SQL Server 2000

I'm using SQL Server 2000 for about six months and never has a problems, but
since three day ago sqlserver is freezing the server ( Win 2000 advanced se
rver ) with no apparent reason. We're sure that is SQLServer who's causing t
he problem because the serv
er freezes when we are inserting records to a table.
It throws no errors... just a timeout and we have to restart the computer.
Table log is not full.
Sql Server Logs says nothing...
Is there any form to log all activities of the sql server? How can I found t
he cause of this problem?
Any ideas?
Thanks.Tools you can use when this happens:
sp_who2 to check blocking and runnable processes
profiler to see what's going on
sp_lock to see what tables are being locked
perfmon to monitor resource: cpu, memory, disk I/O, etc.
"MiCiudadDevs" <MiCiudadDevs@.discussions.microsoft.com> wrote in message
news:198F91B3-E85F-456A-855D-DAE5E4D088DA@.microsoft.com...
> I'm using SQL Server 2000 for about six months and never has a problems,
but since three day ago sqlserver is freezing the server ( Win 2000 advanced
server ) with no apparent reason. We're sure that is SQLServer who's causing
the problem because the server freezes when we are inserting records to a
table.
> It throws no errors... just a timeout and we have to restart the computer.
> Table log is not full.
> Sql Server Logs says nothing...
> Is there any form to log all activities of the sql server? How can I found
the cause of this problem?
> Any ideas?
> Thanks.|||Try using the SQL Server Profiler to monitor all the SQL statements and
writing the output to a table.
"MiCiudadDevs" <MiCiudadDevs@.discussions.microsoft.com> wrote in message
news:198F91B3-E85F-456A-855D-DAE5E4D088DA@.microsoft.com...
> I'm using SQL Server 2000 for about six months and never has a problems,
but since three day ago sqlserver is freezing the server ( Win 2000 advanced
server ) with no apparent reason. We're sure that is SQLServer who's causing
the problem because the server freezes when we are inserting records to a
table.
> It throws no errors... just a timeout and we have to restart the computer.
> Table log is not full.
> Sql Server Logs says nothing...
> Is there any form to log all activities of the sql server? How can I found
the cause of this problem?
> Any ideas?
> Thanks.

Sunday, February 19, 2012

Debugging my sprock

From this msg im guessing that SQLE.DLL nee to be installed on my SQLServer box, is that correct? Where would i find this dll?

Server: Msg 508, Level 16, State 1, Procedure sp_sdidebug, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to connect to debugger on APOLLO-ClintonSQL (Error = 0x800401f3). Ensure that client-side components, such as SQLLE.DLL, are installed and registered on PUR-CO-Clinton2. Debugging disabled for connection 59.Start here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servtools_5cfm.asp).

-PatP

Friday, February 17, 2012

Debug SQL User Functions

Does anyone know if there's a way to debug T-SQL user functions using sql
server 2000 sp3 on Windows Small Business Server 2003 from a client computer
running an Access 2003 mdb front-end on Windows XP SP2?
JayNot directly. You could debug the code if you create it as a procedure inste
ad.
ML|||ML,
I was afraid that would be the answer. The reason I wrote it as a function
is so that I could put it in a server-side query as in: "SELECT
MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;". Is
there a way to do the same thing with a procedure?
Jay
"ML" wrote:

> Not directly. You could debug the code if you create it as a procedure ins
tead.
>
> ML|||All you need in such a case is a sample of input parameters - for instance i
n
a table variable - and then you execute the code you intend to use in the
function with each set of parameters in a loop.
Or maybe you can post your DDL and get a 'second opinion'.
ML|||Try this out:
declare @.output2 varchar(30)
exec testbysandeep 1,2,@.output1=@.output2 OUTPUT
select @.output2
output1 is the field which is the output of the function. You assign this
value to the output2 variable.Then by doing a select statement you display
the value.
Hope this helps.
jains
"jay" wrote:
> ML,
> I was afraid that would be the answer. The reason I wrote it as a functi
on
> is so that I could put it in a server-side query as in: "SELECT
> MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;". I
s
> there a way to do the same thing with a procedure?
> Jay
> "ML" wrote:
>|||Hi Jay,
You can debug a UDF from QA by making a small SP that calls the UDF. The QA
debugger steps into the UDF with F11 the same as VS.
Cheers
Doug Forster
"jay" <jay@.discussions.microsoft.com> wrote in message
news:E2A1224F-03FA-4422-BD86-215675844400@.microsoft.com...
> ML,
> I was afraid that would be the answer. The reason I wrote it as a
> function
> is so that I could put it in a server-side query as in: "SELECT
> MyFunc(SomeField, @.SomeInputVariable) AS SomeLabel FROM dbo.SomeTable;".
> Is
> there a way to do the same thing with a procedure?
> Jay
> "ML" wrote:
>|||Hi Doug Forster,
Is there any kind of configuration setting involed at server side ?
With warm regards
Jatinder|||Well I do this ON the server with admin rights and it just works. Maybe
someone else knows if it is possible to debug from another box, though I
notice the docs caution against debugging on a production server.
Cheers
Doug Forster
"jsfromynr" <jatinder.singh@.clovertechnologies.com> wrote in message
news:1122878941.648594.17860@.g47g2000cwa.googlegroups.com...
> Hi Doug Forster,
> Is there any kind of configuration setting involed at server side ?
> With warm regards
> Jatinder
>|||Hi Forster ,
The problem is that it is not working (debuggin) even on Server .
It says that you are logged as 'Local Account' . Do I have to Logon the
service as administrator woul that effect other clients?
With warm regards
Jatinder Singh
Doug Forster wrote:
> Well I do this ON the server with admin rights and it just works. Maybe
> someone else knows if it is possible to debug from another box, though I
> notice the docs caution against debugging on a production server.
> Cheers
> Doug Forster
> "jsfromynr" <jatinder.singh@.clovertechnologies.com> wrote in message
> news:1122878941.648594.17860@.g47g2000cwa.googlegroups.com...|||Hi I just want to add what I am facing when trying to debug a procedure
(created on master DB using sa login)
when I start debugging on this procedure in query analyzer, I recieve a
msg box which says:
SP debugging may not work properly if you log on as 'Local System
account'
while SQL Server is configured to run as a service.
You can open Event Viwer to see details.
Do you want to continue?
When I continue with this and execute this procedure by providing
parameter values, I get the print outputs, but procedure execution
doesn't break on break points!!
I am puzzled now how to work around with this? How can I break
execution on break points?
Thanks

Debug Sql Server 2005 Stored Procedure in Sql Server Management St

I am trying to figure out how to debug a Stored Procedure (SP) from Sql
Server Management Studio. Like in Query Analyzer in Sql Server 2000, where I
could right click an SP and then click debug on it will let me debug the SP.
Of course, I would execute sp_sdidebug 'legacy_on' before doing that.
In Sql Server Management Studio I do not see an option for debugging an SP
when I right click the SP nor do I see debugging SP option in the menu. I
read BOL, and it mentions to run sp_sdidebug. I tried to run sp_sdidebug but
I get "Could not find stored procedure sp_sdidebug". I tried this step in
master DB, user DB, and msdb but all give me the same error.
The user who is trying to debug the SP is already a member of symin role.
I can debug the SP from Visual Studio 2005, but I would like the same
capability I had in Sql 2000 to be in SMSS. Besides, the Results windows in
SMSS gives me resultset, which I cannot get from the Visual Studio, if I use
VS for debugging.
I have also read that many of the features, such as debugging, xp_cmdshell
etc. come disabled by default in SQL 2005, which is okay. But could somebody
tell me how to make the entire Stored Procedure debugging process work from
within SSMS?
Reply appreciated.
Thanks>I am trying to figure out how to debug a Stored Procedure (SP) from Sql
> Server Management Studio.
Can you please post to the SQL Server 2005 newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1