Sp_change_secondary_role Missing In SQL Server 2005?
Jul 25, 2006
I've got SQL Server 2005 Ent Ed 9.0.1399 and want to change my
secondary Log Shipping server into a primary. I've tried locating the
sp_change_secondary_role, but can't seem to find it. Has it been
replaced with another stored procedure? If so, which are the procedures
to run?
On SQL Server 2000, the following were the steps listed:
1. Transfer logins
2. Run sp_change_primary_role
3. Run sp_change_secondary_role
4. Run sp_change_monitor_role (this exists in SQL Server 2005)
5. Run sp_resolve_logins
3 & 5 are what I'd expect to perform if the primary isn't available.
I have installed SQL Server 2005 and setup a cluster and log shipping. I decided to perform a planned failover and realized that there are no sp_change_primary_role and sp_change_secondary_role stored procedures. I checked on both the SQL Server 2005 installations and could not find them.
My question is :
"Is it safe to get these stored procedures from a SQL Server 2000 database and run them on the SQL Server 2005 database ??"
"Has anyone come across such missing stored procedures in SQL Server 2005 and know the reason why it is so (so that I can avoid it in the future if it due to a faulty installation) ?"
primary server is unavailable, I couldn't able to demote theprimary server. I ran this query to promote secondary server. I'vetried with different options @terminate=0. I've ensured no userconnections exist. But still getting sqlmint.exe error. Any oneexperienced this problem? I've checked KB article, but still notworkingEXEC msdb.dbo.sp_change_secondary_role@db_name = 'test',@do_load = 1,@force_load = 1,@final_state = 1,@access_level = 1,@terminate = 1,@keep_replication = 0,@stopat = null
The program shortcut "Visual Studio 2005 Command Prompt" seems to be mising from the "Visual Studio 2005 Command Prompt" Start menu added by the current Microsoft SQL Server 2005 Express Edition Toolkit. Where is it? How to workaround?
I am trying to do Download details SQL Server 2005 Samples and Sample Databases (April 2006) -> GettingStartedWithSQLSamples.htm which says "a. Open a Microsoft Visual Studio 2005 command prompt. Click Start, point to All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Command Prompt." but I can find no such command prompt within "Visual Studio Tools", only "Visual Studio 2005 Remote Debugger{, Configuration Wizard}".
What's wrong? How to fix or workaround? I'd install .NET SDK 2.0 to get it's Command Prompt but that's about 570MB merely for a command prompt!
Hi all, This is my first message in this forum and I am a new bie to SQL server 2005.. I am trying to schedule the backup job for a database in 2005 and I am not able to figure out where it is. I browsed through few topics in the forums and found that I can do using sql server agent in the SQL server management studio. But I do not see the sql server agent in the management studio. Any help is appreciated.
When I install SQL server 2005 and select the option to have Integration Services installed, I cannot see the templates in VS 2005. Is there a way to tell if they have been installed on the harddrive? Is there any way to install them manually?
for the third time I am installing SQL-Server 2005 express and i have an error.
Cannot install sql because .NET 2.0 framework is missing allthough I have the .NET 2.0 framework allready installed and even re-installed it too. When trying again I get the message that there isn't an SSL-certificate present.
My question is, would this probably cause the error when installing?
I've just installed SQL Server 2005 Development Edition x64 on Windows XP x64bit. The actual server (as well as Integration, Reporting Services etc) installs fine, I can connect to it via Visual Studio 2005 fine. However, all of the software tools are missing including Management Studio, Business Intelligence Studio etc. They don't show up in the start menu at all and I can't find them in the Program Files directory.
Anyone know how I can get them back? I've tried reinstalling SQL Server 2005, reformatting Windows XP x64, I'm at my wits end!! Many thanks!
I've seen a few threads on this which seem to suppose the problem is on Express edition rather than Standard edition. Not so here. This is definitely Standard edition, SP3 as seen by running SELECT CONVERT(char(20), SERVERPROPERTY('Edition')) SELECT CONVERT(char(20), SERVERPROPERTY('ProductLevel')) In SSMS Under the Management folder there is no "Maintenance Plans" folder. There IS a "Maintenance Plans" folder under the Legacy Folder. I have another instance which is Standard and SP1 which looks just fine.
I have a query that uses the following fields from MSmerge_history:
MSmerge_history.start_time, MSmerge_history.runstatus and MSmerge_history.duration
Below is the query that I am using:
SELECT
MSmerge_agents.subscriber_name AS SubscriberName,
MSmerge_history.start_time AS SyncTime,
MSmerge_history.runstatus AS SyncStatusID,
MSmerge_history.comments AS Comments,
MSmerge_history.duration AS Duration
FROM distribution.dbo.MSmerge_agents MSmerge_agents INNER JOIN distribution.dbo.MSmerge_history MSmerge_history
ON MSmerge_agents.id = MSmerge_history.agent_id
WHERE MSmerge_history.runstatus IN (2, 6) AND publisher_db = DB_NAME()
AND MSmerge_agents.subscriber_name + CONVERT(nvarchar, MSmerge_history.start_time) NOT IN
(SELECT SubscriberName + CONVERT(nvarchar, SyncTime) FROM SyncActivities)
My query runs fine under SQL Server 2000 but when I run it in SQL Server 2005, it doesn't work any more. Looking at MSmerge_history table under SQL Server 2005, this fields have been removed. Does anyone know where I can access those fields? Is it in another table?
I have several servers that do not have SSMS installed. A couple of them are running as a clustered server. How do I install SSMS on these servers? they are running and have production databases on them. I have tried re-installing the management tools but that didn't work.
When I downloaded the files and after burning the DVD to create the DVD to setup the 7031A - Upgrading to Microsoft SQL 2005 course, all of the executable files (BCBase.exe, Upgrade.exe, InPlace.exe, SideBySide.exe and SQL7Upgrade.exe) are not in the Setup/Drives folder...the only item in that folder is a file called "placeholder.txt".
Please, if anyone knows how to get these exectuables let me know.
I just installed SQL Server 2005 64bit on a fresh system with no other applications loaded on running on the new server.
The only other component that was installed with the SS2K5 database services is SSIS. The base installation and the SP2 patch went on perfect.
I went looking for the Management Studio thru the Start menu options and it is NOT under the Microsoft SQL Server 2005 group. The only options under the SS2K5 group are "Configuration Tools" and "Docs and Tutorials".
Here are file names that I downloaded from the MS website and installed.
SW CD SQL Svr Enterprise Edtn 2005 64Bit X64 English #1 x64 MLF.x11-57796 (which is a zipped)
SQLServer2005SP2-KB921896-x64-ENU
There was also another zipped file that I tried to install but it seems to be a duplicate of the zipped file above:
SW CD SQL Svr Enterprise Edtn 2005 64Bit X64 English #2 x64 MLF.x11-57797
I installed SQL Server 2005 Developer Edition. When i create a new database (using the "New Database" dialog) i cannot set the new database's compatibility level to "SQL Server 2005(90)" because this option is not in the "dropdown list". the only items shown are: "SQL Server 7.0(70)" and "SQL Server 2000(80)". I set the owner to "sa". How do i get "SQL Server 2005(90)" in my "compatibility level" drop down list? Is this an installation option that i missed? Thanks in advance for any assistance!
I'm new with SP v3 and the Reporting Services of SQL Server 2005.
I did a prototyp report and show it with "SQL Reporting Services Report"-WebPart, but I can't find the WebParts Report Viewer and Explorer in the WebPart Gallery.
Please, could somebody give me a clue where the problem could be, or how I could isolate the problem area.
After some weeks evaluating tools and platforms for developing an application, I decided to move to SQL Server 2005 Express Edition. Everything was fine till last night, when after creating my tables, I needed to populate them. I tried to find the Import and Export Data Wizard that SQL Server 7.0 and 2000 used to have, but great was my surprise when I found - in this forum - a post that said that it's not available in the Express Edition.
I'll have to move back in time (what I hate) to remember the way BCP worked. Can somebody post some examples to not start from zero ? Does anybody know a third party visual tool that can import/export data from text files to a SQL Server DB via ODBC ?
Hi im trying to install Sql Server 2005 but it says i need to Increment the Counter Registry Key for Setup in SQL Server 2005 before doing so. Im following the guide at http://msdn2.microsoft.com/en-us/library/ms143215.aspx but in my registry the folder HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionPerflibdoesnt contain any keys"Last Counter"=dword:00000ed4 (5276)"LastHelp"=dword:00000ed5 (5277) or any key for that matter.How can i fix this?
The project is a C/S data analysis system built with .Net 2.0 in windows environment, OS: Microsoft Windows 2003 R2 standard Edition Service Pack2, Database used in this project is: Sql server 2005. As a data analysis system, we need to load large amount of data from file to database, we do it by create a dts package and then do data loading by execute "m_Package.Execute(null, variables, m_PackageEvents, null, null)".
The problem is, we fount that DTS miss some data randomly sometimes, we can't find the rule till now. for example we've data as follows in data file, all data field splited by '|' 11234|26341|2007-09-03 00:00|0|0|0.0|0|0.011470833793282509|1|0.045497223734855652|0|0|1|0|3|2929|13130|43|0|2|0|0|40|1|0|0|0|0|0|1||0|0|3|0|0|0|0|0||0|3|0|0|43|43|0|41270|0|3|0|0|10|3|0|0|0|0|0||0|1912|0|0|3|0|0|0|0|0|0|0|3|0|0|5|0|40|0|9|0|0|0|0|0|0|0|0|29|1|1|24|24.0|16|16.0|0|0|0.0|0|0|24|23.980693817138672|0|0.0|0|0.0|0|0.0|0|0.0|11|2.0764460563659668|43|2|0|0|30|11|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|3|3|0|0|0|0|0|0|0|0|0|6|0|0|0|0|0|6|0|0|45|1|0|0|0|2|42|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2|0|0|0|2|0|0|0|0|0|0|51|47|85|0|0|||||||||||||||||||||||||||||||||||||||||||||||||||0|0|0|0|0|0|0|0|0|0|0|0|0|||||||||||||0|0|0|0|0|97.117401123046875|0|0|83|57|||0.011738888919353485|0|1|0.065955556929111481|0|4|||0.00026658669230528176|1|0.00014440112863667309|1|68|53|12|2|1|2.0562667846679688|10|94|2|0|0|30|11|47|4|13902|7024|6878|18|85|4.9072666168212891|5|0.0|0|0.0|0|0.0|0|0.0|0|358|6448|6324|0|0|0|0||0||462|967|0|41|39|2|0|0|0|1|0|0|0|0|0|0|0|0|3|0|0|3|0|0|0|0|0|0|0|0|0|3|0|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0.0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|46|0|1|0|1|37|0|0|46|0|1|0|1|37|0|0|0|0|0|0|0|0|0.0|0|0|6|4|2|0|0|2|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0.0|0|1|0.012290795333683491|0|44|44.0|0|0.0|0|0|0|30|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2|0|2|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|27|0|0|2112|411|411|45|437|2|0|2|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|4|0|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|6|6|0|3|2|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|5|5.0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|600|600|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|6|0|0|0|0|0|0|6|0|9|1|2|2|3|0|1|0|0|0|0|0|0|0|0|0|0|0|13|3|2|5|1|1|1|0|0|0|102|0|1|1|0|0|0|3|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0||||||0|0|0|0|0|0|0|0|0|0|0|0|0|0|0||||||0|0|0|0|0|0|0|0|0|0|0||0|0|0|0|0|0|0|0|0||||||||||0|0|0|0|0|0|0||||||||||0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0||0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0.0|46.0|46|0.0|0|0.0|0|0.011469460092484951|1|0.0|0|0.0|0|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0.0|0|0.0|0|0|0|0|0|0|0|0|0|0|0|0|0|||0|100.0|100.0|0|1|0|1|0|0|0.02481505274772644|1|0.014951236546039581|1|0|0|0|0|0|0|0|0|0|0|0|0|0|||||||||||||||||||||||||||||||||||||||||||||||||||||||0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|||0|||||||||||||||||||||||||||||||||||||||||||||||||||0|0|0|0|0|0|0|0|0|4695.5556640625|42260|7126.66650390625|62040|||||||||||||||||||||||||||||||||||||||||||||||||||||||0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0||||||||||0|0||||||||||
We found that some of the data field become 'null' after the load action finished, if we load the same data again, problem disappeared, we can't 100% reproduce this issue each time, we don't know why, Anybody here can help us to solve this issue or give us some clue?
I have enabled drillthrough on a cube (AS 2005) and selected the columns required. This worked. When I use the drillthrough option in Excel, drillthrough queries return less rows than expected. For example, for a cells combinations (pivot table) I saw 21198 rows, but after access to detail, query return just 21106 rows. Less rows than expected.
I have a good mdf file that was not shutdown gracefully because ldf file was on hard disk that went bad. Using the ATTACH_REBUILD_LOG statement fails because database wasn't cleanly shutdown. this link http://wiki.servertastic.com/Attaching_a_MDF_file_without_The_LDF doesn't work in 2005, so now what? TIA
In 2000 i could import and select all objects and get the indexes as well but with 2005 i dont seem to be able to find any such option. how do i import data and get the indexes as well?
There has been a sudden loss of data in some (not all) of the tables in my database. I am using SQL Sever 2005 Standard with a simple recovery model for a single database. I can't find any specific hints in the logs to explain the loss, and this did not occur during a backup or scheduled maintenance routine. It seems the data just vanished at a specific point this morning, and I am not able to find out why. Do any of you have a suggestion that would help explain the loss of data in specific tables and not others in a given database without the known use of ROLLBACK or DELETE? Or do any of you know a way that I can look back in the server to identify what may have happened? Any help would be appreciated.
I have written a reporting application which has a SQL2005 backend. An import routine into SQL, written by a 3rd party, frequently fails. The main problems are missing rows in certain tables.
I am going to write an SP that will accepts a from and to date. I then want to search for rows of type X between those dates that do not exist so we then know between a date range, we have no data for these XYZ days.
I have this working by returning all rows between the dates into a dataset, sorted by date, and then running through the rows and testing if the next rows date is the next expected date. This works but I think is a very poor solution. This is all done on the client in C#.
I want to learn and implement the most efficent way of doing this. My only solution in a SP was to make a temporary table of all dates between the date range for row type X and then do a right outer join against the data table, returning all rows which are missing.
Something like this:
SELECT twmd.date FROM #temp_table_with_all_dates ttwad RIGHT OUTER JOIN table_with_missing_date twmd ON ttwad.date = twmd.date WHERE twmd.date IS NULL
Would this be a good, efficent solution, or should I just stick to my processing of a dataset in C#?
Hi all,I'm having a problem restoring backup from 2000 to 2005. The actualrestore process went ok. However, the database user of the restoreddatabase is missing a Login Name. I've made sure that the Login Nameis created in 2005. Also tried deleting the user, but couldn't theuser is db owner. Is there any way that I can assign a Login Name forthis database user or maybe drop this user and assign another one?Regards,Gerd
Trying to learn how to use Sql Server CE, Tutorial says to open server explorer, add connection, new connection, select data source as .net sql ce (words to that effect). On my visual studio, it ain't there and I can't figure out how to get it there. I have uninstall all of the Sql Ce stuff and reinstalled it. So I'm missing some key link. What are the magic incantations to get to first base?
Hi I am stuck while doing synchronization between SQL Server 2000 and SQL Server CE 2.0. getting an Error "Header information is either corrupted or missing."
My Specification is follow : Windows XP with SP2 Visual Studio 2005 Enterprise edition SQL Server 2000 (SP3a) SQL Server CE 2.0 Application is Smart Device application (Pocket PC 2003) using C#. Microsoft ActiveSync 4.5 IIS 5.1
I followed steps as per given in this URL : http://msdn2.microsoft.com/en-us/library/ms839425.aspx#sql_serverce_replication_net_topic2I performed eeach steps successfully, My code is as per given below.
I am not getting whats going wrong. My Firewall is disable and i have not installed any antivirus softwares (including Norton internet Security....in many forums i got this suggestion but i think its not an issue,even though for solving this issue i performed new installation of Windows XP SP-2 )
I've recently upgraded my PC from ME to XP and now have a multi-user setting in my computer. I've tried reinstalling SQL 7; it did install but the Server Manager is missing, so I couldn't start the server. (By the way, what I have is the stand-alone type). Whenever I try to start the query analyzer, I get this error message: [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied. Whenever I try looking for the server manager in the start-up menu, it always says a .exe file (if I'm not mistaken the sqlmangr.exe) is missing or has been moved. What could be the problem? I'm just beginning to learn SQL so if anybody can help me, please.
I have an issue with one of my production servers. I have a few production servers, and they all have the same objects. I do not want to create custom objects for each one, rather keep them all standard.
However, due to environment issues, I have one which does not have any linked servers.
I have a proc which queries either locally or across the linked server depending on the value of a switch. I want to install this proc on the server with no linked servers but it obviously fails.
I can guarantee the proc will never be called with the switch 'on' on that particular server. We still want to install this proc and call it with a switch of 0.
Please can somebody come up with something really clever.
The proc goes something like this:
CREATE PROC WhatEver @Switch int AS IF @Switch = 1 BEGIN SELECT * FROM LinkedServer.Db.dbo.MyTable END ELSE BEGIN SELECT * FROM dbo.MyTable END