Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Sunday, March 25, 2012

Changing the day of week in SQL Server 2000

Dear All,

I have one field in my table which shows the day of the week. It is
showing

Sunday = 1
Monday = 2
Tuesday = 3

But i want Monday is the first day. I know i can use DATEFIRST to
change it but it works in Query Analyzerbut when i come and see my
table it is showing the old settings. Is it possible i can change it
permanently. Any help in this regard will be higly appreciated

Regards

SHi Neha

It is not clear what you are trying to do or how your data is being held,
posting DDL (create table statements) and example data (as insert
statements) will remove any ambiguity
http://www.aspfaq.com/etiquette.asp?id=5006

If the day of the week in your table is data it will need to be updated. If
it is currently held as a value 1-7
with Sunday = 1... then try the statement

UPDATE MyTable
SET DayOfWeek = CASE WHEN DayOfWeek = 1 THEN 7 ELSE DayOfWeek - 1 END

Using SET DATEFIRST will change the settings for the current session,
therefore you will need to make sure it is set currectly before issuing your
statement. Alternatively datefirst can be change if a different default
language is specified, to check the current language use sp_helplanguage
@.@.LANGUAGE. sp_helplanguage with no parameters will show you what the values
are for each language. To change the default language use sp_configure (see
Books online for more information)

John

"Neha" <newlooks4u@.hotmail.com> wrote in message
news:76c8ae2c.0412220555.4f0326d@.posting.google.co m...
> Dear All,
> I have one field in my table which shows the day of the week. It is
> showing
> Sunday = 1
> Monday = 2
> Tuesday = 3
> But i want Monday is the first day. I know i can use DATEFIRST to
> change it but it works in Query Analyzerbut when i come and see my
> table it is showing the old settings. Is it possible i can change it
> permanently. Any help in this regard will be higly appreciated
> Regards
> S|||John Bell (jbellnewsposts@.hotmail.com) writes:
> Using SET DATEFIRST will change the settings for the current session,
> therefore you will need to make sure it is set currectly before issuing
> your statement. Alternatively datefirst can be change if a different
> default language is specified, to check the current language use
> sp_helplanguage @.@.LANGUAGE. sp_helplanguage with no parameters will show
> you what the values are for each language. To change the default
> language use sp_configure (see Books online for more information)

What you change with sp_configure is the default language for new
logins.

To change the default language for an existing login, use
sp_defaultlanguage.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Thursday, March 22, 2012

Changing the collation

Dear gurus,
I am pursuing for a statement or function which allow me change the
collation at database level.
Thanks in advance and regards,
Enrichi enric,
I think you can change collation on database level using "alter database
collate command "
ALTER DATABASE database
{ ADD FILE < filespec > [ ,...n ] [ TO FILEGROUP filegroup_name ]
| ADD LOG FILE < filespec > [ ,...n ]
| REMOVE FILE logical_file_name
| ADD FILEGROUP filegroup_name
| REMOVE FILEGROUP filegroup_name
| MODIFY FILE < filespec >
| MODIFY NAME = new_dbname
| MODIFY FILEGROUP filegroup_name {filegroup_property | NAME =
new_filegroup_name }
| SET < optionspec > [ ,...n ] [ WITH < termination > ]
| COLLATE < collation_name >
}
thanks,
Jose de Jesus Jr. Mcp,Mcdba
MCP #2324787
"Enric" wrote:

> Dear gurus,
> I am pursuing for a statement or function which allow me change the
> collation at database level.
> Thanks in advance and regards,
> Enric|||Yes, but that will not change collation for the existing tables. For that, y
ou need to do ALTER
TABLE ... ALTER COLUMN for each table and each column in the database. And i
t also require you to
drop indexes (and probably a few more things). Not fun...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jose G. de Jesus Jr MCP, MCDBA" <Email me> wrote in message
news:2CA8C84A-C24A-4F58-8860-4C3F3D454037@.microsoft.com...
> hi enric,
> I think you can change collation on database level using "alter database
> collate command "
>
> ALTER DATABASE database
> { ADD FILE < filespec > [ ,...n ] [ TO FILEGROUP filegroup_name ]
> | ADD LOG FILE < filespec > [ ,...n ]
> | REMOVE FILE logical_file_name
> | ADD FILEGROUP filegroup_name
> | REMOVE FILEGROUP filegroup_name
> | MODIFY FILE < filespec >
> | MODIFY NAME = new_dbname
> | MODIFY FILEGROUP filegroup_name {filegroup_property | NAME =
> new_filegroup_name }
> | SET < optionspec > [ ,...n ] [ WITH < termination > ]
> | COLLATE < collation_name >
> }
> --
> thanks,
> --
> Jose de Jesus Jr. Mcp,Mcdba
> MCP #2324787
>
> "Enric" wrote:
>

Wednesday, March 7, 2012

Changing package's owner

Dear All,
Previosly we were using NT 4.0 domain called Domain_A. Recently we imployed
Active Directory and moved all domain accounts to a new domain, Domain_B. We
are using SQL Server 2000 database installed on Win 2K box. Programers are
connecting to SQL Server with trusted connection. When User_A (programer's
account) created a package, the owner of the package appeared as User_A.
Now, the new account of the same user is User_B. I changed owner in the
"owner" field in table "sysdtspackages", from User_A to User_B, so the owner
of the same package appears as User_B. Now, the problem is that User_B can
not save its own package - where owner is User_B, but previously was User_A.
Pops up a message that only sysadmins and owners can make changes to the
package (allthow User_B appears to be an owner).
Did anyone encountered this kind of problem?
Thanks in advance.
BilBil
Try
sp_reassign_dtspackageowner [@.name =] 'name',
[@.id =] 'id',
[@.newloginname =] 'newloginname'
"Bil" <biljanat@.nbrm.gov.mk> wrote in message
news:%23BepIEK0EHA.1204@.TK2MSFTNGP10.phx.gbl...
> Dear All,
> Previosly we were using NT 4.0 domain called Domain_A. Recently we
imployed
> Active Directory and moved all domain accounts to a new domain, Domain_B.
We
> are using SQL Server 2000 database installed on Win 2K box. Programers are
> connecting to SQL Server with trusted connection. When User_A (programer's
> account) created a package, the owner of the package appeared as User_A.
> Now, the new account of the same user is User_B. I changed owner in the
> "owner" field in table "sysdtspackages", from User_A to User_B, so the
owner
> of the same package appears as User_B. Now, the problem is that User_B can
> not save its own package - where owner is User_B, but previously was
User_A.
> Pops up a message that only sysadmins and owners can make changes to the
> package (allthow User_B appears to be an owner).
> Did anyone encountered this kind of problem?
> Thanks in advance.
> Bil
>|||Uri,
Thank you very much. This resolved my problem. This is undocumented stored
procedure.
Thanks a lot.
Regards,
Bil
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23MHRBHK0EHA.3072@.TK2MSFTNGP11.phx.gbl...
> Bil
> Try
> sp_reassign_dtspackageowner [@.name =] 'name',
> [@.id =] 'id',
> [@.newloginname =] 'newloginname'
>
>
> "Bil" <biljanat@.nbrm.gov.mk> wrote in message
> news:%23BepIEK0EHA.1204@.TK2MSFTNGP10.phx.gbl...
> imployed
> We
> owner
> User_A.
>

Saturday, February 25, 2012

Changing NT Passwords used by SQL Server

Dear All,
Our Server department would like to change the passwords
of our Domain User accounts used by SQL Server and SQL
Server Agent Accounts.
Can anyone tell me the impact of this and whether we need
to do anything at the SQL end.
Regards
Peter
Hi,
After changing the password of the domain os user account, you need to
change the password entry in
control panel -- Admin tools -- services -- MSSQL server (double click
miuse) -- go to "Log on" tab-- type the new password and restart the MSSQL
server service
Do the same for SQL Agent service as well.
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2511801c46015$9f076c20$a401280a@.phx.gbl...
> Dear All,
> Our Server department would like to change the passwords
> of our Domain User accounts used by SQL Server and SQL
> Server Agent Accounts.
> Can anyone tell me the impact of this and whether we need
> to do anything at the SQL end.
> Regards
> Peter
|||"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:#hkuRfBYEHA.2944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> After changing the password of the domain os user account, you need to
> change the password entry in
> control panel -- Admin tools -- services -- MSSQL server (double click
> miuse) -- go to "Log on" tab-- type the new password and restart the
MSSQL
> server service
I am not completely sure but I do not think that you have to restart
MSSQL server service.

> Do the same for SQL Agent service as well.
>
> --
> Thanks
> Hari
> MCDBA
> "Peter" <anonymous@.discussions.microsoft.com> wrote in message
> news:2511801c46015$9f076c20$a401280a@.phx.gbl...
>
|||To get to the SQL AGent login in SEM right click SQL Agent and go to
properties...
I have heard of an issue with changing the password on the full text index
search service, that requires special attention, but I do not remember the
details... It seems like as long as you set the login/password via SEM
things worked, but if you did it via windows services, there was a
disconnect somehow... You might want to google it.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2511801c46015$9f076c20$a401280a@.phx.gbl...
> Dear All,
> Our Server department would like to change the passwords
> of our Domain User accounts used by SQL Server and SQL
> Server Agent Accounts.
> Can anyone tell me the impact of this and whether we need
> to do anything at the SQL end.
> Regards
> Peter
|||Thanks for all your responses, you have told me what I
need to know.
Peter

>--Original Message--
>Dear All,
>Our Server department would like to change the passwords
>of our Domain User accounts used by SQL Server and SQL
>Server Agent Accounts.
>Can anyone tell me the impact of this and whether we need
>to do anything at the SQL end.
>Regards
>Peter
>.
>

Changing NT Passwords used by SQL Server

Dear All,
Our Server department would like to change the passwords
of our Domain User accounts used by SQL Server and SQL
Server Agent Accounts.
Can anyone tell me the impact of this and whether we need
to do anything at the SQL end.
Regards
PeterHi,
After changing the password of the domain os user account, you need to
change the password entry in
control panel -- Admin tools -- services -- MSSQL server (double click
miuse) -- go to "Log on" tab-- type the new password and restart the MSSQL
server service
Do the same for SQL Agent service as well.
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2511801c46015$9f076c20$a401280a@.phx.gbl...
> Dear All,
> Our Server department would like to change the passwords
> of our Domain User accounts used by SQL Server and SQL
> Server Agent Accounts.
> Can anyone tell me the impact of this and whether we need
> to do anything at the SQL end.
> Regards
> Peter|||"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:#hkuRfBYEHA.2944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> After changing the password of the domain os user account, you need to
> change the password entry in
> control panel -- Admin tools -- services -- MSSQL server (double click
> miuse) -- go to "Log on" tab-- type the new password and restart the
MSSQL
> server service
I am not completely sure but I do not think that you have to restart
MSSQL server service.
> Do the same for SQL Agent service as well.
>
> --
> Thanks
> Hari
> MCDBA
> "Peter" <anonymous@.discussions.microsoft.com> wrote in message
> news:2511801c46015$9f076c20$a401280a@.phx.gbl...
> > Dear All,
> > Our Server department would like to change the passwords
> > of our Domain User accounts used by SQL Server and SQL
> > Server Agent Accounts.
> >
> > Can anyone tell me the impact of this and whether we need
> > to do anything at the SQL end.
> >
> > Regards
> > Peter
>|||To get to the SQL AGent login in SEM right click SQL Agent and go to
properties...
I have heard of an issue with changing the password on the full text index
search service, that requires special attention, but I do not remember the
details... It seems like as long as you set the login/password via SEM
things worked, but if you did it via windows services, there was a
disconnect somehow... You might want to google it.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2511801c46015$9f076c20$a401280a@.phx.gbl...
> Dear All,
> Our Server department would like to change the passwords
> of our Domain User accounts used by SQL Server and SQL
> Server Agent Accounts.
> Can anyone tell me the impact of this and whether we need
> to do anything at the SQL end.
> Regards
> Peter|||Thanks for all your responses, you have told me what I
need to know.
Peter
>--Original Message--
>Dear All,
>Our Server department would like to change the passwords
>of our Domain User accounts used by SQL Server and SQL
>Server Agent Accounts.
>Can anyone tell me the impact of this and whether we need
>to do anything at the SQL end.
>Regards
>Peter
>.
>