Accessing Mirrored DBs On SQL2k5 (x86) From SQL2k

Sep 14, 2007

Hi


I'm trying to select data from a mirrored database situated on a SQL2k5 server, via a linked server on SQL2k.



I can select the data fine using SQLOLEDB but it's not aware of the mirroring so if the DB fails-over it errors.



To get around this, I installed SQLNCLI.msi to install the SQL2k5 provider and created a linked server like this:



exec sp_addlinkedserver @server=N'TEST2',@srvproduct=N'SQLNCLI',@provider=N'SQLNCLI',@provstr=N'Server=server1;failover partner=server2;'
exec master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'TEST2',@useself=N'False',@locallogin=NULL,@rmtuser=N'user',@rmtpassword='password'



Executing the statement: select * from test2.database.dbo.table



gives the following error:



Server: Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
OLE DB error trace [Non-interface error: Column 'IsActive' (compile-time ordinal 2) of object '"database"."dbo"."table"' was reported to have changed. The exact nature of the change is unknown].



If i change the statement to



select * from openquery(test2,'select * from database.dbo.table')



It works. I don't really want to have to go and refactor all the SQL though!



I've seen similar posts related to Oracle and SQL2k5 64bit but they don't seem to be relevant to this situation.



Here's the version info:



2000 server (SP3):



Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

2005 mirrored servers (SP2 3054):



Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

I've also tried applying the following to the 2005 servers: sp2(3159) sp2(3161) but makes no difference.


Any ideas?

TIA

View 1 Replies


ADVERTISEMENT

Convert A SQL2K Datafile To SQL2K5

Nov 28, 2005

Is it possible to convert a SQL2K datafile to SQL2K5? I have a 2K database that I need to easily convert to 2K5, I apprecaite any insight on this issue. 

View 1 Replies View Related

Seperate SQL 2K Publisher, SQL2K Distributor, SQL2K5 Subscriber

Feb 17, 2006

Hi,

We are about to alter our replication architecture from

 SQL 2K publisher/SQL 2K5 distributor/subscriber

 to

 SQL 2K publisher, seperate SQL 2K distributor and SQL 2K5 subscriber.

 The subscriptions will be pulled from the distributor and pushed to the subscriber. Basically, all the work will be done by the distributor (in the hope of improving performance).

Has anyone had any experience of a similar architecture? All SQL servers are running with the latest service packs.

View 9 Replies View Related

Migrating From SQL2K Named Instance To SQL2K5 Default Instance

Feb 19, 2007

Hi, I have a task in hand to migrate (upgrade) from SQL2K named instance to SQL2K5 default instance. There are many intranet applications touching current SQL2K. I would like to perform this upgrade such that I don't have to touch any application code - meaning I don't have to change the connectionstring to point to new Default instance. How can I achieve this?

So, in otherwords, here is what I want to achieve:

Current Server: SQL2K: SERVER_AINSTANCE_A (named instance)

Upgraded Server: SQL2K5: SERVERB (default instance)

If I have both default, I could achive this by setting up DNS alias after migration done so that any call for SERVER_A would point to SERVER_B. But in my case, I don't have SERVER_A, I have named instance. Is there any solution?

Regards,

Vipul

View 1 Replies View Related

Accessing SQL2K Using MS ACCESS

May 3, 2007

When I access SQL2K using ODBC (linked table manager), I am not able to display any data. The columns show #Deleted as their data values. How do I display data in ACCESS from SQL2K tables?

View 18 Replies View Related

Can Msdb From SQL2K Personal Edition Be Restored On SQL2K Standard?

Oct 12, 2007

The company for which I work did not have a DBA until I started a few weeks ago. Whoever installed SQL2K used the wrong CD so they have been running Personal Edition on their servers. I have installed a new SQL2K standard instance and have restored everything except the jobs and DTS packages. Can the msdb from the Personal edition be restored to the standard instance?

View 3 Replies View Related

Downgrade SQL2K Enterprise To SQL2K Standard

Mar 15, 2007

Is it possible to downgrade SQL from Enterprise to Standard Edition, or do you have to remove the previous installation (uninstall) and reinstall. Meaning you would also have to restore all user databases? Thanks.

View 1 Replies View Related

Mirrored Backups

Jul 14, 2007

Just want to know if anyone knows the actual syntax to do a Mirrored Backup
in SQL Server 2005 Ent Ed.

With Overwrite
with Verification
Disk to Disk

Also want to know if what their experience with Mirrored Backups.
Things to watch for etc.

Thanks in advance for you help on this.



Larry :-)

View 1 Replies View Related

Mirrored Sql Servers

Nov 3, 2005

Hello:I have 2 MS SQL Servers 2000 Developer edition.Both have same settings and databases. I'd like to have them as mirroredservers - all transaction on one server must be performed on the otherautomatically. More than that I'd like to get possible if something happenedto one server, all transactions will be performed on another one.Please, give me a hint how to do that.Thanks,GB

View 6 Replies View Related

Failover When The Dbb Is Not Mirrored

Jan 2, 2008



Hi there!

I use different udls for a website which is partly asp pages and partly aspx pages.
Every database is mirrored, so each udl indicates a "failover partner". However we decided recently that one of the database would not be mirrored anymore. For this database we still use in the udl a "failover partner" to redirect the connection to the second database in case of a failover. For the asp pages the failover works fine even if the database is not mirrored, but it doesn't work for the aspx pages.

It would be great if anyone had an idea why the behaviour is not the same for the aspx pages, and if we can still use a "failover partner" in udls even if the database is not mirrored.. if not, what should we use to connect to another database?

Any help is welcome!

idel

View 3 Replies View Related

SP2 In SQL2k5

Dec 28, 2007

Have people installed SP2 on SQL2k5 . Any problems / issues with that especially wrt failover clustering .

View 4 Replies View Related

How To Connect To A Mirrored SQL Server?

Jan 30, 2006

SQL Configuration:  Two 2003 Servers (OS Std ver) with SQL 2005 (Std ver) configured for db mirroring.  (The servers aren't clustered.)
Web.config configuration string is using "ServerA".
If we fail Server A, then Server B will change roles to "primary" in about 20 seconds (we have confirmed this via SQL Mgt Console).  BUT...our web app is still pointing to Server A and doesn't seem to know there is a fail over.  SO - how can I make the web app aware of the failure?
Server A and Server B aren't in a cluster - and I understand a cluster's virtual server would be referenced in the connection string.  Is there a way to make the web app automatically switch to Server B (without a cluster configuration)?
From what I understand, the cluster configuration would require Ent Ed. of OS and SQL and a big fat check!! 
Thanks.
-Kevin

View 3 Replies View Related

Delete Of Mirrored Rows

Oct 6, 2005

hi.I've seen ways to delete duplicate rows.Can someone give me some sql to do this?I have a table with varchar table_name_start, varchar column_name,varchar table_name_end;it has rows like this:table1 col1 table2table1 col2 table 3table2 col1 table1I'd lke to delete the rows if they exist with the names swappedaround, i.e. like above since the first and third share a column nameand the table_name_start/end matches the others table_name_end/start,I'd like to delete one and leave the other.I'm scratching my head trying to figure this out.thanks

View 6 Replies View Related

Snapshot Of Mirrored Databases

Sep 25, 2007

Can I take a database snapshot of a mirrored database and restored that backup for use for reporting or production support?

Thansk in advance,

Ed

View 3 Replies View Related

Backup Of Mirrored Databases Using TSM

Nov 30, 2006

Hi,

I currently have 2 mirrored servers and would like to implement a backup solution using an existing TSM server. The first thing that comes to mind is using the TSM client or Litespeed by Quest, but I'd like to know the effects of performing backups on principal and mirrored servers first.

Will using one of these products cause errors or problems should the backup client try to backup a mirrored database? Can anyone make any recommendations on the effects of using TSM client or Litespeed for a mirrored environment?

Thanks.

View 4 Replies View Related

Unable To Add More Then 59 Mirrored Databases

Sep 24, 2006

The following problem occurs when trying to mirror multiple databases using SQL Server 2005:

After mirroring about 40 databases, an error occurred concerning a lack memory availability on the mirror-server.
I added the parameter /3GB to the boot.ini file and enlarged virtual memory space.

Now I was able to mirror a total of 59 databases. When trying to add the 60th database on the principal server, it won't get through.
I don't get any error message, neither the mirror starts.
However the SQL Server Management Studio on the mirror-server doesn€™t seem to respond to any commands given until the mirror is again removed for one or more databases on the principal server.
Adding the parameter /PAE to the boot.ini file, or enlarging the virtual memory again didn't bring the solution.

Both principal- and mirror-server are dual processor servers.

The principal is a Windows 2003 Server Standard x64 Edition service Pack 1 and runs:

SQL SERVER 2005:
Microsoft SQL Server Management Studio 9.00.2047.00
Microsoft Analysis Services Client Tools 2005.090.2047.00
Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.1830
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790

It has 4GB of memory.

The mirror is a 32-bit Windows 2003 Server Enterprise service Pack 1 and runs:

SQL SERVER 2005:
Microsoft SQL Server Management Studio 9.00.2047.00
Microsoft Analysis Services Client Tools 2005.090.2047.00
Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.1830
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790

It has 2GB of memory.


Is there a work-around for this problem?

Thanks for any help in advance.

View 2 Replies View Related

Upgrading Mirrored Databases

Apr 24, 2006

I am in the process of architecting SQL 2005 HA options and of course mirroring is at the top of the list. Does anybody know what the requirements are regarding upgrading mirrored databases, for example, applying hotfixes and service packs? Is it a requirement for the principal and mirror (and witness if applicable) to be at the same build level? Is there any requirement to upgrade one first and then the other as there is with replication topologies?

I had a look in BOL but can't find anything covering this (perhaps I missed it).

Thx, Simon.

View 5 Replies View Related

ADODB And Mirrored SQL-Server

Aug 24, 2006


I did setup a Mirrored Database. Connecting from it using ADO.NET works well. It goes to the Mirror if the Principal fails.

But ADODB does not work. I get the error following error:
80004005 Invalid connection string attribute

When trying to connect to the DB in case the principal failed and the mirror is active. (MyProductiveDB is in failover state)

What do I do wrong?


Here is the code:

ADOConn = New ADODB.Connection
ADOConn.Open(CS)

CS is my Connections-String:
"Provider=SQLNCLI.1;Data Source=MyProductiveDB;Failover Partner=MyMirror;Initial Catalog=MyCat;Persist Security Info=True;User ID=MyUser;Password=xxxxxx;Pooling=True;Connect Timeout=5;Application Name=MyApplic"

Remark: When I try to add "Network Library=dbmssocn" to the connection String, I get the same error, even if the Principal is active.

Your help is very much appreciated.
Beat

View 4 Replies View Related

Shrinking The Log File On A DB That Is Mirrored

Nov 17, 2006



Hello,

I'm having couple of DB that are mirrored.

my concerne is regarding the Log file size.

I'm running the following steps:

BACKUP DATABASE [DBName] TO DISK = N'Backup_File' WITH NOFORMAT, INIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10

then

BACKUP LOG [DBName] TO DISK = N'Backup_File' WITH NOFORMAT, NOINIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10

if I try to run a SHRINKFILE (DBName_log, 20)

I receive the following info:

Cannot shrink log file 2 (DBName_log) because all logical log files are in use

I'n a bit tense using a

BACKUP LOG [DBName] WITH TRUNCATE_ONLY

as it's part of a mirroring.

but I need to reduce the size of the log file.

thank four your suggestions

Eric

View 10 Replies View Related

Rebooting Mirrored Servers

Jun 7, 2007

New to SQL. Can you reboot the principal server after running updates without causing a failover?

If not what would the correct procedure be.

View 2 Replies View Related

DTS Scheduling In SQL2K5.

Apr 10, 2008

How to schedule a DTS package residing in LEGACY container, from SQL2K5?


------------------------
I think, therefore I am - Rene Descartes

View 5 Replies View Related

SQL2K5 Backup

Mar 30, 2007

In SQL2K EM you can right click a DB, and backup. Finally there is a option to schedule, which will create a job.

Is this option has been removed from SQL2K5?




------------------------
I think, therefore I am - Rene Descartes

View 7 Replies View Related

32-bit App Connectivity To 64-bit SQL2K5

May 9, 2008

Is there any reason why an application running on a 32-bit O/S that works with a SQL Server 2K database would not work with a SQL Server 2K5 64-bit database running on a 64-bit O/S?

It is my understanding that the connection layer (be it ODBC, OLEDB, ADODB, etc) would obfuscate any details regarding the underlying architecture... I wouldn't think the instructions sent would need to be any different, unless there is some deprecated call that is no longer supported.

Thanks in advance for any assistance!

View 5 Replies View Related

Sql 7 And Sql2K5 Living Together

Dec 17, 2007

Hello,

I have installed in a workstation (windows xp pro) sql 7 server (database engine + client tools).
After that I installed sql server 2005 with named instance (hostmyinstance).But I didn't end this installation.
I had a message saying me that there are problems on clients tools. moreover when I open a dos window and type "sqlcmd", I have the same message (client problems).
I then change my sql7 port to 1434 (which isn't the default port).But even with that my sql 2005 sqlcmd don't work correctly.
My question is :

can one install sql 7 (server + client tools) and sql 2005 (server + client tools) in the same machine ( a workstation [windows xp pro] )?

View 3 Replies View Related

Mirrored Subscriber In Transactional Replication ?

Apr 30, 2008

Hi,

I am trying to setup mirrored subcriber in Transactional Replication in SQL 2005. I am not able to do so as it don't work after failover.However I am able to setup mirrored publisher with distribution property "PublisherFailoverPartner" for snapshot and log reader agent profiles and it works even after failover.

However I need to know, do we have something called "Subscriberfailoverproperty" or any other method to set up mirrored subscriber in Transactional Replication in SQL 2005.


Thanks

Kiran Patil

View 6 Replies View Related

Mirroring :: How To Shrink Transaction Log On Mirrored DB

Oct 7, 2015

Today, I became an involuntary DBA until my company finds someone else. We have an SQL R2 DB that is mirrored that failed dur to the transaction log growing and filling up the disk. As a band aid remedy, I was able to add 20GB to the disk (it is a VM) and then I backed up the Transaction log and did select log_reuse_wait_desc from sys.databases where name = 'mydb' and the result showed that the backup was successful (NOTHING, I think was the result).

After this I was able to resume the mirror and everything has been running fine. What I need to do now is to shrink the Transaction log so that if it starts to grow again, I will get an alert and can avoid today's issue. From what I have read, I can just use DBCC SHRINKFILE [logname] after I do a backup and the changes will be reflected on the mirror as well. I have shrunk the T-log in non-mirrored servers before, just don't know if there are any key differences.

View 6 Replies View Related

Mirrored Linked Server Failover.

Sep 18, 2006

We have a mirror setup, with a third server that needs to be linked to this mirrored setup. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

View 1 Replies View Related

The Mirrored Server Is Always In The State Of Restoring Only

Jun 6, 2006

The database in Mirrored server is always in the state of restoring only.

the database in mirrored server is restored with norecovery

then we started mirroring.

the status of mirroring is successfull and is synchronized.

but the Mirrored server is always in the state of restoting

not allowing use to open the database.



could any one know why this problem is comming and give some solution for this problem so that the mirrored database can be accessible opened and queryed to really verfiy that the changes made in principal database is mirrored to Mirrored database.

View 3 Replies View Related

Mirrored Linked Server Failover.

Sep 18, 2006

We have a mirrored db setup, with a third server that needs to be linked to this mirrored setup as a linked server. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

View 1 Replies View Related

Problem When Failing Over To Mirrored Database

Oct 11, 2006

I'm having a problem with SQL2005 Database mirroring.

I have an ASP application that loops for a certain amount of interations and in each iteration I create a SQL Connection object and use the failover partner in the connection string. The object then writes a simple record and then the connection is closed and the process starts again.

About half way through my loop I force a failover to the server mentioned as the failover partner in the connection string. At this point my application encounters a SQL Exception error and the application fails.

I read in this article, http://msdn2.microsoft.com/en-us/library/ms366199.aspx, that this is expected and that you shoud request a new connection using the same connection string but this isn't working for me and unfortunately no examples are given anywhere.

I would appreciate any help. Thanks

Luis Bonilla

Here is a sample of my code:

Dim k As Integer = 1
Dim constring As String = "Server=SVR01.XXX.XXX.comInstanceName;Failover Partner=SVR02.XXX.XXX.comInstanceName;" _
& "Database=test;" _
& "Integrated Security=SSPI;"

Do Until k = 60
Using con As New SqlConnection(constring)

Dim cmd As New SqlCommand()

Try
con.Open() '<--------This is where the exception occurs
Catch ex As SqlException
Dim en As String = ex.ErrorCode
Dim em As String = ex.Message
Dim emm As String = ex.Number
Dim enn As Integer = ex.State
End Try

lblprimary.Text = "Current Primary Database = " & con.DataSource

cmd.Connection = con
cmd.CommandText = "INSERT INTO SystemsTest (FirstName, LastName)VALUES ('SQLWriter" & CStr(k) & "','" & con.DataSource & "')"

Try
cmd.ExecuteNonQuery()
Catch
lblresult.Text = "Results = Error with record number " & CStr(k)
End Try

con.Close()
cont:
End Using
Sleep(1000) 'For testing
k = k + 1 'For testing
Loop

View 3 Replies View Related

Change The Schema Of A Mirrored Database

Aug 8, 2007



Simple question, I hope. I need to add a column to a table of a database that is mirrored. How do I have to do that? Do I need to stop mirroring? Is it sufficient to simply pause mirroring? If I make the change on the principal db, what do I need to do the make the same change on the mirror?

Thanks,

View 6 Replies View Related

How Service Broker Queues Can Be Mirrored?

Jan 4, 2007

Hi,
I want to know that how is it possible to achieve mirroring for the service broker queues in the database?

View 1 Replies View Related

How To Attach And Detach Mirrored Databases

Apr 15, 2008

Hello all,

We are planning to change the location of the log files from my production server. We have setup the mirroring also for those databases. I know for the databases without mirroring job i could detach the database, copy the log file to the target location and attach the database with the new logfile location. But for the mirroring databases I don't have any idea how to do that. Could some body guide me thorugh the process on how to do this task? thank you very much for all your help!

View 16 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved