Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Thursday, March 29, 2012

Change logfile location durring setup SQL 2000

Is there a possibility to change the default instalation directory for
the logfiles for sql server 2000? I would like the default database
files to be placed on teh d: drive and the logfiles on the e: drive?

Sjaak van Esdonksjaakvanesdonk@.hotmail.com (Sjaak van Esdonk) wrote in message news:<7479e65c.0311130551.56e84f0c@.posting.google.com>...
> Is there a possibility to change the default instalation directory for
> the logfiles for sql server 2000? I would like the default database
> files to be placed on teh d: drive and the logfiles on the e: drive?
> Sjaak van Esdonk

Setup doesn't have a separate path for the log files, however in
Enterprise Manager you can go into the Server Properties, and on the
Database Settings tab you can select a default location for new
database files. These values are saved in registry keys, so if you
need to do it programmatically, you can edit the registry directly:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer\DefaultLog

Simon|||Thanks Simon, that seems to work !!

Change location of an Existing DB in MSDE

Hi everyone,
I have an MSDE database that was created using the osql.exe. By default it gets automatically created in the MSSQL7/data directory.
Does anyone know how i can detach and then re-attach the database from a new location?Refer to SP_ATTACH_DB & SP_DETACH_DB topics in books online.

Also you can mention path for data files while using CREATE DATABASE Statement.|||Have U thought of

1)Backup db
2)copy the mdf & ldf files
3)delete the db
4)create a new db with same name but data files in the new place
5)overwite the new files (s'be same name) with the original files
(Don't know if u have to stop the SQL Service to do this bit)

or do 1) 3) & 4) + restore db

Worth a try

Ye Hah !

GW

change isolation level server wide

Just curious to know how one can change isolation level server wide ? I know
the default is read committed but if i wanted any other isolation level, how
may one do so ? Using SQL 2000You can only change it at session level, using the SET TRANSACTION ISOLATION
LEVEL command.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uxGOCqebEHA.3684@.TK2MSFTNGP09.phx.gbl...
Just curious to know how one can change isolation level server wide ? I know
the default is read committed but if i wanted any other isolation level, how
may one do so ? Using SQL 2000|||Hi Hassan
Unfortunately, there is no way to do this server wide. It must be set in
each connection for which you want to change from the default.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uxGOCqebEHA.3684@.TK2MSFTNGP09.phx.gbl...
> Just curious to know how one can change isolation level server wide ? I
know
> the default is read committed but if i wanted any other isolation level,
how
> may one do so ? Using SQL 2000
>

change isolation level server wide

Just curious to know how one can change isolation level server wide ? I know
the default is read committed but if i wanted any other isolation level, how
may one do so ? Using SQL 2000
Hi Hassan
Unfortunately, there is no way to do this server wide. It must be set in
each connection for which you want to change from the default.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uxGOCqebEHA.3684@.TK2MSFTNGP09.phx.gbl...
> Just curious to know how one can change isolation level server wide ? I
know
> the default is read committed but if i wanted any other isolation level,
how
> may one do so ? Using SQL 2000
>
|||You can only change it at session level, using the SET TRANSACTION ISOLATION
LEVEL command.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uxGOCqebEHA.3684@.TK2MSFTNGP09.phx.gbl...
Just curious to know how one can change isolation level server wide ? I know
the default is read committed but if i wanted any other isolation level, how
may one do so ? Using SQL 2000

change isolation level server wide

Just curious to know how one can change isolation level server wide ? I know
the default is read committed but if i wanted any other isolation level, how
may one do so ? Using SQL 2000Hi Hassan
Unfortunately, there is no way to do this server wide. It must be set in
each connection for which you want to change from the default.
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uxGOCqebEHA.3684@.TK2MSFTNGP09.phx.gbl...
> Just curious to know how one can change isolation level server wide ? I
know
> the default is read committed but if i wanted any other isolation level,
how
> may one do so ? Using SQL 2000
>|||You can only change it at session level, using the SET TRANSACTION ISOLATION
LEVEL command.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uxGOCqebEHA.3684@.TK2MSFTNGP09.phx.gbl...
Just curious to know how one can change isolation level server wide ? I know
the default is read committed but if i wanted any other isolation level, how
may one do so ? Using SQL 2000sql

Tuesday, March 27, 2012

change instance name?

Is it easy to rename an instance, or change an instance to default instance?
Basically I have an SQL 2000 Standard and MSDE installed on same machine,
and I would like to swap around their instances.
Thanks
cj
No, you cannot rename an instance or change default to named or vice versa. Backup, (re)install and
restore is what you have to do. some links that might be useful:
Have a look at this list compiled by Andrew Kelly:
Moving DB's between Servers
http://www.support.microsoft.com/?id=314546
Moving SQL Server Databases to a New Location with Detach/Attach
http://www.support.microsoft.com/?id=224071
Using WITH MOVE in a Restore
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map logins to users
http://www.dbmaint.com/SyncSql Logins.asp
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
How to Resolve Permission Issues When a Database Is Moved Between SQL
Servers
http://www.support.microsoft.com/?id=240872
Restoring a .mdf
http://www.sqlservercentral.com/scri...p?scriptid=599
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"wcccj" <NOSPAMcjohnson@.wccREMOVE.qld.edu.au> wrote in message
news:eTFhRmIKGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Is it easy to rename an instance, or change an instance to default instance?
> Basically I have an SQL 2000 Standard and MSDE installed on same machine,
> and I would like to swap around their instances.
> Thanks
> cj
>
>
>
|||AFAIK, you can not change instance name, you have to install new
instance and dettach dbs from old instance and attach them to new
instance.
Also you can not change named instance to default instance.
look at
http://vyaskn.tripod.com/administration_faq.htm#q13
Regards
Amish Shah.
|||Ok, that's what I thought :-(
BTW thanks for the list, it is a helpful resource!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:Oh3zzoJKGHA.500@.TK2MSFTNGP15.phx.gbl...
> No, you cannot rename an instance or change default to named or vice
> versa. Backup, (re)install and restore is what you have to do. some links
> that might be useful:
> Have a look at this list compiled by Andrew Kelly:
> Moving DB's between Servers
> http://www.support.microsoft.com/?id=314546
> Moving SQL Server Databases to a New Location with Detach/Attach
> http://www.support.microsoft.com/?id=224071
> Using WITH MOVE in a Restore
> http://support.microsoft.com/?id=221465
> How To Transfer Logins and Passwords Between SQL Servers
> http://www.support.microsoft.com/?id=246133
> Mapping Logins & SIDs after a Restore
> http://www.support.microsoft.com/?id=298897
> Utility to map logins to users
> http://www.dbmaint.com/SyncSql Logins.asp
> User Logon and/or Permission Errors After Restoring Dump
> http://www.support.microsoft.com/?id=168001
> How to Resolve Permission Issues When a Database Is Moved Between SQL
> Servers
> http://www.support.microsoft.com/?id=240872
> Restoring a .mdf
> http://www.sqlservercentral.com/scri...p?scriptid=599
> Disaster Recovery Articles for SQL Server
> http://www.support.microsoft.com/?id=307775
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "wcccj" <NOSPAMcjohnson@.wccREMOVE.qld.edu.au> wrote in message
> news:eTFhRmIKGHA.3408@.TK2MSFTNGP12.phx.gbl...
>

change instance name?

Is it easy to rename an instance, or change an instance to default instance?
Basically I have an SQL 2000 Standard and MSDE installed on same machine,
and I would like to swap around their instances.
Thanks
cjNo, you cannot rename an instance or change default to named or vice versa.
Backup, (re)install and
restore is what you have to do. some links that might be useful:
Have a look at this list compiled by Andrew Kelly:
Moving DB's between Servers
http://www.support.microsoft.com/?id=314546
Moving SQL Server Databases to a New Location with Detach/Attach
http://www.support.microsoft.com/?id=224071
Using WITH MOVE in a Restore
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map logins to users
http://www.dbmaint.com/SyncSql Logins.asp
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
How to Resolve Permission Issues When a Database Is Moved Between SQL
Servers
http://www.support.microsoft.com/?id=240872
Restoring a .mdf
http://www.sqlservercentral.com/scr...sp?scriptid=599
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"wcccj" <NOSPAMcjohnson@.wccREMOVE.qld.edu.au> wrote in message
news:eTFhRmIKGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Is it easy to rename an instance, or change an instance to default instanc
e?
> Basically I have an SQL 2000 Standard and MSDE installed on same machine,
> and I would like to swap around their instances.
> Thanks
> cj
>
>
>|||AFAIK, you can not change instance name, you have to install new
instance and dettach dbs from old instance and attach them to new
instance.
Also you can not change named instance to default instance.
look at
http://vyaskn.tripod.com/administration_faq.htm#q13
Regards
Amish Shah.|||Ok, that's what I thought :-(
BTW thanks for the list, it is a helpful resource!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:Oh3zzoJKGHA.500@.TK2MSFTNGP15.phx.gbl...
> No, you cannot rename an instance or change default to named or vice
> versa. Backup, (re)install and restore is what you have to do. some links
> that might be useful:
> Have a look at this list compiled by Andrew Kelly:
> Moving DB's between Servers
> http://www.support.microsoft.com/?id=314546
> Moving SQL Server Databases to a New Location with Detach/Attach
> http://www.support.microsoft.com/?id=224071
> Using WITH MOVE in a Restore
> http://support.microsoft.com/?id=221465
> How To Transfer Logins and Passwords Between SQL Servers
> http://www.support.microsoft.com/?id=246133
> Mapping Logins & SIDs after a Restore
> http://www.support.microsoft.com/?id=298897
> Utility to map logins to users
> http://www.dbmaint.com/SyncSql Logins.asp
> User Logon and/or Permission Errors After Restoring Dump
> http://www.support.microsoft.com/?id=168001
> How to Resolve Permission Issues When a Database Is Moved Between SQL
> Servers
> http://www.support.microsoft.com/?id=240872
> Restoring a .mdf
> http://www.sqlservercentral.com/scr...sp?scriptid=599
> Disaster Recovery Articles for SQL Server
> http://www.support.microsoft.com/?id=307775
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "wcccj" <NOSPAMcjohnson@.wccREMOVE.qld.edu.au> wrote in message
> news:eTFhRmIKGHA.3408@.TK2MSFTNGP12.phx.gbl...
>

change instance name?

Is it easy to rename an instance, or change an instance to default instance?
Basically I have an SQL 2000 Standard and MSDE installed on same machine,
and I would like to swap around their instances.
Thanks
cjNo, you cannot rename an instance or change default to named or vice versa. Backup, (re)install and
restore is what you have to do. some links that might be useful:
Have a look at this list compiled by Andrew Kelly:
Moving DB's between Servers
http://www.support.microsoft.com/?id=314546
Moving SQL Server Databases to a New Location with Detach/Attach
http://www.support.microsoft.com/?id=224071
Using WITH MOVE in a Restore
http://support.microsoft.com/?id=221465
How To Transfer Logins and Passwords Between SQL Servers
http://www.support.microsoft.com/?id=246133
Mapping Logins & SIDs after a Restore
http://www.support.microsoft.com/?id=298897
Utility to map logins to users
http://www.dbmaint.com/SyncSql Logins.asp
User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
How to Resolve Permission Issues When a Database Is Moved Between SQL
Servers
http://www.support.microsoft.com/?id=240872
Restoring a .mdf
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Disaster Recovery Articles for SQL Server
http://www.support.microsoft.com/?id=307775
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"wcccj" <NOSPAMcjohnson@.wccREMOVE.qld.edu.au> wrote in message
news:eTFhRmIKGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Is it easy to rename an instance, or change an instance to default instance?
> Basically I have an SQL 2000 Standard and MSDE installed on same machine,
> and I would like to swap around their instances.
> Thanks
> cj
>
>
>|||AFAIK, you can not change instance name, you have to install new
instance and dettach dbs from old instance and attach them to new
instance.
Also you can not change named instance to default instance.
look at
http://vyaskn.tripod.com/administration_faq.htm#q13
Regards
Amish Shah.|||Ok, that's what I thought :-(
BTW thanks for the list, it is a helpful resource!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:Oh3zzoJKGHA.500@.TK2MSFTNGP15.phx.gbl...
> No, you cannot rename an instance or change default to named or vice
> versa. Backup, (re)install and restore is what you have to do. some links
> that might be useful:
> Have a look at this list compiled by Andrew Kelly:
> Moving DB's between Servers
> http://www.support.microsoft.com/?id=314546
> Moving SQL Server Databases to a New Location with Detach/Attach
> http://www.support.microsoft.com/?id=224071
> Using WITH MOVE in a Restore
> http://support.microsoft.com/?id=221465
> How To Transfer Logins and Passwords Between SQL Servers
> http://www.support.microsoft.com/?id=246133
> Mapping Logins & SIDs after a Restore
> http://www.support.microsoft.com/?id=298897
> Utility to map logins to users
> http://www.dbmaint.com/SyncSql Logins.asp
> User Logon and/or Permission Errors After Restoring Dump
> http://www.support.microsoft.com/?id=168001
> How to Resolve Permission Issues When a Database Is Moved Between SQL
> Servers
> http://www.support.microsoft.com/?id=240872
> Restoring a .mdf
> http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
> Disaster Recovery Articles for SQL Server
> http://www.support.microsoft.com/?id=307775
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "wcccj" <NOSPAMcjohnson@.wccREMOVE.qld.edu.au> wrote in message
> news:eTFhRmIKGHA.3408@.TK2MSFTNGP12.phx.gbl...
>> Is it easy to rename an instance, or change an instance to default
>> instance?
>> Basically I have an SQL 2000 Standard and MSDE installed on same machine,
>> and I would like to swap around their instances.
>> Thanks
>> cj
>>
>>
>

Change in Server Name for SQL Server 2000

Hi,
I am having a SQL Server 2000 EE SP3 with default instance .
This Server's name need to be changed.
Could any tell me whether there needs to be any configuration done on
the
SQL Server prior to the change. and also after the name change.
Thanks in Advance!!Renaming a SQL server is no big effort.
Simply run the following SQL once you have renamed the server against the
master database.
sp_dropserver OLDSERVERNAME
go
sp_addserver NEWSERVERNAME, local
go
If you have any remote logins or replication setup, you may experience an
error dropping the server. If you do, you will need to drop the remote
logins first.
You will know this by running the above SQL either way. If it works, you're
done.
If not - look up "issues with remote logins and replication" in BOL.
Immy
"sasiraj" <vardhansasi@.gmail.com> wrote in message
news:1158655746.621017.22620@.i42g2000cwa.googlegroups.com...
> Hi,
> I am having a SQL Server 2000 EE SP3 with default instance .
> This Server's name need to be changed.
> Could any tell me whether there needs to be any configuration done on
> the
> SQL Server prior to the change. and also after the name change.
> Thanks in Advance!!
>|||... and some additional thoughts here: http://www.karaszi.com/SQLServer/info_change_server_name.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Immy" <therealasianbabe@.hotmail.com> wrote in message news:OoAeN$82GHA.4932@.TK2MSFTNGP02.phx.gbl...
> Renaming a SQL server is no big effort.
> Simply run the following SQL once you have renamed the server against the master database.
> sp_dropserver OLDSERVERNAME
> go
> sp_addserver NEWSERVERNAME, local
> go
> If you have any remote logins or replication setup, you may experience an error dropping the
> server. If you do, you will need to drop the remote logins first.
> You will know this by running the above SQL either way. If it works, you're done.
> If not - look up "issues with remote logins and replication" in BOL.
> Immy
> "sasiraj" <vardhansasi@.gmail.com> wrote in message
> news:1158655746.621017.22620@.i42g2000cwa.googlegroups.com...
>> Hi,
>> I am having a SQL Server 2000 EE SP3 with default instance .
>> This Server's name need to be changed.
>> Could any tell me whether there needs to be any configuration done on
>> the
>> SQL Server prior to the change. and also after the name change.
>> Thanks in Advance!!
>

Change in Server Name for SQL Server 2000

Hi,
I am having a SQL Server 2000 EE SP3 with default instance .
This Server's name need to be changed.
Could any tell me whether there needs to be any configuration done on
the
SQL Server prior to the change. and also after the name change.
Thanks in Advance!!
Renaming a SQL server is no big effort.
Simply run the following SQL once you have renamed the server against the
master database.
sp_dropserver OLDSERVERNAME
go
sp_addserver NEWSERVERNAME, local
go
If you have any remote logins or replication setup, you may experience an
error dropping the server. If you do, you will need to drop the remote
logins first.
You will know this by running the above SQL either way. If it works, you're
done.
If not - look up "issues with remote logins and replication" in BOL.
Immy
"sasiraj" <vardhansasi@.gmail.com> wrote in message
news:1158655746.621017.22620@.i42g2000cwa.googlegro ups.com...
> Hi,
> I am having a SQL Server 2000 EE SP3 with default instance .
> This Server's name need to be changed.
> Could any tell me whether there needs to be any configuration done on
> the
> SQL Server prior to the change. and also after the name change.
> Thanks in Advance!!
>
|||... and some additional thoughts here: http://www.karaszi.com/SQLServer/inf...erver_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Immy" <therealasianbabe@.hotmail.com> wrote in message news:OoAeN$82GHA.4932@.TK2MSFTNGP02.phx.gbl...
> Renaming a SQL server is no big effort.
> Simply run the following SQL once you have renamed the server against the master database.
> sp_dropserver OLDSERVERNAME
> go
> sp_addserver NEWSERVERNAME, local
> go
> If you have any remote logins or replication setup, you may experience an error dropping the
> server. If you do, you will need to drop the remote logins first.
> You will know this by running the above SQL either way. If it works, you're done.
> If not - look up "issues with remote logins and replication" in BOL.
> Immy
> "sasiraj" <vardhansasi@.gmail.com> wrote in message
> news:1158655746.621017.22620@.i42g2000cwa.googlegro ups.com...
>

Change in Server Name for SQL Server 2000

Hi,
I am having a SQL Server 2000 EE SP3 with default instance .
This Server's name need to be changed.
Could any tell me whether there needs to be any configuration done on
the
SQL Server prior to the change. and also after the name change.
Thanks in Advance!!Renaming a SQL server is no big effort.
Simply run the following SQL once you have renamed the server against the
master database.
sp_dropserver OLDSERVERNAME
go
sp_addserver NEWSERVERNAME, local
go
If you have any remote logins or replication setup, you may experience an
error dropping the server. If you do, you will need to drop the remote
logins first.
You will know this by running the above SQL either way. If it works, you're
done.
If not - look up "issues with remote logins and replication" in BOL.
Immy
"sasiraj" <vardhansasi@.gmail.com> wrote in message
news:1158655746.621017.22620@.i42g2000cwa.googlegroups.com...
> Hi,
> I am having a SQL Server 2000 EE SP3 with default instance .
> This Server's name need to be changed.
> Could any tell me whether there needs to be any configuration done on
> the
> SQL Server prior to the change. and also after the name change.
> Thanks in Advance!!
>|||... and some additional thoughts here: http://www.karaszi.com/SQLServer/in...server_name.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Immy" <therealasianbabe@.hotmail.com> wrote in message news:OoAeN$82GHA.4932@.TK2MSFTNGP02.ph
x.gbl...
> Renaming a SQL server is no big effort.
> Simply run the following SQL once you have renamed the server against the
master database.
> sp_dropserver OLDSERVERNAME
> go
> sp_addserver NEWSERVERNAME, local
> go
> If you have any remote logins or replication setup, you may experience an
error dropping the
> server. If you do, you will need to drop the remote logins first.
> You will know this by running the above SQL either way. If it works, you'r
e done.
> If not - look up "issues with remote logins and replication" in BOL.
> Immy
> "sasiraj" <vardhansasi@.gmail.com> wrote in message
> news:1158655746.621017.22620@.i42g2000cwa.googlegroups.com...
>

Thursday, March 22, 2012

change default value XACT_ABORT at instacle level

Hi,

How can I changed default value for XACT_ABORT at instacle level?

Thanks.

Faheem Ansari

You may use sp_configure to set up. Follow these steps:

exec sp_configure 'show advanced options',1

go

RECONFIGURE'

gp

exec sp_configure 'user options',16384

go

RECONFIGURE

go

Note :

1. 16384 is the option ID for XACT_ABORT (0x4000)

2. You may have already configured some value using sp_configure before, then please make sure you are adding them up. For example, you already set the user option to be 1024 (ANSI_NULL_DFLT_ON), then you need to use

exec sp_configure 'user options',17408

Hope this helps.

Ping

change default value of column

Hi friends,

I have a table :
create table abc (a int,b smalldatetime default getdate())
then insert value like
insert into abc(a) values(1)
now I want to change default value of column b be getdate()+(0.435)
so how can I do ?
please help. Its urgeny.

Quote:

Originally Posted by sourabhmca

Hi friends,

I have a table :
create table abc (a int,b smalldatetime default getdate())
then insert value like
insert into abc(a) values(1)
now I want to change default value of column b be getdate()+(0.435)
so how can I do ?
please help. Its urgeny.


try doing an ALTER TABLE|||I tried but it was not working|||

Quote:

Originally Posted by sourabhmca

I tried but it was not working


if this is a one time thing, try creating a new field then drop the existing one.|||oh yeah, you have to rename the field to the old field name after dropping the old one.

IF this is a one time thing...|||

Quote:

Originally Posted by sourabhmca

Hi friends,

I have a table :
create table abc (a int,b smalldatetime default getdate())
then insert value like
insert into abc(a) values(1)
now I want to change default value of column b be getdate()+(0.435)
so how can I do ?
please help. Its urgeny.


Hey try like this...

create table abc (a int,b smalldatetime constraint df_abc_b default getdate())
insert into abc(a) values(1)
select * from abc

alter table abc drop constraint df_abc_b
alter table abc add constraint df_abc_b default(getdate()+0.435) for b
insert into abc(a) values(1)
select * from abc

Change default value

I need to change current default values from df_curr_user to df_login_user
for about 600 differrent fileds in different tables. Should I do it by using
sp_unbindefault and sp_bindefault for each column? How can I do it
programmatically?
Thanks in advance for any help!
PerayuAre you talking about changing the default constraint name?
AMB
"Perayu" wrote:

> I need to change current default values from df_curr_user to df_login_user
> for about 600 differrent fileds in different tables. Should I do it by usi
ng
> sp_unbindefault and sp_bindefault for each column? How can I do it
> programmatically?
> Thanks in advance for any help!
>
> Perayu
>
>|||Not only the default constraint name. I want to replace it to a new one.
Actually, I can't change the name or update current used df_curr_user
because it is bound to columns. So, I defined a new one as df_login_user and
try to replace it. But have no idea how to do it programmatically.
Thanks.
Perayu
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:654DA86C-7C7B-4DBF-8DCD-99599075D685@.microsoft.com...
> Are you talking about changing the default constraint name?
>
> AMB
> "Perayu" wrote:
>|||See if this helps.
use northwind
go
create default df_current_user as current_user
go
create default df_login_user as suser_sname()
go
create table t1 (
c1 nvarchar(256)
)
go
create table t2 (
c1 nvarchar(256)
)
go
create table t3 (
c1 nvarchar(256)
)
go
create table t4 (
c1 nvarchar(256)
)
go
exec sp_bindefault 'df_current_user', 't1.c1'
exec sp_bindefault 'df_current_user', 't2.c1'
exec sp_bindefault 'df_current_user', 't3.c1'
exec sp_bindefault 'df_current_user', 't4.c1'
go
select
table_name,
column_name,
column_default
from
information_schema.columns
where
objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsUserTable') = 1
and objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsMSShipped') = 0
and column_default like '%create default df_current_user as %'
go
declare @.sql nvarchar(4000)
declare c cursor local fast_forward
for
select
'exec sp_unbindefault ''' + table_name + '.' + column_name + '''' as cmd
from
information_schema.columns
where
objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsUserTable') = 1
and objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsMSShipped') = 0
and column_default like '%create default df_current_user as%'
open c
while 1 = 1
begin
fetch next from c into @.sql
if @.@.error != 0 or @.@.fetch_status != 0 break
exec sp_executesql @.sql
set @.sql = replace(@.sql, 'unbindefault', 'bindefault ''df_login_user'',')
exec sp_executesql @.sql
end
close c
deallocate c
go
select
table_name,
column_name,
column_default
from
information_schema.columns
where
objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsUserTable') = 1
and objectproperty(object_id(quotename(table
_schema) + '.' +
quotename(table_name)), 'IsMSShipped') = 0
and column_default like '%create default df_login_user as %'
go
drop table t1, t2, t3, t4
go
drop default df_current_user, df_login_user
go
AMB
"Perayu" wrote:

> Not only the default constraint name. I want to replace it to a new one.
> Actually, I can't change the name or update current used df_curr_user
> because it is bound to columns. So, I defined a new one as df_login_user a
nd
> try to replace it. But have no idea how to do it programmatically.
> Thanks.
> Perayu
>
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in messag
e
> news:654DA86C-7C7B-4DBF-8DCD-99599075D685@.microsoft.com...
>
>|||It works like a charm!
Thank you so much.
Perayu
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:E94A4876-0EF7-470B-8577-BF702B21B53F@.microsoft.com...
> See if this helps.
> use northwind
> go
> create default df_current_user as current_user
> go
> create default df_login_user as suser_sname()
> go
> create table t1 (
> c1 nvarchar(256)
> )
> go
> create table t2 (
> c1 nvarchar(256)
> )
> go
> create table t3 (
> c1 nvarchar(256)
> )
> go
> create table t4 (
> c1 nvarchar(256)
> )
> go
> exec sp_bindefault 'df_current_user', 't1.c1'
> exec sp_bindefault 'df_current_user', 't2.c1'
> exec sp_bindefault 'df_current_user', 't3.c1'
> exec sp_bindefault 'df_current_user', 't4.c1'
> go
> select
> table_name,
> column_name,
> column_default
> from
> information_schema.columns
> where
> objectproperty(object_id(quotename(table
_schema) + '.' +
> quotename(table_name)), 'IsUserTable') = 1
> and objectproperty(object_id(quotename(table
_schema) + '.' +
> quotename(table_name)), 'IsMSShipped') = 0
> and column_default like '%create default df_current_user as %'
> go
> declare @.sql nvarchar(4000)
> declare c cursor local fast_forward
> for
> select
> 'exec sp_unbindefault ''' + table_name + '.' + column_name + '''' as cmd
> from
> information_schema.columns
> where
> objectproperty(object_id(quotename(table
_schema) + '.' +
> quotename(table_name)), 'IsUserTable') = 1
> and objectproperty(object_id(quotename(table
_schema) + '.' +
> quotename(table_name)), 'IsMSShipped') = 0
> and column_default like '%create default df_current_user as%'
> open c
> while 1 = 1
> begin
> fetch next from c into @.sql
> if @.@.error != 0 or @.@.fetch_status != 0 break
> exec sp_executesql @.sql
> set @.sql = replace(@.sql, 'unbindefault', 'bindefault ''df_login_user'',')
> exec sp_executesql @.sql
> end
> close c
> deallocate c
> go
> select
> table_name,
> column_name,
> column_default
> from
> information_schema.columns
> where
> objectproperty(object_id(quotename(table
_schema) + '.' +
> quotename(table_name)), 'IsUserTable') = 1
> and objectproperty(object_id(quotename(table
_schema) + '.' +
> quotename(table_name)), 'IsMSShipped') = 0
> and column_default like '%create default df_login_user as %'
> go
> drop table t1, t2, t3, t4
> go
> drop default df_current_user, df_login_user
> go
>
> AMB
> "Perayu" wrote:
>|||btw, does anyone know a 'clean' way to get the default value of a
default-bound column ?
for example:
create table t1(col varchar(10))
create default s as 'none'
sp_bindefault s, 't1.col'
I can find this value from information_schema.columns, like this:
select column_default
from information_schema.columns
where table_name = 't1'
and it returns:
create default s as 'none'
however, I believe extracting the string after the 'as' to get default
value isn't the best way. Can't imagine that sql server performs
inserts and calculates a default value on-the-flight
thanks,
Tam|||Sometime, the default value is not always a constant and must be done
on-the-flight. Like what I have is using SUSER_SNAME(), which will depends
on the login name.
Perayu
"Tam Vu" <vuht2000@.yahoo.com> wrote in message
news:1125429897.170823.60630@.g43g2000cwa.googlegroups.com...
> btw, does anyone know a 'clean' way to get the default value of a
> default-bound column ?
> for example:
> create table t1(col varchar(10))
> create default s as 'none'
> sp_bindefault s, 't1.col'
> I can find this value from information_schema.columns, like this:
> select column_default
> from information_schema.columns
> where table_name = 't1'
> and it returns:
> create default s as 'none'
> however, I believe extracting the string after the 'as' to get default
> value isn't the best way. Can't imagine that sql server performs
> inserts and calculates a default value on-the-flight
> thanks,
> Tam
>|||Perayu - I agree, but there're times that default values are constant,
would it do on the flight anyway ?sql

Change default value

Hi,
How can i change default value in sql server through SQL script if i haven't
given default constraint name and using system default generated constraintg
name ?
I have 50 tables to change the default value of a particular field...pls
advice what to do...i don't want to open every table in design mode and
change the default value...pls suggest some script to do it.
With regards,
Gurmeet SinghThis scenario is exactly why you should name your constraint in the first
place...
If you want to automate this, you can use the system tables to get the
constraint name and use that name in your ALTER TABLE ... DROP CONSTRAINT
... statements. Note that SQL Server doesn't accept a variable for table or
constraint name, so you have do use dynamic SQL.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Gurmeet" <gurmeetsm@.hotmail.com> wrote in message
news:uBmwsJ1BEHA.624@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can i change default value in sql server through SQL script if i
haven't
> given default constraint name and using system default generated
constraintg
> name ?
> I have 50 tables to change the default value of a particular field...pls
> advice what to do...i don't want to open every table in design mode and
> change the default value...pls suggest some script to do it.
> With regards,
> Gurmeet Singh
>|||Hi,
Refer books online for the below commands,
Alter table drop constraint <Const_name>
Alter table add constraint
Thanks
Hari
MCDBA
"Gurmeet" <gurmeetsm@.hotmail.com> wrote in message
news:uBmwsJ1BEHA.624@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can i change default value in sql server through SQL script if i
haven't
> given default constraint name and using system default generated
constraintg
> name ?
> I have 50 tables to change the default value of a particular field...pls
> advice what to do...i don't want to open every table in design mode and
> change the default value...pls suggest some script to do it.
> With regards,
> Gurmeet Singh
>|||You can remove the default from a column using the following script:
-- remove the default
DECLARE @.constraint_name SYSNAME
WHILE 1=1
BEGIN
SET @.constraint_name = (SELECT TOP 1 c_obj.name
FROM sysobjects t_obj
INNER JOIN sysobjects c_obj
ON t_obj.id = c_obj.parent_obj
INNER JOIN syscolumns cols
ON cols.colid = c_obj.info
AND cols.id = c_obj.parent_obj
WHERE t_obj.name = '<table name>'
AND c_obj.xtype = 'D'
AND cols.[name] = '<column name>')
IF @.constraint_name IS NULL BREAK
EXEC ('ALTER TABLE <table name> DROP CONSTRAINT ' + @.constraint_name)
END
You can adjust this to use multiple tables and to add the new constraint as
well.
Jacco Schalkwijk
SQL Server MVP
"Gurmeet" <gurmeetsm@.hotmail.com> wrote in message
news:uBmwsJ1BEHA.624@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can i change default value in sql server through SQL script if i
haven't
> given default constraint name and using system default generated
constraintg
> name ?
> I have 50 tables to change the default value of a particular field...pls
> advice what to do...i don't want to open every table in design mode and
> change the default value...pls suggest some script to do it.
> With regards,
> Gurmeet Singh
>

change default value

How do you change a default value for a column in tsql?
cheers
Chalie.drop existing default constraint using statement.
ALTER TABLE <table>
DROP CONSTRAINT <default constraint name>
Recreate the new default constraint using :
ALTER TABLE <table> ADD CONSTRAINT
<constraint name> DEFAULT 'x' FOR <column name>
-Vishal
"charlie B" <Charlie.remove@.freeuk.com> wrote in message
news:B6H3b.338$b82.140399@.newsfep1-win.server.ntli.net...
> How do you change a default value for a column in tsql?
> cheers
> Chalie.
>|||What about something like this
CREATE TABLE DefVals(col1 int CONSTRAINT def_col1 DEFAULT 1, col2 int)
GO
INSERT DefVals(col2) VALUES(1)
GO
SELECT * FROM DefVals
GO
ALTER TABLE DefVals DROP CONSTRAINT def_col1
GO
ALTER TABLE DefVals ADD CONSTRAINT def_col1 DEFAULT 4 FOR col1
GO
INSERT DefVals(col2) VALUES(1)
GO
SELECT * FROM DefVals
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org|||Hello Charlie !
The Default Value is a constraint that you can change:
Sop you have to DROP and ADD the new constraint.
HTH, Jens Süßmeyer.|||Hi,
Thanks for this, but how do I find out what my constraint name is?
Charlie
"Vishal Parkar" <vgparkar@.hotmail.com> wrote in message
news:uk9GvVibDHA.1580@.tk2msftngp13.phx.gbl...
> drop existing default constraint using statement.
> ALTER TABLE <table>
> DROP CONSTRAINT <default constraint name>
> Recreate the new default constraint using :
> ALTER TABLE <table> ADD CONSTRAINT
> <constraint name> DEFAULT 'x' FOR <column name>
>
> --
> -Vishal
> "charlie B" <Charlie.remove@.freeuk.com> wrote in message
> news:B6H3b.338$b82.140399@.newsfep1-win.server.ntli.net...
> > How do you change a default value for a column in tsql?
> >
> > cheers
> > Chalie.
> >
> >
>|||Try
Exec sp_helpconstraint 'TABLE NAME'
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org|||Charlie,
EXEC sp_helpconstraint <tablename>
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"charlie B" <Charlie.remove@.freeuk.com> wrote in message
news:qRI3b.453$b82.171440@.newsfep1-win.server.ntli.net...
> Hi,
> Thanks for this, but how do I find out what my constraint name is?
> Charlie
> "Vishal Parkar" <vgparkar@.hotmail.com> wrote in message
> news:uk9GvVibDHA.1580@.tk2msftngp13.phx.gbl...
> > drop existing default constraint using statement.
> >
> > ALTER TABLE <table>
> > DROP CONSTRAINT <default constraint name>
> >
> > Recreate the new default constraint using :
> > ALTER TABLE <table> ADD CONSTRAINT
> > <constraint name> DEFAULT 'x' FOR <column name>
> >
> >
> > --
> > -Vishal
> >
> > "charlie B" <Charlie.remove@.freeuk.com> wrote in message
> > news:B6H3b.338$b82.140399@.newsfep1-win.server.ntli.net...
> > > How do you change a default value for a column in tsql?
> > >
> > > cheers
> > > Chalie.
> > >
> > >
> >
> >
>

Change default to named instance?

I have an app that connects to the default instance of msde. After some
conflicts with other app's msdes, I now want to use a named instance. This
is no problem from within the app, but can I change the default msde
instance to a named instance without losing the any data, and without
reinstalling msde?
Hi,
No you cant do directly.
1. Take a backup of all databases (Including system databases)
2. Stop SQL Server and copy the MDF and LDF to a safe place
3. Un Install the MSDE
4. Install MSDE and same service pack as old with same folder structure
5. Stop sql server
6. COpy the MDF and LDF (taken in step 2) to the same folder as old
7. Restart SQL server service
8. Execute the below comamnds in OSQL to change the server name
sp_dropserver <oldserver>
go
sp_addserver <new named server>,local
Note:
If these steps fail (Step 6 and 7) then use the database backup taken in
step-1 to restore all the databases.
Thanks
Hari
MCDBA
"Robbs" <rms14can@.hotmail.com> wrote in message
news:e1kT4FGOEHA.3312@.tk2msftngp13.phx.gbl...
> I have an app that connects to the default instance of msde. After some
> conflicts with other app's msdes, I now want to use a named instance. This
> is no problem from within the app, but can I change the default msde
> instance to a named instance without losing the any data, and without
> reinstalling msde?
>
|||Hi Robbs,
You can not change a default installation to a named instance.
You will have to reinstall MSDE as a named instance.
You will not loose data. Just make sure that you backup the database.
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Thanks everyone!! Thats what I figured I would have to do; just wnated to
make sure there was no easier way.
Thnx Robb
"Ashish Ruparel [MSFT]" <v-ashrup@.online.microsoft.com> wrote in message
news:9k5UMmJOEHA.2692@.cpmsftngxa10.phx.gbl...
> Hi Robbs,
> You can not change a default installation to a named instance.
> You will have to reinstall MSDE as a named instance.
> You will not loose data. Just make sure that you backup the database.
> HTH
> Ashish
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>

Change default server collation

Hi,
How do I change the default server collation of my SQL server ?
I would hate to do a complete reinstall :-)
Thanks in advance...
Kind regards
Soren
Default collation for what?
When you do CREATE DATABASE, default collation is the collation you have for the system databases.
This you picked when you installed SQL Server. You change it using rebuildm.exe (which scratches
everything in the system databases).
When you CREATE TABLE, default collation for the string columns is the default collation you have
for the database (see above). You can change default column for a database using ALTER Database,
which doesn't change collation for existing tables. For that you need to use ALTER TABLE ... ALTER
COLUMN.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How do I change the default server collation of my SQL server ?
> I would hate to do a complete reinstall :-)
>
> Thanks in advance...
> Kind regards
> Soren
>
|||> Default collation for what?
For my server (of course) !!
When first installing the server you are asked for a default collation which
is used when creating new databases (when you are not able to specify
perferred collation for the database you are creating) - say SAP Business
One creates it's own databases in the server, and the collation on each
alfanumeric field will be the default *server* collation, as its not
possible to specify the perferred collation for the database !!!!
I'll have a look at rebuildm.exe, thanks...
Soren
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev i
en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
> Default collation for what?
> When you do CREATE DATABASE, default collation is the collation you have
> for the system databases. This you picked when you installed SQL Server.
> You change it using rebuildm.exe (which scratches everything in the system
> databases).
> When you CREATE TABLE, default collation for the string columns is the
> default collation you have for the database (see above). You can change
> default column for a database using ALTER Database, which doesn't change
> collation for existing tables. For that you need to use ALTER TABLE ...
> ALTER COLUMN.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
>
|||Hi
As Tibor pointed out you will be able to change a collation on database
level or even column level.
Please take a look at ALTER DATABASE ... and ALTER TABLE ...ALTER COLUMN
commands in the BOL.
"Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
news:%23U5kohIgFHA.3940@.tk2msftngp13.phx.gbl...
> For my server (of course) !!
> When first installing the server you are asked for a default collation
which[vbcol=seagreen]
> is used when creating new databases (when you are not able to specify
> perferred collation for the database you are creating) - say SAP Business
> One creates it's own databases in the server, and the collation on each
> alfanumeric field will be the default *server* collation, as its not
> possible to specify the perferred collation for the database !!!!
> I'll have a look at rebuildm.exe, thanks...
> Soren
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev i
> en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
system
>
|||Hi Uri,
Yes - I know I need to run these scripts to change collations on the
objects. But to change default collation for the server I need something
like the rebuildm.exe tool (as Tibor also pointed out)
My problem was not collation on my objects, but default collation for the
server!!
Soren
"Uri Dimant" <urid@.iscar.co.il> skrev i en meddelelse
news:OqcUqlIgFHA.3692@.TK2MSFTNGP09.phx.gbl...
> Hi
> As Tibor pointed out you will be able to change a collation on database
> level or even column level.
> Please take a look at ALTER DATABASE ... and ALTER TABLE ...ALTER COLUMN
> commands in the BOL.
>
>
> "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> news:%23U5kohIgFHA.3940@.tk2msftngp13.phx.gbl...
> which
> system
>
|||Hi
You can look it up in Books On Line. Search for Collation or look under
Installing SQL Sever ->Collation Options for International Support ->
Changing Collation Settings after setup.
Regards
Steen
Soeren S. Joergensen wrote:
> Hi,
> How do I change the default server collation of my SQL server ?
> I would hate to do a complete reinstall :-)
>
> Thanks in advance...
> Kind regards
> Soren

Change default server collation

Hi,
How do I change the default server collation of my SQL server '
I would hate to do a complete reinstall :-)
Thanks in advance...
Kind regards
SorenDefault collation for what?
When you do CREATE DATABASE, default collation is the collation you have for the system databases.
This you picked when you installed SQL Server. You change it using rebuildm.exe (which scratches
everything in the system databases).
When you CREATE TABLE, default collation for the string columns is the default collation you have
for the database (see above). You can change default column for a database using ALTER Database,
which doesn't change collation for existing tables. For that you need to use ALTER TABLE ... ALTER
COLUMN.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How do I change the default server collation of my SQL server '
> I would hate to do a complete reinstall :-)
>
> Thanks in advance...
> Kind regards
> Soren
>|||> Default collation for what?
For my server (of course) !!
When first installing the server you are asked for a default collation which
is used when creating new databases (when you are not able to specify
perferred collation for the database you are creating) - say SAP Business
One creates it's own databases in the server, and the collation on each
alfanumeric field will be the default *server* collation, as its not
possible to specify the perferred collation for the database !!!!
I'll have a look at rebuildm.exe, thanks...
Soren
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev i
en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
> Default collation for what?
> When you do CREATE DATABASE, default collation is the collation you have
> for the system databases. This you picked when you installed SQL Server.
> You change it using rebuildm.exe (which scratches everything in the system
> databases).
> When you CREATE TABLE, default collation for the string columns is the
> default collation you have for the database (see above). You can change
> default column for a database using ALTER Database, which doesn't change
> collation for existing tables. For that you need to use ALTER TABLE ...
> ALTER COLUMN.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
>> Hi,
>> How do I change the default server collation of my SQL server '
>> I would hate to do a complete reinstall :-)
>>
>> Thanks in advance...
>> Kind regards
>> Soren
>|||Hi
As Tibor pointed out you will be able to change a collation on database
level or even column level.
Please take a look at ALTER DATABASE ... and ALTER TABLE ...ALTER COLUMN
commands in the BOL.
"Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
news:%23U5kohIgFHA.3940@.tk2msftngp13.phx.gbl...
> > Default collation for what?
> For my server (of course) !!
> When first installing the server you are asked for a default collation
which
> is used when creating new databases (when you are not able to specify
> perferred collation for the database you are creating) - say SAP Business
> One creates it's own databases in the server, and the collation on each
> alfanumeric field will be the default *server* collation, as its not
> possible to specify the perferred collation for the database !!!!
> I'll have a look at rebuildm.exe, thanks...
> Soren
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev i
> en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
> > Default collation for what?
> >
> > When you do CREATE DATABASE, default collation is the collation you have
> > for the system databases. This you picked when you installed SQL Server.
> > You change it using rebuildm.exe (which scratches everything in the
system
> > databases).
> >
> > When you CREATE TABLE, default collation for the string columns is the
> > default collation you have for the database (see above). You can change
> > default column for a database using ALTER Database, which doesn't change
> > collation for existing tables. For that you need to use ALTER TABLE ...
> > ALTER COLUMN.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> > Blog: http://solidqualitylearning.com/blogs/tibor/
> >
> >
> > "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> > news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
> >> Hi,
> >>
> >> How do I change the default server collation of my SQL server '
> >>
> >> I would hate to do a complete reinstall :-)
> >>
> >>
> >> Thanks in advance...
> >>
> >> Kind regards
> >> Soren
> >>
> >
>|||Hi Uri,
Yes - I know I need to run these scripts to change collations on the
objects. But to change default collation for the server I need something
like the rebuildm.exe tool (as Tibor also pointed out)
My problem was not collation on my objects, but default collation for the
server!!
Soren
"Uri Dimant" <urid@.iscar.co.il> skrev i en meddelelse
news:OqcUqlIgFHA.3692@.TK2MSFTNGP09.phx.gbl...
> Hi
> As Tibor pointed out you will be able to change a collation on database
> level or even column level.
> Please take a look at ALTER DATABASE ... and ALTER TABLE ...ALTER COLUMN
> commands in the BOL.
>
>
> "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> news:%23U5kohIgFHA.3940@.tk2msftngp13.phx.gbl...
>> > Default collation for what?
>> For my server (of course) !!
>> When first installing the server you are asked for a default collation
> which
>> is used when creating new databases (when you are not able to specify
>> perferred collation for the database you are creating) - say SAP Business
>> One creates it's own databases in the server, and the collation on each
>> alfanumeric field will be the default *server* collation, as its not
>> possible to specify the perferred collation for the database !!!!
>> I'll have a look at rebuildm.exe, thanks...
>> Soren
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev
>> i
>> en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
>> > Default collation for what?
>> >
>> > When you do CREATE DATABASE, default collation is the collation you
>> > have
>> > for the system databases. This you picked when you installed SQL
>> > Server.
>> > You change it using rebuildm.exe (which scratches everything in the
> system
>> > databases).
>> >
>> > When you CREATE TABLE, default collation for the string columns is the
>> > default collation you have for the database (see above). You can change
>> > default column for a database using ALTER Database, which doesn't
>> > change
>> > collation for existing tables. For that you need to use ALTER TABLE ...
>> > ALTER COLUMN.
>> >
>> > --
>> > Tibor Karaszi, SQL Server MVP
>> > http://www.karaszi.com/sqlserver/default.asp
>> > http://www.solidqualitylearning.com/
>> > Blog: http://solidqualitylearning.com/blogs/tibor/
>> >
>> >
>> > "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
>> > news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
>> >> Hi,
>> >>
>> >> How do I change the default server collation of my SQL server '
>> >>
>> >> I would hate to do a complete reinstall :-)
>> >>
>> >>
>> >> Thanks in advance...
>> >>
>> >> Kind regards
>> >> Soren
>> >>
>> >
>>
>|||Hi
You can look it up in Books On Line. Search for Collation or look under
Installing SQL Sever ->Collation Options for International Support ->
Changing Collation Settings after setup.
Regards
Steen
Soeren S. Joergensen wrote:
> Hi,
> How do I change the default server collation of my SQL server '
> I would hate to do a complete reinstall :-)
>
> Thanks in advance...
> Kind regards
> Sorensql

Change default server collation

Hi,
How do I change the default server collation of my SQL server '
I would hate to do a complete reinstall :-)
Thanks in advance...
Kind regards
SorenDefault collation for what?
When you do CREATE DATABASE, default collation is the collation you have for
the system databases.
This you picked when you installed SQL Server. You change it using rebuildm.
exe (which scratches
everything in the system databases).
When you CREATE TABLE, default collation for the string columns is the defau
lt collation you have
for the database (see above). You can change default column for a database u
sing ALTER Database,
which doesn't change collation for existing tables. For that you need to use
ALTER TABLE ... ALTER
COLUMN.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How do I change the default server collation of my SQL server '
> I would hate to do a complete reinstall :-)
>
> Thanks in advance...
> Kind regards
> Soren
>|||> Default collation for what?
For my server (of course) !!
When first installing the server you are asked for a default collation which
is used when creating new databases (when you are not able to specify
perferred collation for the database you are creating) - say SAP Business
One creates it's own databases in the server, and the collation on each
alfanumeric field will be the default *server* collation, as its not
possible to specify the perferred collation for the database !!!!
I'll have a look at rebuildm.exe, thanks...
Soren
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev i
en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
> Default collation for what?
> When you do CREATE DATABASE, default collation is the collation you have
> for the system databases. This you picked when you installed SQL Server.
> You change it using rebuildm.exe (which scratches everything in the system
> databases).
> When you CREATE TABLE, default collation for the string columns is the
> default collation you have for the database (see above). You can change
> default column for a database using ALTER Database, which doesn't change
> collation for existing tables. For that you need to use ALTER TABLE ...
> ALTER COLUMN.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> news:e7O%237RIgFHA.2548@.TK2MSFTNGP10.phx.gbl...
>|||Hi
As Tibor pointed out you will be able to change a collation on database
level or even column level.
Please take a look at ALTER DATABASE ... and ALTER TABLE ...ALTER COLUMN
commands in the BOL.
"Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
news:%23U5kohIgFHA.3940@.tk2msftngp13.phx.gbl...
> For my server (of course) !!
> When first installing the server you are asked for a default collation
which
> is used when creating new databases (when you are not able to specify
> perferred collation for the database you are creating) - say SAP Business
> One creates it's own databases in the server, and the collation on each
> alfanumeric field will be the default *server* collation, as its not
> possible to specify the perferred collation for the database !!!!
> I'll have a look at rebuildm.exe, thanks...
> Soren
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> skrev i
> en meddelelse news:OWjQUaIgFHA.3912@.tk2msftngp13.phx.gbl...
system[vbcol=seagreen]
>|||Hi Uri,
Yes - I know I need to run these scripts to change collations on the
objects. But to change default collation for the server I need something
like the rebuildm.exe tool (as Tibor also pointed out)
My problem was not collation on my objects, but default collation for the
server!!
Soren
"Uri Dimant" <urid@.iscar.co.il> skrev i en meddelelse
news:OqcUqlIgFHA.3692@.TK2MSFTNGP09.phx.gbl...
> Hi
> As Tibor pointed out you will be able to change a collation on database
> level or even column level.
> Please take a look at ALTER DATABASE ... and ALTER TABLE ...ALTER COLUMN
> commands in the BOL.
>
>
> "Soeren S. Joergensen" <nospam@.nodomain.com> wrote in message
> news:%23U5kohIgFHA.3940@.tk2msftngp13.phx.gbl...
> which
> system
>|||Hi
You can look it up in Books On Line. Search for Collation or look under
Installing SQL Sever ->Collation Options for International Support ->
Changing Collation Settings after setup.
Regards
Steen
Soeren S. Joergensen wrote:
> Hi,
> How do I change the default server collation of my SQL server '
> I would hate to do a complete reinstall :-)
>
> Thanks in advance...
> Kind regards
> Soren