Showing posts with label creates. Show all posts
Showing posts with label creates. Show all posts

Thursday, March 22, 2012

Changing the (local) SQL Server registration name

Hi,
When we install SQL server, it creates a (local) SQL
Server registration. How can we change this name from
(local) to computer's name?
Thank you.
You should be able to access the server via (local), servername or ..
If you are talking about enterprise manager then just delete the registration and add one with the servername.
Check @.@.server_name you may have to add it via sp_addserver.
"anonymous@.discussions.microsoft.com" wrote:

> Hi,
> When we install SQL server, it creates a (local) SQL
> Server registration. How can we change this name from
> (local) to computer's name?
> Thank you.
>
|||I tried deleting the (local) registration but it created
a lot of problem. After deleting the (local) registration
I wasn't able to add it back. SQLAgent service wasn't
showing up in the service list.

>--Original Message--
>You should be able to access the server via (local),
servername or ..
>If you are talking about enterprise manager then just
delete the registration and add one with the servername.
>Check @.@.server_name you may have to add it via
sp_addserver.
>"anonymous@.discussions.microsoft.com" wrote:
>.
>
|||?
Are you talking about enterprise manager?
It's just a client and deleting a registration won't affect services running on the m/c.
The agent service is separate from the server and may have not been started.
See if the mssqlserver service is running - if so you should be able to regidter in enterprise manager.
"anonymous@.discussions.microsoft.com" wrote:

> I tried deleting the (local) registration but it created
> a lot of problem. After deleting the (local) registration
> I wasn't able to add it back. SQLAgent service wasn't
> showing up in the service list.
>
> servername or ..
> delete the registration and add one with the servername.
> sp_addserver.
>

Changing the (local) SQL Server registration name

Hi,
When we install SQL server, it creates a (local) SQL
Server registration. How can we change this name from
(local) to computer's name?
Thank you.You should be able to access the server via (local), servername or ..
If you are talking about enterprise manager then just delete the registration and add one with the servername.
Check @.@.server_name you may have to add it via sp_addserver.
"anonymous@.discussions.microsoft.com" wrote:
> Hi,
> When we install SQL server, it creates a (local) SQL
> Server registration. How can we change this name from
> (local) to computer's name?
> Thank you.
>|||I tried deleting the (local) registration but it created
a lot of problem. After deleting the (local) registration
I wasn't able to add it back. SQLAgent service wasn't
showing up in the service list.
>--Original Message--
>You should be able to access the server via (local),
servername or ..
>If you are talking about enterprise manager then just
delete the registration and add one with the servername.
>Check @.@.server_name you may have to add it via
sp_addserver.
>"anonymous@.discussions.microsoft.com" wrote:
>> Hi,
>> When we install SQL server, it creates a (local) SQL
>> Server registration. How can we change this name from
>> (local) to computer's name?
>> Thank you.
>.
>|||?
Are you talking about enterprise manager?
It's just a client and deleting a registration won't affect services running on the m/c.
The agent service is separate from the server and may have not been started.
See if the mssqlserver service is running - if so you should be able to regidter in enterprise manager.
"anonymous@.discussions.microsoft.com" wrote:
> I tried deleting the (local) registration but it created
> a lot of problem. After deleting the (local) registration
> I wasn't able to add it back. SQLAgent service wasn't
> showing up in the service list.
>
> >--Original Message--
> >You should be able to access the server via (local),
> servername or ..
> >If you are talking about enterprise manager then just
> delete the registration and add one with the servername.
> >
> >Check @.@.server_name you may have to add it via
> sp_addserver.
> >
> >"anonymous@.discussions.microsoft.com" wrote:
> >
> >> Hi,
> >>
> >> When we install SQL server, it creates a (local) SQL
> >> Server registration. How can we change this name from
> >> (local) to computer's name?
> >>
> >> Thank you.
> >>
> >.
> >
>

Changing the (local) SQL Server registration name

Hi,
When we install SQL server, it creates a (local) SQL
Server registration. How can we change this name from
(local) to computer's name?
Thank you.You should be able to access the server via (local), servername or ..
If you are talking about enterprise manager then just delete the registratio
n and add one with the servername.
Check @.@.server_name you may have to add it via sp_addserver.
"anonymous@.discussions.microsoft.com" wrote:

> Hi,
> When we install SQL server, it creates a (local) SQL
> Server registration. How can we change this name from
> (local) to computer's name?
> Thank you.
>|||I tried deleting the (local) registration but it created
a lot of problem. After deleting the (local) registration
I wasn't able to add it back. SQLAgent service wasn't
showing up in the service list.

>--Original Message--
>You should be able to access the server via (local),
servername or ..
>If you are talking about enterprise manager then just
delete the registration and add one with the servername.
>Check @.@.server_name you may have to add it via
sp_addserver.
>"anonymous@.discussions.microsoft.com" wrote:
>
>.
>|||?
Are you talking about enterprise manager?
It's just a client and deleting a registration won't affect services running
on the m/c.
The agent service is separate from the server and may have not been started.
See if the mssqlserver service is running - if so you should be able to regi
dter in enterprise manager.
"anonymous@.discussions.microsoft.com" wrote:

> I tried deleting the (local) registration but it created
> a lot of problem. After deleting the (local) registration
> I wasn't able to add it back. SQLAgent service wasn't
> showing up in the service list.
>
> servername or ..
> delete the registration and add one with the servername.
> sp_addserver.
>sql

Sunday, February 12, 2012

Changing Datatype length

Hi all,
I need to change a varchar from 35 to 50. In the SQL Server books on
line it says that SQL Server actually creates a new table when you
change the length. I ran a test in a test database and it appears the
only thing that changes is the length. All the data remains in tact.

The table with the column I want to modify is very critical. Is there
any chance I would loose data if I change the length to a larger size? I
am making a back up of the table just in case. Thanks,
KellyKelly Prendergast (kelly.prendergast@.noaa.gov) writes:
> I need to change a varchar from 35 to 50. In the SQL Server books on
> line it says that SQL Server actually creates a new table when you
> change the length. I ran a test in a test database and it appears the
> only thing that changes is the length. All the data remains in tact.
> The table with the column I want to modify is very critical. Is there
> any chance I would loose data if I change the length to a larger size? I
> am making a back up of the table just in case. Thanks,

If you use "ALTER TABLE tbl ALTER COLUMN col varchar(50)"
all that will happens is that metadata will be updated, which will occur
in a snap. If you were to change a char(35) column to char(50), I
would expect it to be different, because in this case SQL Server would
move around data to leave room for the value.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <sommar@.algonet.se> wrote in message
news:Xns9442489D4AB0Yazorman@.127.0.0.1...
> Kelly Prendergast (kelly.prendergast@.noaa.gov) writes:
> > I need to change a varchar from 35 to 50. In the SQL Server books on
> > line it says that SQL Server actually creates a new table when you
> > change the length. I ran a test in a test database and it appears the
> > only thing that changes is the length. All the data remains in tact.
> > The table with the column I want to modify is very critical. Is there
> > any chance I would loose data if I change the length to a larger size? I
> > am making a back up of the table just in case. Thanks,
> If you use "ALTER TABLE tbl ALTER COLUMN col varchar(50)"
> all that will happens is that metadata will be updated, which will occur
> in a snap. If you were to change a char(35) column to char(50), I
> would expect it to be different, because in this case SQL Server would
> move around data to leave room for the value.

I want to add to Erland's answer to address the final question. You will
NOT lose data.

SQL Server treats this as a transactional change so either the change will
complete in full, or nothing will change.

If it DOES create a new table the pseudo-SQL is:

Begin Tran
select into TEMP from FOO
drop table FOO
sp_renameobject TEMP to FOO
if error ROLLBACK Tran
else End tran

So the change is completely atomic. Nothing to worry about.

>
> --
> Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp