Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Thursday, March 29, 2012

Default Language

Hi,
When running reports on a SQL 2000 Server database they are printing with $
signs instead of signs. printing from other apps like notepad on the
server or client ptints fine (i.e. with signs).
If I run SELECT @.@.LANGUAGE on the sql server it shows as us_english. The
same if I look at the general tab of the server in enterprise manager.
Could someone tell me how to change the default language to uk?
SQL Server 2000
on Windows 2000 Server
Thanks,
SteveSteve,
you can use :
sp_configure 'default language', 23
reconfigure with override
This resets the default language. The default only seems to apply to new
logins however and will affect the way strings are interpreted as dates but
it doesn't reset the value returned by @.@.language. I have heard that to
change the @.@.language value you have to reinstall, as it is picked up from
the locale at the time of installation, but have never confirmed this.
Anyway, I suspect that the $ sign is being added due to the settings of your
reporting application rather than anything to do with SQL Server. As far as
I recall, if you're using reporting services, the page setting overrides the
system locale settings, which would explain it.
HTH,
Paul Ibison|||Thanks Paul,
Thats most helpful. We were suspecting the application too but wanted to
cover all our bases before going to the third party.
Thanks,
Steve
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OLattPIKEHA.2456@.TK2MSFTNGP12.phx.gbl...
> Steve,
> you can use :
> sp_configure 'default language', 23
> reconfigure with override
> This resets the default language. The default only seems to apply to new
> logins however and will affect the way strings are interpreted as dates
but
> it doesn't reset the value returned by @.@.language. I have heard that to
> change the @.@.language value you have to reinstall, as it is picked up from
> the locale at the time of installation, but have never confirmed this.
> Anyway, I suspect that the $ sign is being added due to the settings of
your
> reporting application rather than anything to do with SQL Server. As far
as
> I recall, if you're using reporting services, the page setting overrides
the
> system locale settings, which would explain it.
> HTH,
> Paul Ibison
>

Default Language

Hi,
When running reports on a SQL 2000 Server database they are printing with $
signs instead of signs. printing from other apps like notepad on the
server or client ptints fine (i.e. with signs).
If I run SELECT @.@.LANGUAGE on the sql server it shows as us_english. The
same if I look at the general tab of the server in enterprise manager.
Could someone tell me how to change the default language to uk?
SQL Server 2000
on Windows 2000 Server
Thanks,
Steve
Steve,
you can use :
sp_configure 'default language', 23
reconfigure with override
This resets the default language. The default only seems to apply to new
logins however and will affect the way strings are interpreted as dates but
it doesn't reset the value returned by @.@.language. I have heard that to
change the @.@.language value you have to reinstall, as it is picked up from
the locale at the time of installation, but have never confirmed this.
Anyway, I suspect that the $ sign is being added due to the settings of your
reporting application rather than anything to do with SQL Server. As far as
I recall, if you're using reporting services, the page setting overrides the
system locale settings, which would explain it.
HTH,
Paul Ibison
|||Thanks Paul,
Thats most helpful. We were suspecting the application too but wanted to
cover all our bases before going to the third party.
Thanks,
Steve
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OLattPIKEHA.2456@.TK2MSFTNGP12.phx.gbl...
> Steve,
> you can use :
> sp_configure 'default language', 23
> reconfigure with override
> This resets the default language. The default only seems to apply to new
> logins however and will affect the way strings are interpreted as dates
but
> it doesn't reset the value returned by @.@.language. I have heard that to
> change the @.@.language value you have to reinstall, as it is picked up from
> the locale at the time of installation, but have never confirmed this.
> Anyway, I suspect that the $ sign is being added due to the settings of
your
> reporting application rather than anything to do with SQL Server. As far
as
> I recall, if you're using reporting services, the page setting overrides
the
> system locale settings, which would explain it.
> HTH,
> Paul Ibison
>

Default Language

Hi,
When running reports on a SQL 2000 Server database they are printing with $
signs instead of £ signs. printing from other apps like notepad on the
server or client ptints fine (i.e. with £ signs).
If I run SELECT @.@.LANGUAGE on the sql server it shows as us_english. The
same if I look at the general tab of the server in enterprise manager.
Could someone tell me how to change the default language to uk?
SQL Server 2000
on Windows 2000 Server
Thanks,
SteveSteve,
you can use :
sp_configure 'default language', 23
reconfigure with override
This resets the default language. The default only seems to apply to new
logins however and will affect the way strings are interpreted as dates but
it doesn't reset the value returned by @.@.language. I have heard that to
change the @.@.language value you have to reinstall, as it is picked up from
the locale at the time of installation, but have never confirmed this.
Anyway, I suspect that the $ sign is being added due to the settings of your
reporting application rather than anything to do with SQL Server. As far as
I recall, if you're using reporting services, the page setting overrides the
system locale settings, which would explain it.
HTH,
Paul Ibison|||Thanks Paul,
Thats most helpful. We were suspecting the application too but wanted to
cover all our bases before going to the third party.
Thanks,
Steve
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OLattPIKEHA.2456@.TK2MSFTNGP12.phx.gbl...
> Steve,
> you can use :
> sp_configure 'default language', 23
> reconfigure with override
> This resets the default language. The default only seems to apply to new
> logins however and will affect the way strings are interpreted as dates
but
> it doesn't reset the value returned by @.@.language. I have heard that to
> change the @.@.language value you have to reinstall, as it is picked up from
> the locale at the time of installation, but have never confirmed this.
> Anyway, I suspect that the $ sign is being added due to the settings of
your
> reporting application rather than anything to do with SQL Server. As far
as
> I recall, if you're using reporting services, the page setting overrides
the
> system locale settings, which would explain it.
> HTH,
> Paul Ibison
>

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 mapping is "Master" - why?

Gurus,
Running SQL Server 2005 SP2. I noticed when I explore my users SQL database
mappings, a lot of times their default database is "Master" instead of the
various application databases which exist on the server. Which is correct,
pointing at master or to their specific application database?
--
SpinBoth are correct. It's a matter of how you'd like to set the default database
of a login, and you can use sp_defaultdb to change it. The most likely reason
why they have different default databases is that the logins were not created
consistently. Some were created with an explicit default database, while the
other were created without an explicit default, in which case master would be
chosen as the default database for the login.
Linchi
"Spin" wrote:
> Gurus,
> Running SQL Server 2005 SP2. I noticed when I explore my users SQL database
> mappings, a lot of times their default database is "Master" instead of the
> various application databases which exist on the server. Which is correct,
> pointing at master or to their specific application database?
> --
> Spin
>|||"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
> Both are correct. It's a matter of how you'd like to set the default
> database
> of a login, and you can use sp_defaultdb to change it. The most likely
> reason
> why they have different default databases is that the logins were not
> created
> consistently. Some were created with an explicit default database, while
> the
> other were created without an explicit default, in which case master would
> be
> chosen as the default database for the login.
But if users cannot login into "Master" than it would make sense for
performance reasons (faster login) to properly set the databse during
account setup correct?
Spin|||Spin
I do not know your business requirements as well as how your application
does the work.
What if you set default database and that database git corrupted. Login
could bot connect to the server to see/repair the database?
"Spin" <Spin@.invalid.com> wrote in message
news:64bk62F2agtgvU1@.mid.individual.net...
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
> news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
>> Both are correct. It's a matter of how you'd like to set the default
>> database
>> of a login, and you can use sp_defaultdb to change it. The most likely
>> reason
>> why they have different default databases is that the logins were not
>> created
>> consistently. Some were created with an explicit default database, while
>> the
>> other were created without an explicit default, in which case master
>> would be
>> chosen as the default database for the login.
> But if users cannot login into "Master" than it would make sense for
> performance reasons (faster login) to properly set the databse during
> account setup correct?
> Spin
>|||> But if users cannot login into "Master"
You don't "login" to a database. You login to the instance and then "use" a database. Also, every
login can use master since there is a guest user in the master database.
> than it would make sense for performance reasons (faster login) to properly set the databse during
> account setup correct?
Default database do no affect login time.
In most cases the default database is irrelevant since your application will connect to the desired
database thanks to the db name specified in the connection string.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Spin" <Spin@.invalid.com> wrote in message news:64bk62F2agtgvU1@.mid.individual.net...
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
> news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
>> Both are correct. It's a matter of how you'd like to set the default database
>> of a login, and you can use sp_defaultdb to change it. The most likely reason
>> why they have different default databases is that the logins were not created
>> consistently. Some were created with an explicit default database, while the
>> other were created without an explicit default, in which case master would be
>> chosen as the default database for the login.
> But if users cannot login into "Master" than it would make sense for performance reasons (faster
> login) to properly set the databse during account setup correct?
> Spin
>|||Tibor
If you try connect with a login who has corrupted/notexistence database (
was set as a deafult) then you cannot connect to the server, I think that is
what the OP meant .
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23BqVbWZiIHA.4140@.TK2MSFTNGP04.phx.gbl...
>> But if users cannot login into "Master"
> You don't "login" to a database. You login to the instance and then "use"
> a database. Also, every login can use master since there is a guest user
> in the master database.
>> than it would make sense for performance reasons (faster login) to
>> properly set the databse during account setup correct?
> Default database do no affect login time.
> In most cases the default database is irrelevant since your application
> will connect to the desired database thanks to the db name specified in
> the connection string.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Spin" <Spin@.invalid.com> wrote in message
> news:64bk62F2agtgvU1@.mid.individual.net...
>> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
>> news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
>> Both are correct. It's a matter of how you'd like to set the default
>> database
>> of a login, and you can use sp_defaultdb to change it. The most likely
>> reason
>> why they have different default databases is that the logins were not
>> created
>> consistently. Some were created with an explicit default database, while
>> the
>> other were created without an explicit default, in which case master
>> would be
>> chosen as the default database for the login.
>> But if users cannot login into "Master" than it would make sense for
>> performance reasons (faster login) to properly set the databse during
>> account setup correct?
>> Spin
>>
>|||Hi Uri,
> If you try connect with a login who has corrupted/notexistence database ( was set as a deafult)
> then you cannot connect to the server
Correct, for some applications. Where other will fall back to some other database.
> , I think that is what the OP meant .
I don't think so. I do not see any reference to a non-existing default database in below OP's post,
to which my reply was for:
>> But if users cannot login into "Master" than it would make sense for performance reasons (faster
>> login) to properly set the databse during account setup correct?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:OEmgtdZiIHA.4076@.TK2MSFTNGP05.phx.gbl...
> Tibor
> If you try connect with a login who has corrupted/notexistence database ( was set as a deafult)
> then you cannot connect to the server, I think that is what the OP meant .
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:%23BqVbWZiIHA.4140@.TK2MSFTNGP04.phx.gbl...
>> But if users cannot login into "Master"
>> You don't "login" to a database. You login to the instance and then "use" a database. Also, every
>> login can use master since there is a guest user in the master database.
>> than it would make sense for performance reasons (faster login) to properly set the databse
>> during account setup correct?
>> Default database do no affect login time.
>> In most cases the default database is irrelevant since your application will connect to the
>> desired database thanks to the db name specified in the connection string.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Spin" <Spin@.invalid.com> wrote in message news:64bk62F2agtgvU1@.mid.individual.net...
>> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
>> news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
>> Both are correct. It's a matter of how you'd like to set the default database
>> of a login, and you can use sp_defaultdb to change it. The most likely reason
>> why they have different default databases is that the logins were not created
>> consistently. Some were created with an explicit default database, while the
>> other were created without an explicit default, in which case master would be
>> chosen as the default database for the login.
>> But if users cannot login into "Master" than it would make sense for performance reasons (faster
>> login) to properly set the databse during account setup correct?
>> Spin
>>
>>
>|||Hi Tibor
> Correct, for some applications.
Such as QA :-))))
> I don't think so. I do not see any reference to a non-existing default
> database in below OP's post, to which my reply was for:
I re-read his post. You got it right.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uGd0fRaiIHA.6032@.TK2MSFTNGP03.phx.gbl...
> Hi Uri,
>> If you try connect with a login who has corrupted/notexistence database
>> ( was set as a deafult) then you cannot connect to the server
> Correct, for some applications. Where other will fall back to some other
> database.
>
>> , I think that is what the OP meant .
> I don't think so. I do not see any reference to a non-existing default
> database in below OP's post, to which my reply was for:
>> But if users cannot login into "Master" than it would make sense for
>> performance reasons (faster login) to properly set the databse during
>> account setup correct?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OEmgtdZiIHA.4076@.TK2MSFTNGP05.phx.gbl...
>> Tibor
>> If you try connect with a login who has corrupted/notexistence database
>> ( was set as a deafult) then you cannot connect to the server, I think
>> that is what the OP meant .
>>
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:%23BqVbWZiIHA.4140@.TK2MSFTNGP04.phx.gbl...
>> But if users cannot login into "Master"
>> You don't "login" to a database. You login to the instance and then
>> "use" a database. Also, every login can use master since there is a
>> guest user in the master database.
>> than it would make sense for performance reasons (faster login) to
>> properly set the databse during account setup correct?
>> Default database do no affect login time.
>> In most cases the default database is irrelevant since your application
>> will connect to the desired database thanks to the db name specified in
>> the connection string.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Spin" <Spin@.invalid.com> wrote in message
>> news:64bk62F2agtgvU1@.mid.individual.net...
>> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
>> news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
>> Both are correct. It's a matter of how you'd like to set the default
>> database
>> of a login, and you can use sp_defaultdb to change it. The most likely
>> reason
>> why they have different default databases is that the logins were not
>> created
>> consistently. Some were created with an explicit default database,
>> while the
>> other were created without an explicit default, in which case master
>> would be
>> chosen as the default database for the login.
>> But if users cannot login into "Master" than it would make sense for
>> performance reasons (faster login) to properly set the databse during
>> account setup correct?
>> Spin
>>
>>
>>
>

Default database mapping is "Master" - why?

Gurus,
Running SQL Server 2005 SP2. I noticed when I explore my users SQL database
mappings, a lot of times their default database is "Master" instead of the
various application databases which exist on the server. Which is correct,
pointing at master or to their specific application database?
Spin
Both are correct. It's a matter of how you'd like to set the default database
of a login, and you can use sp_defaultdb to change it. The most likely reason
why they have different default databases is that the logins were not created
consistently. Some were created with an explicit default database, while the
other were created without an explicit default, in which case master would be
chosen as the default database for the login.
Linchi
"Spin" wrote:

> Gurus,
> Running SQL Server 2005 SP2. I noticed when I explore my users SQL database
> mappings, a lot of times their default database is "Master" instead of the
> various application databases which exist on the server. Which is correct,
> pointing at master or to their specific application database?
> --
> Spin
>
|||"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
> Both are correct. It's a matter of how you'd like to set the default
> database
> of a login, and you can use sp_defaultdb to change it. The most likely
> reason
> why they have different default databases is that the logins were not
> created
> consistently. Some were created with an explicit default database, while
> the
> other were created without an explicit default, in which case master would
> be
> chosen as the default database for the login.
But if users cannot login into "Master" than it would make sense for
performance reasons (faster login) to properly set the databse during
account setup correct?
Spin
|||Spin
I do not know your business requirements as well as how your application
does the work.
What if you set default database and that database git corrupted. Login
could bot connect to the server to see/repair the database?
"Spin" <Spin@.invalid.com> wrote in message
news:64bk62F2agtgvU1@.mid.individual.net...
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
> news:488CB1F7-21FE-400E-BC77-651BD60723FB@.microsoft.com...
> But if users cannot login into "Master" than it would make sense for
> performance reasons (faster login) to properly set the databse during
> account setup correct?
> Spin
>
|||Tibor
If you try connect with a login who has corrupted/notexistence database (
was set as a deafult) then you cannot connect to the server, I think that is
what the OP meant .
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23BqVbWZiIHA.4140@.TK2MSFTNGP04.phx.gbl...
> You don't "login" to a database. You login to the instance and then "use"
> a database. Also, every login can use master since there is a guest user
> in the master database.
>
> Default database do no affect login time.
> In most cases the default database is irrelevant since your application
> will connect to the desired database thanks to the db name specified in
> the connection string.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Spin" <Spin@.invalid.com> wrote in message
> news:64bk62F2agtgvU1@.mid.individual.net...
>
|||Hi Tibor
> Correct, for some applications.
Such as QA :-))))

> I don't think so. I do not see any reference to a non-existing default
> database in below OP's post, to which my reply was for:
I re-read his post. You got it right.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uGd0fRaiIHA.6032@.TK2MSFTNGP03.phx.gbl...
> Hi Uri,
>
> Correct, for some applications. Where other will fall back to some other
> database.
>
> I don't think so. I do not see any reference to a non-existing default
> database in below OP's post, to which my reply was for:
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:OEmgtdZiIHA.4076@.TK2MSFTNGP05.phx.gbl...
>

Thursday, March 22, 2012

Default Contraint Problem

Hello,
I have 6 SQL Server in different locations running same applications. In a
table a column has a default contsraint, It works in 3 servers but the other
3 servers it does not work the column gets NULL value.
Any Idea?
Thanks in advance,
Erdal,Can you generate the SQL script for the table that works, the table that
doesn't work, and the insert statement used?
http://www.aspfaq.com/5006
"Erdal Akbulut" <erdalim21@.yahoo.com> wrote in message
news:eMosU6yoFHA.3552@.TK2MSFTNGP10.phx.gbl...
> Hello,
> I have 6 SQL Server in different locations running same applications. In
> a
> table a column has a default contsraint, It works in 3 servers but the
> other
> 3 servers it does not work the column gets NULL value.
> Any Idea?
> Thanks in advance,
>
> Erdal,
>
>|||This works
[CostV_LA] [numeric](21, 8) NULL CONSTRAINT [DF_tblOrderLines_CostV_LA]
DEFAULT (0),
This works too
[CostV_LA] [money] NULL CONSTRAINT [DF_tblOrderLines_CostV_LA] DEFAULT (0),
This does not.
[CostV_LA] [money] NULL CONSTRAINT [DF_tblOrderLines_CostV_LA] DEFAULT (0),
The strange thing the one that does not work today was working last month.
There is no sp updating this column.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23PM%23t9yoFHA.2080@.TK2MSFTNGP14.phx.gbl...
> Can you generate the SQL script for the table that works, the table that
> doesn't work, and the insert statement used?
> http://www.aspfaq.com/5006
>
>
> "Erdal Akbulut" <erdalim21@.yahoo.com> wrote in message
> news:eMosU6yoFHA.3552@.TK2MSFTNGP10.phx.gbl...
In
>|||> This works
> [CostV_LA] [numeric](21, 8) NULL CONSTRAINT [DF_tblOrderLines_CostV_LA]
> DEFAULT (0),
> This works too
> [CostV_LA] [money] NULL CONSTRAINT [DF_tblOrderLines_CostV_LA] DEFAULT
> (0),
>
> This does not.
> [CostV_LA] [money] NULL CONSTRAINT [DF_tblOrderLines_CostV_LA] DEFAULT
> (0),
Can you give the whole CREATE TABLE script? Also summarize any differences
between the two servers, e.g. @.@.version, regional settings, DBCC
USEROPTIONS. Also, if you don't want NULL to end up in the table, your
constraints should be:
[CostV_LA] [MONEY] NOT NULL CONSTRAINT [DF_tblOrderLines_CostV_LA] DEFAULT
(0),
Do you see why it's impossible to diagnose the problem from here? Imagine
me telling you, I have two cars in my driveway, and one of them doesn't
work. What's the problem? You ask for more information. I tell you, well,
they're both Chevy Novas. Does that help?
Are you beating your head against a wall yet? I am!

> There is no sp updating this column.
There must be an INSERT statement that causes the default to either work or
not (if you do not insert data into the row, how do you know the constraint
fails to work?).
A

Wednesday, March 7, 2012

Decimal Places Displayed

Hi,

I'm running the following query against a SQL Server 2003 database to receive the results below:

SELECT PayPeriod AS [Pay Period], SUM(PayHours) AS [Pay Hours]
FROM EmployeePayHours
GROUP BY PayPeriod

Pay Period Pay Hours

713 80

714 120

717 59.5

718 80

719 80

A colleague of mine, however, is running the same query against the same database (using a different machine) and gets the following results.

Pay Period Pay Hours

713 80

714 120

717 59.500000000000021

718 79.999999999999972

719 79.999999999999972

Is there a setting somewhere that needs to be changed? Thanks.

This seems specious at best.

Are you certain that it is the exact same query running against the exact same database and the exact same table? (In the second example, it appears that the [Pay Hours] are either stored as floats, or that there is conversion to floats occurring some where in the process.)

Saturday, February 25, 2012

Debugging while running reporting services

I am attempting to debug a customer security dll that is called by Reporting Services. The DLL works great and functions correctly. I am trying to set breakpoints in the code, but they are ignored. I changed the web.config for ReportManager and ReportServer to set debug=true. However, still no luck. The application never stops, it just works.

I have tried this on a Windows XP Pro with no luck. Any suggestions?

Are you debugging the asp.net worker process? Did you configure VS to point to the correct symbols?

-Daniel

Debugging TSQL Stored Procedures

Running SQL Server Express is there a way to debug TSQL stored procedures?I also have Visual Studio .NET 2003, can I use it to debug the TSQL stored procedures?

Thanks in advance,

Mark

No you need VS 2005 to debug SQL 2005.|||T-SQL Stored Procedure in 2005 can only be done with VSS 2005? Aargh

... I agree, this is a step backawards. Looking at my machien, I see

our company base install has included VSS, but it seems only for

Integration Services, Analysis Services and Reporting Services.

What do I need to do to get it to include the SQL 'component' into VSS?|||

I think you mis-read Euan's post, he said you need VS 2005, as in Visual Studio. Only one "S"; different that VSS for Visual Source Safe. Different thing altogether.

Mike

|||

I know ... you under-estimate the power of the typo and the rushing poster :-)

I was rushing the post, and didn't check what I was typing too clearly - a bad habit! I do know (and have used) Visual Source Safe ... and do have VS 2005 installed.

Now I just need to understand what I need to do to get it to open the SQL solution I have created - when I try to open projects, the extensions listed cover Integration Services, etc. etc. but not SQL project.

Thanks for trying to help me back onto the path - and again, sorry for the mistaken acronyms...

|||If you only have the BI Projects then you just have the BI version of VS, you need the Pro SKU or higher for SQL Projects.|||

Euan Garden wrote:

If you only have the BI Projects then you

just have the BI version of VS, you need the Pro SKU or higher for SQL

Projects.

Thanks Euan. Going to arrange that now.

Friday, February 24, 2012

Debugging stops without messages

Have a task that has 120 tables (components) that I am running in debug mode. Just over half of the components run which takes btrieve db and converts into a sybase db. When it stops running there are a few components that are yellow, the components which completed are green and the rest are still white because they have ran yet. The problem is there is not a message to indicate as to why it stopped. I've broken up the task into two tasks and also tried making two projects. The same situation happens at the same point. Our dbas have checked the database to ensure that's fine and it is. Is there some sort of limitation in how many components can be run in debug mode?

No, but enginethreads may be limiting you here. Read this and see if it helps: http://blogs.conchango.com/jamiethomson/archive/2005/10/02/2227.aspx

-Jamie

|||Thanks for the response. I read the link and tried making a few changes to the enginethreads but no luck. In my original project I had two tasks that were linked and the first one ran without issues and the next task is where it only did the couple of tables. I created a new project and added the package to the new project then deleted the first task. Now that it's a separate project I still have the same issue. Because I copied the original package could there still be some sort of hooks that won't change because of the copy and it will still associate the number of components with the original package? The reason for this question is that I changed the enginethreads to be the max of 60 and when I ran it came back with a message that the required amount of threads in the pipeline were 121 and the max allowed was 64. I was thinking that because the package was copied could the pipeline info still show as 121 instead of the actually component count? Each task originally had about 60 components. Can I delete lines from the xml file that the package creates?|||

I found this log:

04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 3368
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x0100C5D0
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
04/04/06 14:46:43, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:\Program Files\Microsoft SQL Server\90\Shared\ErrorDumps\SQLDmpr0017.mdmp
04/04/06 14:46:43, ACTION, DtsDebugHost.exe, Watson Invoke: No

|||

That looks like it could be a SQL Server issue - that's where SQLDUMPER files come from unless I'm mistaken.

-Jamie

|||

Thanks again Jamie. With my post before the log info just wondered what your opinion was on that? I read the link and tried making a few changes to the enginethreads but no luck. In my original project I had two tasks that were linked and the first one ran without issues and the next task is where it only did the couple of tables. I created a new project and added the package to the new project then deleted the first task. Now that it's a separate project I still have the same issue. Because I copied the original package could there still be some sort of hooks that won't change because of the copy and it will still associate the number of components with the original package? The reason for this question is that I changed the enginethreads to be the max of 60 and when I ran it came back with a message that the required amount of threads in the pipeline were 121 and the max allowed was 64. I was thinking that because the package was copied could the pipeline info still show as 121 instead of the actually component count? Each task originally had about 60 components. Can I delete lines from the xml file that the package creates?

Once again thanks for your responses.

debugging sp sql 2000

Hi All.
I'm running SQL Server 2000 sp3 over a Windows 2003 Server, and my client
machine is a XP Pro sp2, with SQL Clients sp3.
I cannot debug stored procedure from my client machine and i recieve this
error:
Server: Msg 504, Level 16, State 1, Procedure sp_sdidebug, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to connect to debugger
on servername (Error = 0x80070005). Ensure that client-side components, such
as SQLDBREG.EXE, are installed and registered on PC_CECCATO. Debugging
disabled for connection 89.
does anyone have a solution?
Many thanks.
StefanoSee "Troubleshooting the Transact-SQL Debugger" in BOL. Also, see if this
helps.
The T-SQL Debugger is turned off by default for earlier clients after you
install SQL Server 2000 Service Pack 3
http://support.microsoft.com/defaul...kb;en-us;328151
AMB
"stefano ceccato" wrote:

> Hi All.
> I'm running SQL Server 2000 sp3 over a Windows 2003 Server, and my client
> machine is a XP Pro sp2, with SQL Clients sp3.
> I cannot debug stored procedure from my client machine and i recieve this
> error:
> Server: Msg 504, Level 16, State 1, Procedure sp_sdidebug, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]Unable to connect to debugger
> on servername (Error = 0x80070005). Ensure that client-side components, su
ch
> as SQLDBREG.EXE, are installed and registered on PC_CECCATO. Debugging
> disabled for connection 89.
> does anyone have a solution?
> Many thanks.
> Stefano
>
>|||Thanks for your message, but i already tried all the workarouds published in
MSDN...
i remember that with the same server i can debug if the client machine in a
windows 2000 professional... maybe is a problem of my Windows XP sp2
machine!
nothing about this'
regards
stefano
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:EEF974A8-85F7-4512-AA13-27D0E8860A51@.microsoft.com...
> See "Troubleshooting the Transact-SQL Debugger" in BOL. Also, see if this
> helps.
> The T-SQL Debugger is turned off by default for earlier clients after you
> install SQL Server 2000 Service Pack 3
> http://support.microsoft.com/defaul...kb;en-us;328151
>
> AMB
> "stefano ceccato" wrote:
>

Debugging problem

HI,
Running debugger on the server works like a charm, however, when my
developers try to doc the same thing from ther
desktop (with everything setup correctly), thety get the following error
--
Server: Msg 504, Level 16, State 1, Procedure sp_sdidebug, Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to connect to debugger
on myserver (Error = 0x800706ba).
Ensure that client-side components, such as SQLDBREG.EXE, are installed and
registered on W02875.
Debugging disabled for connection 67.
---
Any idea
ThanksHi
Have you checked out
http://support.microsoft.com/defaul...b;en-us;817178,
http://support.microsoft.com/defaul...kb;en-us;839280 or
http://msdn.microsoft.com/library/d...
ols_5cfm.asp?
John
"SalamElias" wrote:

> HI,
> Running debugger on the server works like a charm, however, when my
> developers try to doc the same thing from ther
> desktop (with everything setup correctly), thety get the following error
> --
> Server: Msg 504, Level 16, State 1, Procedure sp_sdidebug, Line 1
> [Microsoft][ODBC SQL Server Driver][SQL Server]Unable to connect to debugger
> on myserver (Error = 0x800706ba).
> Ensure that client-side components, such as SQLDBREG.EXE, are installed an
d
> registered on W02875.
> Debugging disabled for connection 67.
> ---
> Any idea
> Thanks

Sunday, February 19, 2012

Debugging and ActiveX Script Task in a DTS Package running on SQL Server 2005

I have a DTS package that I brought over from SQL server 2000 in to SQL Server 2005. I have installed all of the legacy components to run the DTS packages but I need to debug an ActiveX script task. In SQL Server 2000 I could turn on Just-In-Time debugging and use the stop operator (in my vbscript) to break the running script and launch the debugger.

I don't see how to do this in SQL Server 2005 Management Studio. Is it possible to debug a script object in a DTS package running in SQL Server 2005?

Jay Abbott

I have not tried, but another way to stop execution is to use a MsgBox. Whilst it is paused, you could attach the debugger to the DTS process.

I would bin the ActiveX Script, or leave it in DTS. The diagnostic information is absolutely non-existent coming out of the SSIS ActiveX Script Task, and for my money that is unacceptable in a system. Leaving it in DTS is quite easy, and perhaps call the DTS from SSIS to allow you to migrate some functions in your process. Just the fact that no error information is forthcomming in the event of a failure is enough for me to avoid using it entirely.

Tuesday, February 14, 2012

debug a SELECT query and using variable as column name

i have 2 questions:
1. is there any way to watch the a SELECT as it running? i mean to c how it
acts for each value that it meets and how it ignores each value that not
contains in the 'where' clause
2. im trying to run a select query with variable on a COLUMN name for
example :
declare @.a1 nvarchar(100)
set @.a1= 'my_column_name'
select @.a1 from my_table
but im getting a wrong result. im getting a long single column with the
'my_column_name' value in each cell.
how can i use a column name with variable?
Regards,
OrenYou should use Dynamic SQL
declare @.a1 nvarchar(100)
set @.a1= 'my_column_name'
Exec('select '+@.a1+' from my_table')
Madhivanan|||Hi Oren
Point 1:
you have a work arround for this. you can declare a cursor and try printing
each row onw by one. Once all the rows are printed, then you can debug and
check the result.
Point 2:
you can try this as:
declare @.a1 nvarchar(100)
set @.a1= 'my_column_name'
sp_executesql 'select ' + @.a1 + ' from my_table'
please let me know if u would kine to know anything else
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"Oren101" wrote:

> i have 2 questions:
> 1. is there any way to watch the a SELECT as it running? i mean to c how i
t
> acts for each value that it meets and how it ignores each value that not
> contains in the 'where' clause
> 2. im trying to run a select query with variable on a COLUMN name for
> example :
> declare @.a1 nvarchar(100)
> set @.a1= 'my_column_name'
> select @.a1 from my_table
> but im getting a wrong result. im getting a long single column with the
> 'my_column_name' value in each cell.
> how can i use a column name with variable?
> Regards,
> Oren
>|||thanks Chandra .the sp_executesql worked for me.
do u have any code example for my first question?
Regards,
OreN
"Chandra" wrote:
> Hi Oren
> Point 1:
> you have a work arround for this. you can declare a cursor and try printin
g
> each row onw by one. Once all the rows are printed, then you can debug and
> check the result.
> Point 2:
> you can try this as:
> declare @.a1 nvarchar(100)
> set @.a1= 'my_column_name'
> sp_executesql 'select ' + @.a1 + ' from my_table'
> please let me know if u would kine to know anything else
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://groups.msn.com/SQLResource/
> ---
>
> "Oren101" wrote:
>|||I think the QUOTENAME() function could help you out to for the column
name in the select statement which might prevent the need for sp_executesql?
Clint Hill
H3O Software
http://www.h3osoftware.com
Oren101 wrote:
> thanks Chandra .the sp_executesql worked for me.
> do u have any code example for my first question?
> Regards,
> OreN
> "Chandra" wrote:
>|||hi
just try this way:
select Ename, salary, case when ename like 'C%' then 1 else 0 end result
from Employee
if you have 0 in result then the condition is false.
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"Oren101" wrote:
> thanks Chandra .the sp_executesql worked for me.
> do u have any code example for my first question?
> Regards,
> OreN
> "Chandra" wrote:
>|||hi,
what i ment was more like debugging so i can c watch the comparing for each
line in the table
"Chandra" wrote:
> hi
> just try this way:
> select Ename, salary, case when ename like 'C%' then 1 else 0 end result
> from Employee
> if you have 0 in result then the condition is false.
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://groups.msn.com/SQLResource/
> ---
>
> "Oren101" wrote:
>|||There's no debugging at the intra-statement level for SQL Server. The closes
t you can come (IMO) is
looking at the query plan.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:2EAC73B1-CD6E-481A-B9EA-147B7E17EE03@.microsoft.com...
> hi,
> what i ment was more like debugging so i can c watch the comparing for ea
ch
> line in the table
> "Chandra" wrote:
>