Are Duplicate Instance Names A Problem If Physical Server Names Are Different?
If I restore the master database from ServerA to ServerB and start the SQL Server services on ServerA and ServerB, the master databases will be identical and running sp_helpserver and @@ServerName will indicate the SQL Server instance for both instances is ServerA. Is this ok considering the physical server names are different?
If this is ok, how does SQL Server advertise on the network who it is? Does it append the physical server name to the SQL Server instance name during network communications?
Thanks, Dave
View Complete Forum Thread with Replies
Related Forum Messages:
DB Mirroring: Different Server Names With Same Instance Names
I'm going to be setting up DB mirroring between two SQL Server 2005 boxes. Since these are on two different servers, can the instance names be the same? Is there any reason NOT to do so if the mirror server is going to be used exclusively for DB mirroring? For example: if the my primary DB is located on SERVER1INSTANCE1, can the mirror be SERVER2INSTANCE1 or do the instance names have to be different even though they're on different boxes. Thanks!
View Replies !
Server Names Or Instance Names
Hello there. I'm trying to populate a drop down box with a list of all available instances of SQL server (express or not) available on a network. To list all instances I'm using EnumAvailableServers() in SmoApplication. The issue is that the Instance column in the returned data table is always empty, and both the Name and the Server columns contain the same string -- the name of the computer the SQL server is installed. Locally I have SSE installed, the instance name is <computer_name>SQLEXPRESS, however, using Smo I can't seem to get to the either full instance name or just the instance name. I can't assume SQLEXPRESS, since there may be more than one installed. Alternately I used EnumRegisteredServers() in SmoApplication.SqlServerRegistrations and that, while returning instance information (can be retrieved from the RegisteredServer in the returned collection), doesn't always return the remote SQL servers in the list. Any idea how can this be done? Maybe I'm going at it the wrong way, maybe there's another class / method I need to use to retrieve all instances? Thank you
View Replies !
Duplicate Names And DOB
I have a client table containing Client ID, DOB First Name and Last Name Etc. I would like to run a query to identify rows where the Last name is similar and the DOB is a match but to also include the client ID and name in the row. I have used the below query with the soundex function, but I would like to alter it to show the clientID and name. Any help would be really appreciated. SELECT DOB, soundex(Lastname) AS NameSoundex, count(*) as Duplicates FROM ClientsALL GROUP BY DOB, soundex(lastname) HAVING COUNT(*) > 1 Thanks
View Replies !
Duplicate Names In Sysindexes Table
WHen researching an index name problem, I found duplicate index names in sysindexes, referencing the same table. I notice that one of the indexes has a status = 2097154 and a indid of 2 while the other has a status of 0 and a indid of 0. I believe these are duplicates. Anybody have an idea if these really are and what the status and indid fields mean?
View Replies !
Query Returning Duplicate Field Names
I have a .NET program that can connect to either an Access 97 database or anSQL Server 7 database. In the database I have two tables which have a fieldcalled ID. When I run a query like "SELECT A.*, B.* FROM A, B", the queryreturns those fields as "A.ID" and "B.ID" when connected to Access 97, butas "ID" and "ID" in SQL Server 7. Is there anyway to get SQL Server toprepend the table name to the field name in a case like this and not returnduplicate field names like that without having to specify aliases for thefields?- Don
View Replies !
.dbf File Import (duplicate Field Names)
I am importing a file creating by an application which exports the file into .dbf format. Very unfortunately, this .dbf file can have fields with IDENTICAL column_names. Utilizing ActiveX, I create an ado connection to the .dbf file using a visual foxpro drver. However, and not unexpectantly, I can not do the 'select *' from the file if there are duplicate names. Can anyone make recommendations here that might help? Oh, this is SQL200 in case that impacts what you might advise!!!!
View Replies !
DISTINCT Not Working To Eliminate Duplicate Column Names
In my employee table has the following fields empid, empFname, empLname, email, city Say it has data like follows: 1, Lucy, Sam, l@some.com, city1 2. Sam, Wite, l@some.com, city2 3. Laura, Mac, l@some.com, city2 4. Stacy, Soo, s@no.com , city1 So in my case I want to show all the column but I want to eliminate multiple email addresses. I tried Distinct but its not workin because here every column is not distinct. So what should I use? In my case I only want to show empID 1, 3, 4. I want to show all the columns
View Replies !
Connecting To A Names Instance Through A Firewall.
Hi I am really struggling with this problem. I am connecting to several SQL 2000 servers on another LAN from my workstation and I have to go through a firewall. I got the firewall people to open port 1433 and was then able to connect any server with a default instance using Query Anlyzer and the IP address of the Server. When I try to connect from my workstation to a server with a named instance I am being blocked by the firewall before it gets to the server. I went into Client Network Utility on my workstation and removed named pipes which only left Tcpip using port 1433. Fire wall is now blocking “nbname UDP 137”. Is there a setting somewhere on my workstation that I can force the traffic to the named instance to use Tcpip through port 1433. Any Help would be great.
View Replies !
Table Names And Field Names
I'm trying to do an update query that looks like this: UPDATE PAEMPLOYEE SET PAEMPLOYEE.LOCAT_CODE = EMPLOYEE.PROCESS_LEVEL FROM PAEMPLOYEE A JOIN EMPLOYEE B ON A.EMPLOYEE = B.EMPLOYEE It's erroring out on the Employee prefix B.EMPLOYEE saying: ..."does not match with a table name or alias name used in the query" Is it wrong or will it cause problems to have a field name the same as the table name?
View Replies !
Option For A 2005 Multi Instance Server With 8 GB Of Physical Ram
I wanted to verify what option are available for a SQL Server 2005 server with 8 GB of RAM. Assuming I would not need to use more than 2 GB for any instance of SQL Server. Are the following options correct? Option 1 Windows 2003 R2 32-bit Enterpise Edition Server with AWE enabled Default Instance SQL Server 2005 32-bit Standard Edition AWE not enabled Named Instance 1 SQL Server 2005 32-bit Standard Edition AWE not enabled Named Instance 2 SQL Server 2005 32-bit Standard Edition AWE not enabled Option 2 Windows 2003 R2 64-bit Standard Edition Server Default Instance SQL Server 2005 32-bit Standard Edition AWE not enabled Named Instance 1 SQL Server 2005 32-bit Standard Edition AWE not enabled Named Instance 2 SQL Server 2005 32-bit Standard Edition AWE not enabled
View Replies !
Different Server Names
Hello, I am using ADO controls for MSSQL Database. The server name on my machine is different from the server name on the machine where i am running my application. When i make changes to my application, i have to rebuild the connection on my ADO Control. Is there a way to create a server name on my developement machine to match the server name where i run my application? Would appreciate any help.
View Replies !
Server Names
Are there any problems w/ installing SQL Server 7.0 on a computer with a name such as 05005sql? I know that SQL will take the computer name as the SQL Server name, however, I am concerned about the numeric beginning of the computer name. Any suggestions?
View Replies !
Changing Server Names
I changed the name of a server that runs SQL Server 2005 and Reporting Services web site. I can't connect back to reporting services now using the new server name. I had to do some things to get SQL Server and Analysis Services to work, but I can't find any information on getting Reporting Services to run, I found something about changing config files, but no direction on what those files are. Thanks for any help, JB
View Replies !
Could Not Get SQL Server Instances Names
Hello, Here is my setup: 2 node active/passive Microsoft cluster running SQL 2005 Enterprise Ed w/ SP2. The SQL setup is configured as a named instance, servernameinstancename. When I tried to install SCOM 2007, I'm getting this error, "Could not get SQL server instances names." What could be the cause of this error? Any help would be appreciated!!
View Replies !
Changing Server Names In Cluster
Hi, I was wondering if it is possible to change a server / virtual server name in a cluster? I'm aware you can change the IP address but I couldn't find anything on changing the server / virtual server name. I am curious because at some stage we'll be moving from NT 4.0 domain to W2K AD which will include changing all our server / workstation names. Any ideas or help is appreciated. Cheers Willz
View Replies !
Server Names And Valid Characters
Setup: I have run into the following problem several times: An NT Servr is named this-that. When I install SQL Server 6.5, it fusses about the server name and leaves the master..sysservers table empty. This is due to SQL 6.5 not allowing dashes in SQL server names even though NT Server allows it. (I`ve always thought this was strange, but whatever.) Question: Will this continue to be true under SQL 7.0? TIA
View Replies !
Retrieve Names Of Users From Sql Server
how to retrieve names of the users between start time and end time using stored procedure in sql server?? i have a table which stores user names along with other details. can anybody tell me how to get the names of the users between start time and end time??
View Replies !
How To Get The List Of Names Of The Databases Of A Server Using OleDbConnection In C#.......?
I want to get the names of the databases of the server using OleDbConnection in c# which i have to add in to a combobox.....the same task i achieved using SqlConnection where in there is a Class SqlClientCollectionNames...the code is as followsusing (SqlConnection connection =new SqlConnection("Data Source=server;User ID=username;Password=passwd")) { connection.Open(); DataTable myData = connection.GetSchema(SqlClientMetaDataCollectionNames.Databases); foreach (DataRow row in myData.Rows) comboBox1.Items.Add(row[0]); connection.Close();} but the same i did for OleDbConnection it is not working using (OleDbConnection connection =new OleDbConnection("Provider=SQLOLEDB;Data Source=server;User ID=username;Password=passwd")) { connection.Open(); DataTable myData = connection.GetSchema(SqlClientMetaDataCollectionNames.Databases);//no such method Databases present in OleDb namespace foreach (DataRow row in myData.Rows) comboBox1.Items.Add(row[0]); connection.Close(); } is there any other way to do this using OleDbConnection........??Please help
View Replies !
Changing Field Names Is SQL Server 2000
Why is it that when you change a field name is SQL Server it sometimes completely messes things up. I renamed a field in one of my tables from Emp# to EmpNumber. I had a view based on this table and naturally I knew I would have to change a view I had based on the table. I opened the view and changed the field from Emp# to EmpNumber but when I tried to open the view I got an error “Invalid column Name EMP#”. I have not been able to fix this. I have dropped and recreated the view, refreshed all the objects using enterprise manager, refreshed all the objects using Query Analyzer, shut down and restarted my computer, taken my database offline and put it back on line. The field name EMP# is not in any tables in my database and not referenced any views or procs . I am just starting on this database so I could verify this very easily because I only have a few views and procs. Has anyone had this problem or more importantly does anyone know why this is happening or how to fix it?
View Replies !
Rename Server Names In Enterprise Manager?
Hi there. Sorry 'bout my bad english. Is there any possibility, to change the current server name from the stuctureview in the Enterprise Manger. I'm registering a lot of online-servers from my customers. The remote servername is fixed of course, but I want to change it local, to explain it a little bit better (e.g. "W2KSQLSRV" -> "CustomerXY") Can someone give me a hint, please? Thanx.
View Replies !
Changing Linked Server Names Between Environments
If I have stored procedures that reference linked servers, is there any way to avoid changing the procedures when moving between environments (dev, qa, prod)? Do i resort to dynamic sql? Use case statements to switch between environments? Any experience or advice is appreciated.
View Replies !
Microsoft SQL Server Express 2005 Spaces In Names
Hi, I'm starting to develop an application using Microsoft SQL Server Express 2005. I was wondering if it can handle spaces in column names and/or table names? I know that in some sql languages, you have to surround the name with brackets like this: [column name with spaces] I was wondering how well MSSQL 2005 handles this and if it's a good idea to use spaces in names or if it's a better idea to just get rid of all the spaces altogether? Thanks!
View Replies !
SQL Server Cursor Names - Missing From Dm_exec_cursors? API_CURSOR0000000000000003435 ?
Hi, We have an application that uses a large number of cursors, and I can run sys.dm_exec_cursors (0) to view them. However, the 'name' column always appears to be NULL no matter when I run the query. I see, when tracking some blocked processes, that the blocked processes usually have in inputbuffer that looks something like FETCH API_CURSOR00000000000003435 - which I'm trying to map back to the cursor itself. However, I can't seem to do so based on the name - since it isn't in the DMV. Can anyone shed any light on this one? Thanks in advance, Chris Camadella chris@vroominc.com
View Replies !
Row Values As Column Names In Sql Server 2005-any Ideas?
The table tA contains (here I m using storedprocedure to return the values as columns varchar(8000)) ID LocationName 1 Door 2 FrontCounter The number of records may vary like sometimes it have 2 or 3 or 4 or more records So I have to return row values as column name. tAChild POSID storeID tAID Auth 1 140 1 true 1 140 2 false Result Should be like ( to create this I m using SP with Dynamic sql query to create temp table) POSID storeID Door Window 1 140 true true if more records in tA it should append in the end of result as new column... Is this the above is right way to implement ?any other ideas about this... Please suggest me......
View Replies !
ClickOnce Path Names Are Too Long For SQL Server Express Identifiers
I'm posting this in the ClickOnce forums as well... My application doesn't include the .mdf and .ldf files, rather it creates the database the first time the application is run using a script that is included in the build. I want to create the database in the ClickOnce data directory. The problem I'm having is that SQL Server complains when I execute the CREATE DATABASE command as follows: CREATE DATABASE [C:Documents and SettingsxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DataiFieldMobile.mdf] ON PRIMARY ( NAME = N'myDatabase', FILENAME = N'C:Documents and SettingsxxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DatamyDatabase.mdf' , SIZE = 3136KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'myDatabase_log', FILENAME = N'C:Documents and SettingsxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DatamyDatabase_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) END Here's the error: System.Data.SqlClient.SqlException "The identifier that starts with 'C:Documents and SettingsxxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.00' is too long. Maximum length is 128."
View Replies !
Forward Dependency Error In SQL Server Reporting Services Table Names
Hi I am creating a report on a database where some of the table names start with the @ sign - ie @table1. Reporting services picks this up as a parameter, instead of a table name in my query, even though I am encapsulating the table name in square brackets eg. [@table1] I have several data sets in the report that i am using to populate valid parameters. These datasets are all variations of queries from tables that have @ as the first character. When i then try to run the report i get an error message as follows: "The report parameter pool has a default value or a valid value that depends on the report parameter SD_POOLCONTRACTS. Forward dependencies are not valid" This is frustrating as SD_POOLCONTRACTS is not a report parameter but one of the database tables that has @ for it's first character. here is the query that i use to obtain the valid values for the pool report parameter that i am trying to set up. SELECT distinct u_poolcode as Pool FROM OCRD INNER JOIN OCRG ON OCRD.GroupCode = OCRG.GroupCode INNER JOIN CRD1 ON OCRD.CardCode = CRD1.CardCode inner JOIN [@SD_POOLCONTRACT] INNER JOIN [@SD_POOLCONTRCT_LINE] ON [@SD_POOLCONTRACT].DocEntry = [@SD_POOLCONTRCT_LINE].DocEntry INNER JOIN [@SD_CONTRACTS] ON [@SD_POOLCONTRCT_LINE].U_DocNo = [@SD_CONTRACTS].DocNum ON case when len(ocrd.fathercard) = 0 then ocrd.cardcode else ISNULL(OCRD.FatherCard, OCRD.CardCode) end = [@SD_CONTRACTS].U_CardCode WHERE (OCRD.CardType = 'c') AND (OCRG.GroupName LIKE N'producer%') AND (CRD1.AdresType = 'b') ORDER BY OCRG.GroupName, FatherCard, OCRD.CardCode Any help would be appreciated.
View Replies !
Checking Server Availability When Using Dynamic Server/DB Names
I am building an SSIS package that is hitting about 50 remote servers. I have a for each loop container that i am using to build the list of servers to run. The problem is...sometimes networks go down, sometimes connections time out and this causes my entire package to fail. I inserted a task that will run select @@ServerName on the remote server inside the loop. My thought was, if this returns an error I could ignore it and move on to the next server in the list and log somewhere that server x threw an error. Logging is easy, the problem is, how do I then tell it to move on to the next server in the loop? If anyone has any suggestions on how better to do this, I am open for alternatives...
View Replies !
2 Instance Accessing Same Physical Db File In A/A Cluster
hi, I have 2 nodes, both active in windows 2003 cluster. both nodes have sql 2005 installations (master db & bin in local drives) with same instance name. Now my production db physical files are on a shared disk. I attached these files to my sql 2005 instance from node 1. then i took this node offline & attached same physical files from node 2. Now when the failback happens, i get an inconsistency error from my client app. can anyone help me achieve this ?? 2 nodes accessing same mdf file but only one at a time. Is there any architectural issue which wud prevent me from achieveing the ACID properties ? its ok if i have to manually run some batch file to trigger instance on/off. sql clustering/db mirroring/ replication is the last option for me. thanks in advance
View Replies !
Get Column Names
Hi,How do I display the column names from my Sql server table?In asp3 the recordset allowed thisforeach key in rs ColumnName = key.name ColumnValue = key.valuenextHow do I do this in .Net?I want to use a DataReader so I can read through each record and only display the ones I want.TABLE_ONEColumn_OneColumn_TwoColumn_Threethanks,
View Replies !
Getting The Column Names
Hello, Im trying to get the column names from a database and display them in textboxes. someone has already helped me by tellnig me that i need to use the FillSchema command. Which works just fine and I can see only the colum names in a datagrid when i bind it to that. The problem is that I do not know how to extract the name of a column and put it in to a textbox ? does anybody know how I can fo this ? Thanks a million Rob
View Replies !
Weekday Names
Sql server 2000 -sql query analyzerselect datename(dw,'01-01-2006')returns sundayNow I do:set language danishselect datename(dw,'01-01-2006')returns sonday. But it should be søndag. Same goes forsaturday/lordag/lørdagTried substring'ing and ascii'ing/unicode'ing and it is AFAIK an o insteadof the special danish character ø.Is this a "feature" or am I doing something wrong?I "solved" it by doingselect case DATENAME(dw,'01-01-2006') WHEN 'lordag' THEN 'lørdag' WHEN'sondag' THEN 'søndag' ELSE DATENAME(dw,'01-01-2006') ENDbut it sure aint pretty./jim
View Replies !
Backup Names
Okay, here is a real mellon scratcher. I've got a server I've gotsemi-automated backups on. A typical backup looks like:BACKUP DATABASE MasterTO DISK = 'c:ackupsMaster20070418.bak'WITH FORMATThen I'll do a log backup if applicable (Not for Master). I then getsome error about the device being offline. But if I run:BACKUP DATABASE MasterTO DISK = 'c:ackupsMaster20070418.log'WITH FORMATthen it works fine. The ONLY thing I've changed is the extension onthe backup file. But that is what I wanted to name the log. As aworkaround I have the backups saved as:Master20070418-bak.log and then name the log files the way they shouldbe. That works, but I don't like it.Security is full access to Everyone, so I don't think it is an access/permissions issue.Any ideas?Thanks,-Utah
View Replies !
SP And Transaction Names
Is it possible for MS SQL 2k to get confused when we have two stored proces that has the same name for their transactions and both stored procs are exec at the same time? Example: Create Procedure SP1 as Begin Transaction TranName1 Commit Transaction TranName1 Begin Transaction TranName2 Commit Transaction TranName2 Create Procedure SP2 as Begin Transaction TranName2 Commit Transaction TranName2 Begin Transaction TranName3 Commit Transaction TranName3 We are seeing some very weird data corruption but luckily its been way under 1%(something like 500 bad rows out of a few million). The only thing we can think of since it is such a very low number is maybe when blocking occurs SQL has trouble handing two transactions with the same name in its queue. Beyond that we have no idea what could be causing this issue.
View Replies !
NT User Names
Hi Is it possible to obtain an NT username (with T-SQL) from a user connecting to SQL Server with a SQL log in via ODBC? Thanks in advance
View Replies !
Alternate Names
I need to implement support for alternate names on the database I’m working on. When a user looks up: “Antony Bigglesworth” the query would return both: Antony Bigglesworth as well as Tony Bigglesworth, would both exist. Anyone has a best practice on this or has done this before?
View Replies !
|