CHANGE SERVER NAME IN SQL SERVER 2008 - sql

Can someone help me to change the server name in sql server 2008 please.
In this picture you see the server called SERVIDOR1
And if you query select ##servername you see the name I want. How can I change the first one ?
Why are they differents? I need to change the first name you see in first pic
Thanks so much

You have 2 different SQL Server instances, one is default instance, you see it as SERVIDOR1 (that is your host name), the second is named instance: SERVIDOR1\SQLEXPRESS.
You cannot change the name of default instance as well as you cannot have 2 default instances on 1 pc, so if you want to get rid of the first instance you can uninstall it.
You can see both instances in the Configuration Manager or in Windows Services.

Related

SQL update two different server

I have two SQL server [example]:
1st - 10.101.102.133
2nd - 10.101.102.155
Both having the same database with same names and fields.
My application will update in the 1st server.
Can I actually configure the 1st server that once it received update query, it will update in 2nd server as well?
I do not wish to change my application source code but instead want to make configuration on the server itself.

Run a Sql Query on multiple Servers and each server has different databases(database name is diff on each server) with same tables

Run a Sql Server Query on multiple Servers and each server has different databases(database name is diff on each server) with same tables
In the management studio, you can register multiple servers into one group. Then you can run query on the group.
In SSMS open Registered Servers and create a New Server Group under Local Server Groups.
Under this group create New Server Registration for each server you wish to query. If the DB names are different ensure to set a default for each in the properties. You can register a server/instance multiple times with different default DBs.
Now go back to the Group you created in the first step, right click and select New Query. A new query window will open and any query you run will be executed on each server in the group. The results are presented in a single data set with an extra column name indicating which server the record came from. If you use the status bar you will note the server name is replaced with multiple.

I'm trying to get a variable for local IP that the SQL Server Agent can use in a table

I'm writing an insert into a linked server table that includes the IP the of the local server. When SSMS into the server and exec the SP, it provides the correct information into the Linked table.
When the SQL Agent runs the job for itself its returning 'NULL' and inserting Null into the remote table instead of the local IP. I'm sure this is because there is no "local" IP being used as it is using its only ports ect.
Specifically talking about the Connectionproperty('local_net_address)
set #vcLocalIP= convert (varchar,CONNECTIONPROPERTY('local_net_address'))
Any Help or Ideas on this would be greatly appreciated. Just trying to craft this SP so it can be put on different servers and all return the relevant information with as little "manual" intervention as possible.

Access data from other instance

Friends,
Please let me know how to get the data from other local instance in sql server 2012.
I have 2 instance in my local server. I want get data from the table that staored in other instance.
Server 1 : ICS2012\ICS2012 - Default Instance
Server 2: ICSDBONLINE\NEWINSTANCE_1 - Newly created
Table named "Black_List" stored in Default Instance(ICS2012), how to access same table in NEWINSTANCE_1.
Please help me...
The following describes in general how to connect to other data sources:
http://technet.microsoft.com/en-us/library/ms175807(v=sql.105).aspx
I'm not sure if there is any shortcut to doing this as the external data source is SQL Server however.

Going from clustered environment with named SQL instance to single VM server with the default instance but

I want to keep the original named instance name. Nearly a decade ago, a contractor set up our clustered environment (Svr1 and Svr2) and installed SQL Enterprise on it for its failover capabilities, creating a named instance - MELDSQL
We need to replace the hardware and have created a VM server with SQL Server to test the environment. The VM server (say 'NewVMSvr') has a default SQL instance on it called NewVMSvr.
Problem is, in the ensuing 10 years, a whole host of hooks have been built using MELDSQL as the reference. Changing those would be a task outside of the possible project scope.
What I'd like to do is turn off the MELDSQL cluster (Svr1 and 2) and rename NewVMSvr to MELDSQL. We've determined that our AD has no record of the value "MELDSQL".
According to: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c07ab906-dabf-4303-9737-d430d82c4f42/how-to-rename-instance-of-sql-server-2008-r2
renaming a default instance would appear to be pretty straight forward.
What am I missing?
I am confused. Is MELDSQL a virtual cluster name with default SQL instance?
There is named instance example COMPUTERNAME\InstanceName.
If MELDSQL is a virtual name then there is DNS record for it and you can ping MELDSQL.
In this case you have to rename NewVMSvr to MELDSQL and change SQL name as it described in http://msdn.microsoft.com/en-us/library/ms143799.aspx
If you have COMPUTERNAME\MELDSQL then it is a different story. Please make it clear.