0

I've set up a server with native reporting services, connected to a database server which hosts its two databases. I'm trying to run a backup of the two databases so I can add them to my availability group, but neither of them are showing up in the "Databases" folder in the object explorer so I can't get into their properties or run tasks on them. Is there a way to show them, or is there another way to run tasks on a database?

They are both showing up in the availability group wizard and I can run queries on them (although without Intellisense) so I'm definitely connected to both of them.

1
  • 1
    Are you connecting to Object Explorer as the same user? And running the AG wizard from that instance of Object Explorer? If you right-click the top-level node for the instance of Object Explorer where this is happening, and select New Query, and SELECT * FROM sys.databases;, do these databases show up? I'd venture to guess that 99% of the time when this happens, there is some confusion about which instance you're actually connecting to... Sep 16, 2014 at 14:56

1 Answer 1

1

You can also use T-SQL

use master;
go

alter availability group [ag_name] add database ReportServer

backup database ReportServer to 
disk = N'\\some\shared\location\available\to\all\nodes\ReportServer_HADR.bak' 
    WITH FORMAT, INIT, COMPRESSION, STATS;
GO  

backup log ReportServer to 
disk = N'\\some\shared\location\available\to\all\nodes\ReportServer_HADR.bak';
GO

Now go to another replica and restore:

restore database ReportServer from 
disk = N'\\some\shared\location\available\to\all\nodes\ReportServer_HADR.bak' 
    with replace, norecovery;
GO

restore log ReportServer from 
disk=N'\\some\shared\location\available\to\all\nodes\ReportServer_HADR.bak' 
    with norecovery;
GO
alter database ReportServer set hadr availability group = [ag_name]
GO

However, what you really need to do is ensure that you're actually connected to the replica that currently holds the ReportServer* databases before you try adding things to the availability group. If you've somehow stumbled upon the secondary, or if you're connecting to the listener and the AG has failed over to what was formerly the secondary node (i.e. the replica that does not have the databases you need), then you're not going to see the ReportServer* databases.

Finally, please make sure you read the documentation.

1
  • Yes, it had failed over, they're on the other server! Thanks for the queries though, they'll be very useful.
    – MorayM
    Sep 16, 2014 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.