How to create a database snapshot in SQL Server 2008 R2 - sql

I used the below command to create a database snapshot in SQL Server 2008 R2:
CREATE DATABASE "dbss" ON (
NAME = "os-file-name",
FILENAME = 'path')
AS SNAPSHOT OF "dbName";
GO
I got this error:
Database Snapshot is not supported on Standard Edition (64-bit).
Does anyone knows how can I create a database snapshot in SQL Server 2008 R2?

Database Snapshot is a feature of the Enterprise Edition and the 2008 Developer Edition.
Besides that there is only little use of Snapshots for a "common user". Most things can be done with a backup too.
Main purpose for snapshots are expensive queries on rapidly changing data.
If you got a huge database and need to execute a query for a report that takes some time there is the danger that data may change while the query / procedure fetches data for the report. In this case you need snapshots. There you can query all your data without having problems with changing data.

Related

How convert SQL Server 2008 R2 database to SQL Server 2012 completely

How open my SQLServer2008R2 database in SQLServer2012. When I open the database these problems happened:
I can't edit and open tables because this error show:
Invalid prefix and suffix characters.
When I want design tables this error show:
The backend version isn't supported to design database diagram or tables.
When you detach and attach database, the compatibility level of old database is maintained. It is one of the limitations of detach and attach method.
Reference
If we attach a database having a higher version, SQL Server maintains
the database compatibility. We can change the compatibility level once
the database is online
Once you change the compatibility level to suit SQL Server 2012, you can use the new features of the SQL Server 2012.
Read more on upgrading database
ALTER DATABASE DatabaseName SET COMPATIBILITY_LEVEL = 110
GO

How to restore a SQL Backup .bak file on a different (new) server? SQL 2012

I remember myself restoring a db on linux side. I used mysql dump and before I could restore this backup on the other server I had to create a DB with the same name.
Now I am going to switch the server on windows side using SQL 2012. I am backupping many SQL DB's and call them for now db1.bak , db2.bak...
When I now want to restore them on the new server, do I need to create a "structure" first with the same DB names or can I simply restore my DB's with the restore command one by one.
Is there anything else I should prepare? Thanks
A SQL Server database backup contains the structure and the data, so if you have run a full backup on one SQL Server 2012 server, you can restore this onto another SQL Server 2012 + server instance without having to create an empty database first.

SQL Server 2008 cross server queries 2000

I need to create reports on SSRS 2008 from data available on SQL Server 2000, now; the database on SQL2000 is preferably not touched so I am avoiding adding stored procedures, views, indexes etc..
What would be the right solution?
What I would be needing is a place where I can put stored procedures, views etc so I can do reports.
Thanks.
create an ssis package / dataflowtask, copy your data from one source (sql 2000 - sql 2008r2)
create a reporting database, move your data to this database and make your reports on this database

How can I post updates (commits) in oracle db to SQL Server 2005

We have an application (BaaN) on Oracle Database.
We also have an application that is on SQL Server 2005 which uses Oracle (BaaN) contents.
Currently we cache all contents of the Oracle DB to SQL Server nightly through linked server from SQL Server to Oracle.
Thought of using a trigger on Oracle db tables to write contents to Oracle table (DeltaCommits) as the commits occur, and then periodically look for entries in DeltaCommits from SQL Server using a scheduled job.
Or can you please suggest a better way to accomplish this ..
Thanks
It's possible to use replication to transfer data between Oracle and SQL server.
This guide looks like a useful starting point which may help you to decide whether this is a route you want to consider.

SQL Server export, back-up without to stop the server

Can anyone tell me how can I make back-up to a database to to export it to a different database (SQL Server or mysql) without to stop the server ?
Sql Server to Sql Server
Get a copy of your database: Backup Database
Restore a copy of your database: Restore Database
--when connected to source db instance
BACKUP DATABASE AdventureWorks2008R2
TO DISK = 'Z:\SQLServerBackups\AdvWorksData.bak'
--when connected to target db instance
RESTORE DATABASE AdventureWorks2008R2
FROM DISK = 'Z:\SQLServerBackups\AdvWorksData.bak'
Sql Server to MySQL
As far as I know, there aren't any standard methods for this. It's a by hand, or by hand written program. If I were tasked with this, I would try : SSMS, select a database, export data- source = sql server instance. If there is a my sql destination available, maybe that will create the table structure for you automajically. Else, I'm betting
- you'll have to create the mysql schema, then pump the data over yourself
- or there is some 3rd party tool someone is happy to sell you to assist you in the task.