Database snapshot
Hi,
I have setup a basic replication i.e. materialized replication or snapshot replication. I am using oracle 9i database servers. The following is my setup:
site A - master site used for production database
site B - DR site
I have to replicate selected tables from siteA to siteB on a weekly basis to keep them synchronized. The siteA only changes occasionally.
My setup is working, but I am having one issue. I don't want anyone to update the siteB by mistake and data to get synchronized to site A, which is a production site. Is it possible to just push the data from siteA to siteB and not the other way round?
I would also like to know that in case my site A (production site) goes down, how I can make the site B up and running with minimum downtime. Do I have to copy the materialized view to tables on site b?
Thanks for your help,
kapil
My setup is working, but I am having one issue. I don't want anyone to update >>the siteB by mistake and data to get synchronized to site A, which is a >>production site. Is it possible to just push the data from siteA to siteB and not >>the other way round?From the Advanced Replication manual, Chapter 1: "In a basic configuration, materialized views can provide read-only access to the table data that originates from a master site or master materialized view site.".
I would also like to know that in case my site A (production site) goes down, >>how I can make the site B up and running with minimum downtime. Do I have to >>copy the materialized view to tables on site b?What you need to setup is TAF ("Transparrent Application Failover"). You can read about it at http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96580/advcfg.htm#NETAG0153
Daniel
Similar Messages
-
Transactional Replication and Database Snapshots
Hi,
I have a database that is a publisher in transactional replication.
I create a database snapshot on that database and then let transactions replicate to the subscriber(s).
I revert the database back to the snapshot.
What happens to replication?
Dan Jameson
Associate Director of IT/DBA
Children's Oncology Group
http://www.ChildrensOncologyGroup.orgYour Log Reader Agent could fail if the publication database LSN is less than the value of the transaction sequence number (max xact_seqno) at the distribution database. In which case you could execute
sp_replrestart to resynchronize the Publisher metadata with the Distributor metadata.
Afterwards it would wise to run a data validation to see how out of sync you are with the Subscriber and use
tablediff utility or SQL Data Compare to bring the Publisher and Subscriber back into convergence. Reinitialization is an option as well. It depends on exactly what you are trying to achieve.
Brandon Williams (blog |
linkedin) -
Database snapshot - usage of CPU
Hi,
I have a db and a snapshot for this db.
I notice that the CPU time when a query is executed on snapshot is 8 times, in my case, greater than if the same query is executed on the original db.
My question is: this behavior it's normal ? If I want to move my reports on the snapshot, the CPU used by SQL Server will increase ?
The SQL Server has a 'maximum server memory', so, is possible that the other processes to be hampered ?
Thank youHi,
Below are some results/numbers. There wasn't any modification on the original db. No other query had been executed during the tests.
original db
snapshot
CPU time = 3150 ms, elapsed time = 91388 ms
CPU time = 24742 ms, elapsed time = 92031 ms.
CPU time = 3351 ms, elapsed time = 65084 ms.
CPU time = 25164 ms, elapsed time = 83976 ms.
CPU time = 3388 ms, elapsed time = 85176 ms.
CPU time = 28545 ms, elapsed time = 73152 ms
CPU time = 3104 ms, elapsed time = 97374 ms.
CPU time = 34378 ms, elapsed time = 89167 ms
Observation: elapsed time is the same
original
Table
Scan count
logical reads
physical reads
read-ahead reads
A
5
1047
2
946
B
5
11428
1
11310
C
3
1828
3
1653
D
1
3
0
0
E
5
456748
0
456341
snapshot
Table
Scan count
logical reads
physical reads
read-ahead reads
A
5
954
0
954
B
5
11313
0
11313
C
5
1665
0
1665
D
1
3
1
3
E
5
456748
0
456748 -
Best practice for database move to new disk
Good morning,
Hopefully this is a straight forward question/answer, but we know how these things go...
We want to move a SQL Server Database data file (user database, not system) from the D: drive to the E: drive.
Is there a best practice method?
My colleague has offered "ALTER DATABASE XXXX MODIFY FILE" whilst I'm more inclined to use "sp_detach_db".
Is there a best practice method or is it much of a muchness?
Regards,
AndyHello,
A quick search on MSDN blogs does not show any official statement about ALTER DATABASE – MODIFY FILE vs ATTACCH. However, you can see a huge number of article promoting and supporting
the use of ALTER DATABASE on any scenario (replication, mirroring, snapshots, always on, SharePoint, service broker).
http://blogs.msdn.com/b/sqlserverfaq/archive/2010/04/27/how-to-move-publication-database-and-distribution-database-to-a-different-location.aspx
http://blogs.msdn.com/b/sqlcat/archive/2010/04/05/moving-the-transaction-log-file-of-the-mirror-database.aspx
http://blogs.msdn.com/b/dbrowne/archive/2013/07/25/how-to-move-a-database-that-has-database-snapshots.aspx
http://blogs.msdn.com/b/sqlserverfaq/archive/2014/02/06/how-to-move-databases-configured-for-sql-server-alwayson.aspx
http://blogs.msdn.com/b/joaquint/archive/2011/02/08/sharepoint-and-the-importance-of-tempdb.aspx
You cannot find the same about ATTACH. In fact, I found the following article:
http://blogs.msdn.com/b/sqlcat/archive/2011/06/20/why-can-t-i-attach-a-database-to-sql-server-2008-r2.aspx?Redirected=true
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Missing objects within database
Hello,
I'm fairly new to Oracle but have extensive knowledge with all versions of SQL Server. I was given the task to refresh our training environment with production data. The traning database was corrupt and couldn't be recovered so I needed to start from scratch. The database was built but there seems to be missing system views, stored procedures, tables and triggers.
It would be ideal if I could take a production database snapshot, and restore over the existing training database. Can someone please give me the steps on how to do that? The files are all in the same location, but the only difference is that the database names are different.
Any help would be much appreciated.
Thank you,
Pete825084 wrote:
...have extensive knowledge with all versions of SQL Server.Does SQLServer not use different forum places regarding subjects ? Oracle does.
...Can someone please give me the steps on how to do that? First step, post in the proper forum : General Database Discussions
I'm sure, you'll get advised for the second step over there.
Nicolas. -
I have read all other cases that relate to this error and cannot get this to work. Running SQL Server 2012 sp1 on Windows server 2012 R2. Disk space and permissions are fine, but I get the error below when I try and use the check database integrity task
within my maintenance plan on both system and user databases. I have researched this and fragmentation is not the issue. I'm lost at this point and would appreciate at least some steps to try. databases are not "read only" as I have read this may
contribute to the problem. All other maintenance tasks run fine.
Error message from SQL LOG
Check Database integrity on Local server connection
Databases: All system databases
Task start: 2014-01-13T11:00:04.
Task end: 2014-01-13T11:00:04.
Failed:(-1073548784) Executing the query "DBCC CHECKDB(N'master', NOINDEX)
" failed with the following error: "A database snapshot cannot be created because it failed to start.
A database snapshot cannot be created because it failed to start.
MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand the physical file 'E:\\SQLdata\\MSSQL11.MSSQLSERVER\\MSSQL\\DATA\\master.mdf:MSSQL_DBCC9'.
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.
The database could not be exclusively locked to perform the operation.
Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous
errors for more details.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Error Message from Log File Viewer in SSMS:
Source: Check Database Integrity Task Executing query "USE [ReportServer] ".: 50% complete End Progress Error: 2014-01-13 11:31:54.92 Code: 0xC002F210
Source: Check Database Integrity Task Execute SQL Task Description: Executing the query "DBCC CHECKDB(N'ReportServer') WITH NO_INFOMSGS " failed with the following error: "A database snapshot cannot be created
because it failed to start. A database snapshot cannot be created because it failed to start. MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to
expand the physical file 'E:\SQLdata\MSSQL11.MSSQLSERVER\MSSQL\DATA\ReportServer.mdf:MSSQL_DBCC9'. The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not
support sparse files or alternate streams. Attempting to get exclusive access to run checks offline. The database could not be exclusively locked to perform the operation. Check statement aborted. The database could not be checked as a database
snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.". Possible failure reasons: Problems with
the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error Progress: 2014-01-13 11:31:54.93 Source: Check Database Integrity Task
Executing query "USE [ReportServerTempDB] ".: 50% complete End Progress Error: 2014-01-13 11:31:55.02 Code: 0xC002F210 Source: Check Database Integrity Task Execute SQL Task
Description: Executing the query "DBCC CHECKDB(N'ReportServerTempDB') WITH NO_INFOM..." failed with the following error: "A database snapshot cannot be created because it failed to start. A database snapshot cannot be created because
it failed to start. MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand the physical file 'E:\SQLdata\MSSQL11.MSSQLSERVER\MSSQL\DATA\ReportServerTempDB.mdf:MSSQL_DBCC9'.
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.".
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error Progress: 2014-01-13 11:31:55.02 Source:
Check Database Integrity Task Executing query "USE [AddressUpload] ".: 50% complete End Progress Error: 2014-01-13 11:31:55.13 Code: 0xC002F210 Source:
Check Database Integrity Task Execute SQL Task Description: Executing the query "DBCC CHECKDB(N'AddressUpload') WITH NO_INFOMSGS " failed with the following error: "A database snapshot cannot be created because
it failed to start. A database snapshot cannot be created because it failed to start. MODIFY FILE encountered operating system error 665(The requested operation could not be completed due to a file system limitation) while attempting to expand
the physical file 'E:\SQLData\MSSQL11.MSSQLSERVER\MSSQL\DATA\database1.mdf:MSSQL_DBCC9'. The database snapshot for online checks could not be created. Either th... The package execution fa... The step failed.ReFS is NOT supported in use with SQL Server 2012. Once such item, which you've stumbled upon is the fact that alternate streams and sparse files are not implemented in ReFS and thus these issues are caused. You *could* force the checkdb to execute by using
WITH TABLOCKX but that'll require exclusive access to the database for the duration of the checkdb scan and that's not something I would advise to do.
Sean Gallardy | Blog |
Twitter -
How to use the mirrored and log shipped secondary database for update or insert operations
Hi,
I am doing a DR Test where I need to test the mirrored and log shipped secondary database but without stopping the mirroring or log shipping procedures. Is there a way to get the data out of mirrored and log shipped database to another database for update
or insert operations?
Database snapshot can be used only for mirrored database but updates cannot be done. Also the secondary database of log shipping cannot used for database snapshot. Any ideas of how this can be implemented?
Thanks,
PreethaHmm in this case I think you need Merge Replication otherwise it breaks down the purpose of DR...again in that case..
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Adding a stored procedure to the master database?
I have a SQL server instance being used as our data warehousing environment. The instance consists of several databases that I am snapshotting as part of our high availability strategy for data. I've created a stored procedure that takes the source database
as an argument and that will create a new snapshot when a new one needs to be created and will also automatically remove the old snapshot. It also updates some synonym tables that point to the new snapshot but that might not be an important detail.
I would like to have the stored procedure stored some place global to all of the databases that I am routinely snapshotting, but that would mean putting it in the master database. Although having it there makes things significantly better in terms of usability,
it seems like there's something wrong with putting any stored procedures in the master database. Am I wrong? Is it OK to put stored procedures there in situations like this?Yes Database snapshot. We're using it to make our data more available so that when we're refreshing the underlying database we can still access the previous version of the data. Otherwise our reports and applications won't have access to the data or will
get partial data sets. We don't intend to use it for DR or as a backup.
ok. if it is for temporary purpose, it will work..
you can create one master procedure and do that - master database. but you need to make sure you point your applications/reports to the snapshot database and not actual database
Hope it Helps!! -
Restored database, can't perform 'System Restore'
We've just performed a system reset of a system by performing a database restore to a version from a few months back. I now need to reapply the SC's that have been modified since the initial database snapshot.
However, when I try to perform a restore, the DI gives me a message indicating that the system already has the up-to-date version. Checking the SystemInfo page, it's quite clearly shown that the SC is the old version; checking in the SLD also shows the old build version. However, running the SDM tool shows the new version as being deployed...
Inspecting the file system, you can see all the originally deployed SCs in the folder /usr/sap/SID/JC00/SDM/root/origin, organized by domain and DC. The SC I need to redeploy is indeed in these directories, and I think I can probably fix my problem by removing the file, but I'm not sure of the side effects of doing this.
It's almost as if SAP expects you to perform a full system restore, rather than a database restore when recovering a system, since data is contained in both the database, and the file system.
Opinions?Just used SDM to force/sync the system.
-
Distribution agent could not apply a generated snapshot file
In my case , some main info as follows . after add a article into one publication , then manually execute sp_startpublication_snapshot to generate snapshot ,and with no errors , but distribution agent didnot apply it .
How to fix ?
Type:Transaction Replication
sync_method:database snapshot character
allow_anonymous:false
immediate_sync:false
snapshot_in_defaultfolder:false
alt_snapshot_folder:[new path]
repl_freq:continuousHi T.Encore,
Besides other post, please check the Replication Monitor to see if there are any errors. And also check all logs in SQL Server agents jobs related to the publication/subscription for additional messages.
In addition, please ensure that you perform all the steps in the following article to add articles to the existing publication.
Add Articles to and Drop Articles from Existing Publications
https://msdn.microsoft.com/en-us/library/ms152493.aspx
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
Hi Experts,
Can we take backup for particular dates. means i want backup for one of database.for this i want backup between feb 4 th to feb 7th 2014. please suggest me how to do that?
/RaghavendraYou can take database snapshots at different times.
BOL: "A database snapshot is a read-only, static view of a SQL Server database (the
source database). The database snapshot is transactionally consistent with the source database as of the moment of the snapshot's creation. A database snapshot always resides on the same server instance as its source database. As the source database
is updated, the database snapshot is updated. Therefore, the longer a database snapshot exists, the more likely it is to use up its available disk space.
Multiple snapshots can exist on a given source database. Each database snapshot persists until it is explicitly dropped by the database owner."
LINK: http://technet.microsoft.com/en-us/library/ms175158.aspx
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
RMAN reporting of Netapp Snapshots
Hi,
The database snapshots taken using Netapp are diverted to RMAN catalog repository. Is there a way, where we can run the reports on which backup is failed/successful using RMAN.
Thanksuser13674606 wrote:
Hi,
The database snapshots taken using Netapp are diverted to RMAN catalog repository. Is there a way, where we can run the reports on which backup is failed/successful using RMAN.
Thanksfor Backup sets and proxy copies the command is: LIST BACKUP : (You can list all backup sets, copies, and proxy copies of a database, tablespace, datafile, archived redo log, control file, or server parameter file.)
for Image copies the command is: LIST COPY : (You can list datafile copies and archived redo log files. By default, LIST COPY displays copies of all database files and archived redo logs. Both usable and unusable image copies are included in the output, even those that cannot be restored or are expired or unavailable.)
for Archived redo log files: the command is LIST ARCHIVELOG (You can list archived redo log files.)
Query the V$RMAN_BACKUP_JOB_DETAILS view for information about the backup type, status, and start and end time. The status column of this view STATUS, This column has One of the following values:
* RUNNING WITH WARNINGS
* RUNNING WITH ERRORS
* COMPLETED
* COMPLETED WITH WARNINGS
* COMPLETED WITH ERRORS
* FAILED
http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmreprt.htm#CHDIDAEC
http://download.oracle.com/docs/cd/E18283_01/server.112/e17110/dynviews_2142.htm#REFRN30391 -
How can I share my photos without all the iPhoto features
I want to share a photo album with my friend on a DVD ROM disc. He does not use iPhoto so I only need to write my current photos from this album into a DVD ROM, preferable with the folders organized by date.
I used the SHARE->BURN command, but the result is not exactly what I wanted.
My album has 1500 photos, but the DVD that I got from the burn has 5500 photos. It included all the face database clippings and all the thumbnails and modifled version of the photos along with the original copies.
If I could control the content of the DVD, I would like to lose all the face clippings, merge all the original and modified photos and only burn the "final" copy to the disc. i.e. I want a distilled content of my album that is NOT an iPhoto database snapshot. Is there an option I can use to alter the DVD burning preference?Nothing.
You need to distinguish between the Photograph and the File that contains it.
The File is what the Finder sees, and shows you - quite correctly - the File data.
The Photographs metadata - including the time the shot was taken - is stored in the Exif. The Finder has no awareness of the Exif, however, photo apps do.
Some options:
1. Get your friend to view the Photos in a Photo app, or some app that is Exif aware.
2. Rename the files to reflect the order you want them in. For instance: create an Album of the pics you want to export, and set them into the order you want. Then File -> Export at the File Name option choose 'Sequential' or Album Name with Number.
3. Rename the files with the date that they Photos were taken using an app like Shootshifter
Regards
TD -
DB2 9.5: SAP Work Process Restart Issue
We just upgraded to DB2 9.5 from DB 8.x. Currently we are having problems with the work process on SAP R/3 4.7 Ext 200. We are seeing the following entry in the work process log:
M ThWpRestart: restart wp (pid=1988) automatically
B
B Mon Mar 30 00:14:09 2009
B Disconnecting from ALL connections:
B Wp Hdl ConName ConId ConState TX PRM RCT TIM MAX OPT Date Time DBHost
B 025 000 R/3 000000000 INACTIVE NO YES NO 000 255 255 20090329 190208
After this entry the work process hangs and it does not get reconnect to the database. Looking at the database snapshots we are not seeing any PID of the work process. We are currently running non-unicode kernel 247. Any come across a problem like this?Sounds strange - any special activities running at that time ? E.g. a backup ? Do you see that on all application servers ?
How to you resolve this situation ?
What does the db2diag.log show for that time frame ?
Malte -
Views in Oracle Lite on Win32 Client
Hi,
I've created an Oracle Forms application to work with Oracle Lite on the Win32 Client. When creating the application using wtgpack on the Mobile Server, I successfully created snapshots for the 7 tables in the database. After synchronization (msync), all 7 tables are created in the client's Lite database and all data are available. The Oracle Forms application works perfectly.
BUT: I have to add a view now, a very simple one, joining 2 of the 7 tables. I created this view in the Server database, and tried to use wtgpack to force the view creation on the client's Lite database. When selecting Web-to-Go in wtgpack's "Available Platform" window, a "DDL" tab appears. But my application isn't Web-to-Go platform, but Win32 only. The "DLL" tab is not available when selecting Win32 as platform. How can I force wtgpack to add my view to the application?
I tried to add the view definition to the "dlls.sql" file in the \repository\app\sql directory .. but the client doesn't get it.
I tried to create a snapshot in wtgpack (because when using "import" it only shows tables, not views) and type the view definition there .. but the client doesn't get it too.
Any ideas how the view can be created on the client's Lite database?
Thanks in advance!
DirkDirk
You dont need to do anything on the lite database.
Here are the steps for pulling the data from enterprise database.
1. Install the client -win32 sdk on the client machine. This is used to access lite database because it installs msql, lite drivers etc.
2. Create snapshots using wtgpack. You can create all the Enterprise database snapshots, views, sequences etc.
3. Generate the Jar file using wtgpack
4. Publish the jar file in the mobile server.
5. Create some users and give access to this application.
6. Access the server from ur machine: http://[mobileserveripaddress]/setup
7. Download the Mobile Client for Web-to-Go
8. Run the setup.exe
9. Enter using the username, password given to access this application.
10. Click sync on the menu
It automatically creates the database and pulls all the data.
You dont need to do anything.
Access the database from msql like this:
msql system/[password]@polite:[urdatabase]
or
msql system/[password]@polite:[DSN]
DSN gets created automatically. check ur ODBC settings.(enter odbcad32 on ur command prompt to see these settings)
Refer the documentation..sometimes its hazy but its easy once we do it...
happy weekend....
Yugandhar
Maybe you are looking for
-
WebDAV how to make root folders read only but contents writable
Hi everyone.. Thanks in advance to anyone who can help me out.. 1 PERMISSIONS I have a working WebDAV server. In each realm (or user account) they have a setup that mocks their home folder, ie, Documents, Movies, Websites, etc. How can I modify the p
-
System ask me old owner's password
Hello. iPhone 4S 16 gb black SN: DN****T9Y I have some problem with activation of my iPhone after iOS 7 installation. System ask me old owner's password & ID, but I don't know it and can't restore! Can You reset or take off this function and help me?
-
Hi, my ipad got stolen and i was wondering if there is anyway of finding out the serial number remotely from another apple device?
-
HT6147 I keep getting an error when downloading 7.0.6 update. Help please!
I have tried downloading the latest update for my iPhone 4 (7.0.6). Every time it is almost complete, I receive an error message. This has happened 4 times. Is there another version I can download or is there a way to fix? Please help. Thank you!
-
Wrong charakter for separation of numbers (dot instead of comma)
Hi there, I face the following Problem with BI-Publisher 10.1.3.3.1. I want to have large numbers seperated by commas. There are different ways to do that in different countries. For example, in the usa the money amount 44.00 USD is seperated the fol