Dear Friends,
I want to Automatically take Backup at 7:00 p.m cutoff Time.and automatically restore the database..to a temporary database,generate my report and delete the database.
Friends,this backup & restore should not require any user interface..it should me automatic.
Plz can anyone help me out.
I'd like to understand why it is not possible to automatic Failover Availability Groups using Failover Cluster Instances. I think it would be great for DR and HA. Do you understand why that limitation exists?
The link [URL] ....
SQL Server Failover Cluster Instances (FCIs) do not support automatic failover by availability groups, so any availability replica that is hosted by an FCI can only be configured for manual failover.
Yesterday a user has run a storedprocedure which updates a very transaction table having million of records , as usual the user killed the process in the middle of the execution.(which has resulted in rollback action).
this rollback process blocked other scheduled jobs and its was running for more than 8 hours without completing
as usual decided to shutdown and restart the sqlserver while restarting the sql server went into automatic recovery
the following are the log recording
2001-04-17 12:00:01.86 spid9 Recovery progress on database 'ISH' (7): 48 percent. 2001-04-17 12:00:37.89 spid6 Using 'xpstar.dll' version '1998.11.13' to execute extended stored procedure 'sp_MSgetversion'. 2001-04-17 12:02:36.60 spid9 Recovery progress on database 'ISH' (7): 49 percent. 2001-04-17 12:08:12.79 spid9 Recovery progress on database 'ISH' (7): 49 percent. 2001-04-17 12:11:49.90 spid9 Recovery progress on database 'ISH' (7): 50 percent. 2001-04-17 12:11:50.32 spid9 Recovery progress on database 'ISH' (7): 92 percent.
if you see the log reading from 50% jumps to 92 % and the automatic recovery process is running from another 5 hours (now not able to open the database)
in order to avoid the sql server going into automatic recovery mode (usually the dba use to update the master.sysdatabase table the status column with some magic number to set the database into emergency mode) but i followed my own style (deleting the reocord for the user database from sysdatabases) and restarted the sql server , and used my monday tape backup (complete bkup) to recover the database. In the recovery option i used force restore over existing database (hoping that this will reduce the database recovery time ,bcaus the data file (mdf and ldf ) need not to be created.
but the result :- after running six hours of loading data from tape ( i am getting the following reading in the log file)
realy do not what is happening in the background.(if its oracle the dba has the control over the database . In sql server has the control over the dba)
any one who has any idea on sql server recovery (the size of the database is 22 gb which is recovered and tape device is hp sure store DAT 40 E (DSS-4,4MM TAPE). Thanks in advance
I am looking at one of the SQL Server which I inherited from my predecessor at work place and I can see a Trace file is getting created on the Log folder.
There has been manual script in place (Written by Greg Larsen) - to monitor DB AutoGrowth, LogFile Growth etc.
I am unable to find out which process or Stored Procedure or Query is creating the Trace file which is created every day and gets deleted and replaced with a new one.
We have a requirement to build SQL environment which will give us local high availability and disaster recovery to second site. We have two sites- Site A & Site B. We are planning to have two nodes at Site A and 2 nodes at Site B. All four nodes will be part of same Windows failover cluster. We will build two SQL Cluster, InstanceA will be clustered between the nodes at Site A Server and InstanceB will be clustered between the nodes at Site B, we will enable Always On Between the InstanceA and InstanceB and will be primary owner where data will be written on InstanceA and will be replicated to InstaceB. URL....Now we want we will have instanceC on the Site B and data will be writen from the application available on Site B, will be replicated to the instance on the Site A as replica.
Pages on a full recovery model database corrupted, need to ensure data loss is minimal for restore operation am thinking about restoring the latest full backup.
in the process of migrating a big db from server 1 to server 2, we had to roll back the change. I started with taking a full db backup and restoring it on server 2 with norecovery, and then a couple logs with norecovery, and then the last log with recovery.
Is there some way to continue this chain now, I mean to change the db to norecovery, or other way to restore logs.
I dont want to do a new full backup.
If I try to do a log restore now i get the message:
Msg 3117, Level 16, State 4, Line 1
The log or differential backup cannot be restored because no files are ready to rollforward.
We have 3 replica AG setup. 2 replicas are in sync/automatic failover, the other(DR Server, different subnet) in asynchronous/manual mode…All these replicas were on sql server 2012, Recently we upgraded DR server to 2014. Since then we have a problem, the AG databases in 2014 instance went into ‘Synchronizing/ in recovery’ state…The SQL server error log has message, the recovery couldn’t start for the database ‘XYZ’…We tried to create a new database and add it to AG , it works for fine for other two 2012 replicas, but on 2014 we see the same issue
We have an issue with a 3 node SQL 2012 Always on availability group. Normal operation is node 1 (primary replica) with node 2 and node 3 as secondary replicas.After some patching, SQL wasn't running on node 1 hence the AG flipped over to node 2. This went unnoticed for some time and the transaction log for one of the AG databases became full on node 2 and node 3. (I think this is because it couldn't commit the transactions on node 1 so couldn't truncate it's t-log?) The DB is using synchronous replication btw.So I started SQL on node 1 and flipped the AG back to node 1 (with a data loss warning but I accepted this).Now the issue is that on node 2 and 3, the DB in question is stuck in a "Reverting / In Recovery" State. I've tried various commands such as ALTER DATABASE SET ONLINE, RESTORE DATABASE WITH RECOVERY etc but these fail stating unable to obtain a lock on the DB.
The weird thing is that on node 1 the state of the DB is "synchronised".how to resolve this issue on node 2 and 3? I've left them overnight (in case they were rolling back transactions, the DB is fairly large) but nothing seems to have happened. remove the DB from the AG in node 2 and 3 and add it back in again, ie recreate the replication?
If you are doing a disaster recovery of an entire SQL 2005 cluster, can you just install SQL server and restore the system database to get the configuration?
Hi, We are working on creating an automatic backup tool for our web application. Our goal is to run a script that "zips" the virtual host/application directory. We have the script to zip the application directory, but is there a way to run a SQL Backup and then zip the output easily? This is where we are struggling. Any Suggestions are appreciated Brent
I am getting an automatic rollback in a transaction that fails to insert a row, via a trigger, due to a duplicate key. The transaction is automatically rolled back and unless the error correctly handled a 'partial update' occurs. Why in the example below is the transaction automatically rolled back (statements 1 to 3) and is there any way of knowing what errors generate an auto rollback. For example if the duplicate key error occurs on the insert into table B below, and not the triggered update, then no auto rollback occurs.
Begin Tran -- 1 insert into A values ('A1') -- 2 updates OK insert into B values ('B1') -- 3 updates OK -- triggers insert into B_Hist -- 4 Fails with Duplicate Key error insert into C values ('C1') -- 5 updates OK Commit Tran -- 6 3902 error No corresponding Begin
Hi all, I am using the odbc connector to get a local table. I want that table to get populated every night automatically. How can i do that? Also i want to check if any existing record is updated/changed in the dsn database. Any help is highly appreciated. Thanks, Jeff.
I don't know very much about Sql Server and need help. I have two primary keys called AirlineCode e ID in the same table. This id is an automatic number. So I don't need to input this value, since it's created automatic. What I need is this ID be created automatic but for each new AirlineCode the ID starts as 1 again. For example : If I put AirlineCode = 220 then ID starts as 1. In another row AirlineCode is also 220, then ID is 2. But in another row AirlineCode = 500, then this automatic number come back to 1. then the rows can be like this :
I have two sql 2000 server tables one is active and one is terminated (I inherited this db) and I was thinking of having the active table automatically update the terminated table when an employee is terminated. Access is at the front end and in the form of the active table theres a drop down text box that has the employement status(active, terminated, on leave...etc) so when the status turns into terminated i want the acitve table to send those records to the terminated table, ( the data in both tables are not exactly the same). looking into a trigger or stored procedure. This is the first time I've done this so I'm doing some reasearch on how to handle it. Any suggestions
well as I get further into this project of automatic updates I'm fining more and more barriers. The combo list box which indicates whether the employee is terminated or active might be a problem with sql since you cant create a Row source and a Row source type in a sql table. that combo box exsist in the properties of the form. The Row Source Type is a Value List. Shoot :(
I'm a SQL Server 7/2000 DBA and manages about 40 servers in different networks. Every morning I check through the Enterprise Manager if all Jobs (backup, maintenance, etc.) have run successfully. This check costs me 1 hour per day.
Because of a reorganization I've got some new college's and lost some college's. My new college's think this is to much work, so it should be automated. They only want the failed jobs to report an error on a website or something like that, and don't want to check 40 servers. I don't agree in this, because I'm affraid I'm going to miss some errors.
Hi there, I am testing the db mirroring, making sure it will auto failover. I've stopped the SQL services on my principal and then I looked at the mirror db is says it's restoring. It stayed like that for 10 min before I enabled the mirroring again. Anyone knows why it's not failing over??????
Here's my setup: SQL 2005 Standard, Server 1 Principal, Server 2 Mirror & Witness.
I have initiated database backup plan in 2005,occuring every 2 days.backup plan worked for the first 2 schedules,later backup plans is not working.I have checked the time and date setups,its all fine.how to solve.
CONSTRAINT [PK_tblProve] PRIMARY KEY CLUSTERED ([ID] ASC) WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO
I have a table "dbo.tblProve" that have a Primery Key ID of type varchar(10) and this primary key have a Default value or Binding like this: ([dbo].[fnc_ProveNewID]())
This function "dbo.fnc_ProveNewID()" finds the max(ID) in the same table and creates the next ID.
When I insert a record into the table dbo.tblProve the function creates the new ID automatically (this is the format of the ID '0000000001' or '000000010' etc. ). But when I insert a lot of records from a Select Query it displays this message below:
Msg 2627, Level 14, State 1, Line 2 Violation of PRIMARY KEY constraint 'PK_tblProve'. Cannot insert duplicate key in object 'dbo.tblProve'. The statement has been terminated.
Is there any way to create a new ID into a table automatically without to be inserted by the user or client?.
We use SQL 2000 and our database is configured to grow automatically by10%. Currently 96% of our database is used. At what point will thedatabase expand - what is the trigger point?
I hope that a someone has answer for me. I want create a new database in sql server and import the database tables of Dynamics CRM and of other application (Accountview) import so that I can make a link of these two databases. My question is it possible that this database update or refresh automatic and how? The database of Dynamics CRM manages by sql server. But the database of accountview is not manages by sql server. I make a link with odbc driver for Accountview database. Can someone help me please?
Dear Freind, Its all boutt Dts.I have already created a DTSpackage and Activex script in VBscript to retrieve some particular names ...and i want to send those names through E mail.But the email should be automatic(using sql Sheduler ).Real Problem is...How can i write the code to access the DTS object from ASP.Net with VB? and How can shedule...please help me...i am hopefully waiting..........thanks in advance
I have a small desktop application that is distributed in CD. The client installs the application without any attendance, therefore I need that everything is completely automatic. Is it possible to install SqlServer Express in that way?
Normally if I want a report in PDF I have to first view the report in the web browser, then select export as PDF and save the PDF file.
Is there a way to avoid the first step (web browser viewing) and have the report immediatly in PDF as soon as I click the "View Report" button? (without using email/file subscription)
We've recently set up a Principle, Mirror and Witness configuration with the Mirror and Witness in a separate building to the Principle. All three are part of the same domain (DMZ) and are different servers, the buildings are connected via a fiber optic cable. All servers and SQL Server instances are logged in with the same domain admin account DMZesAdmin.
Mirroring is all set-up and the databases are synchronized. Every once in a while some (not all, normally 6 out of 15) databases will switch roles and become active on the mirror. The SQL Server mirroring monitor job then reports:
Date 25/01/2007 12:37:01 Log Job History (Database Mirroring Monitor Job)
Step ID 1 Server DMZSQL01 Job Name Database Mirroring Monitor Job Step Name Duration 00:00:02 Sql Severity 16 Sql Message ID 32038 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0
Message Executed as user: DMZesadmin. An internal error has occurred in the database mirroring monitor. [SQLSTATE 42000] (Error 32038). The step failed.
I have no idea, what causes the failover, it could be a slow network or a bad set-up, can anyone give me some ideas of what to do to track down the problem or any experience of what could be causing this, it happens randomly every day or three. No warning and if I go to the mirror and failover back to the principle again then it's all just fine. However I don't want half my databases working on 1 server and half on the other.
Any ideas?
Thanks Ed
UPDATE:
I've just been looking at the logs on my Mirror and at the same time it reports in this order
Error: 1479, Severity: 16, State: 1.
The mirroring connection to "TCP://DMZSQL01.dmz.local:5022" has timed out for database "WARCMedia" after 10 seconds without a response. Check the service and network connections.
Database mirroring is inactive for database 'WARCMedia'. This is an informational message only. No user action is required.
Recovery is writing a checkpoint in database 'WARCMedia' (41). This is an informational message only. No user action is required.
The mirrored database "WARCMedia" is changing roles from "PRINCIPAL" to "MIRROR" due to Failover.
Database mirroring is inactive for database 'WARCMedia'. This is an informational message only. No user action is required.
...
This looks like a time out, is there any way to set the TimeOut threashold for Database mirroring or set retry intervals??