eusa-it
asked on
SQL Server Maintenance Plans
We have an SQL Server Maintenance plan that is set up to just run a full back up of all of our Databases and drop them in sub folders on one of the local disks. At the moment none of these run (and as far as I can see they never have!)
When I select the option to execute them outwith the scheduled times the Execute Maintenance Plan window opens and it sits and apparently does nothing. I have received no errors and there doesn't appear to be any log of something going wrong.
Help appreciated.
When I select the option to execute them outwith the scheduled times the Execute Maintenance Plan window opens and it sits and apparently does nothing. I have received no errors and there doesn't appear to be any log of something going wrong.
Help appreciated.
for more info with screen shot
http://www.techrepublic.com/blog/datacenter/create-database-maintenance-plans-in-sql-server-2005-using-ssis/248
http://www.techrepublic.com/blog/datacenter/create-database-maintenance-plans-in-sql-server-2005-using-ssis/248
ASKER
The SQL Agent is up running as a local user SQLBackup and this user is a member of the SQLServerSQLAgentUsers group - does this group not give the user the required privileges to undertake the SQL Agent tasks?
As for creating the plan, I used the wizard and it appears okay!
As for creating the plan, I used the wizard and it appears okay!
In Sql server agent when you see job history for this particular plan what it is showing?
ASKER
The Activity Monitor claims never to have run the plans.
not in activity monitor.
If you open Sql Server Agent, Inside you will see Jobs Tab. In jobs tab you will find job that was created by Maintenance plan. If you right click on that job and clik on View history. What it is showing?
If you open Sql Server Agent, Inside you will see Jobs Tab. In jobs tab you will find job that was created by Maintenance plan. If you right click on that job and clik on View history. What it is showing?
ASKER
There is nothing there. However, in the Error Logs for Server Agent there is this:
05/19/2011 13:11:49,,Error,[382] Logon to server 'APPLE' failed (ConnLogJobHistory)
05/19/2011 13:11:49,,Error,[298] SQLServer Error: 5<c/> A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [SQLSTATE 08001]
05/19/2011 13:11:49,,Error,[165] ODBC Error: 0<c/> Login timeout expired [SQLSTATE HYT00]
05/19/2011 13:11:49,,Error,[298] SQLServer Error: 5<c/> Named Pipes Provider: Could not open a connection to SQL Server [5]. [SQLSTATE 08001]
05/19/2011 13:11:49,,Error,[382] Logon to server 'APPLE' failed (ConnLogJobHistory)
05/19/2011 13:11:49,,Error,[298] SQLServer Error: 5<c/> A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [SQLSTATE 08001]
05/19/2011 13:11:49,,Error,[165] ODBC Error: 0<c/> Login timeout expired [SQLSTATE HYT00]
05/19/2011 13:11:49,,Error,[298] SQLServer Error: 5<c/> Named Pipes Provider: Could not open a connection to SQL Server [5]. [SQLSTATE 08001]
Can you create maintenance plan again? Because if you have created a maintenance plane for backing up database, then corresponding job should also get created in Jobs tab under SQL Server Agent.
ASKER
Sorry, to clarify - the job is there but there is nothing in the log file summary.
now right clik on job and execute it. it will tell exact error message
ASKER
It's now doing what it did before and sitting on Status "In Progress" The plan I'm running backs up a couple of very very small databases so it shouldn't take long at all.
wait for this to execute it may or may not execute. then you can see the log for job. if it is taking time to execute this then it means it is not able to make connection to database. wait for some time to execute it
ASKER
No error message has come up. It's just sitting saying in progress. Could the error message in the logs have anything to do with it? I don't know why it's trying to connect to APPLE is surely should be connecting to local no?
It should connect to local database only. I created database backup plan on my local system and it worked fine. i am still wonderring why it is not working on ur system.
ASKER
I left the process running over night and got the following error:
========================== =========
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Conne ctionInfo)
-------------------------- ----
Program Location:
at Microsoft.SqlServer.Manage ment.Commo n.ServerCo nnection.E xecuteWith Results(St ring sqlCommand)
at Microsoft.SqlServer.Manage ment.Smo.E xecuteSql. ExecuteWit hResults(S tring query)
at Microsoft.SqlServer.Manage ment.Smo.E xecuteSql. Execute(St ringCollec tion query)
at Microsoft.SqlServer.Manage ment.Smo.E xecuteSql. ExecuteWit hResults(S tring query, Object con)
at Microsoft.SqlServer.Manage ment.Smo.P ostProcess JobActivit y.GetColum nData(Stri ng name, Object data, DataProvider dp)
at Microsoft.SqlServer.Manage ment.Smo.D ataProvide r.Manipula teRowDataP ostProcess ()
at Microsoft.SqlServer.Manage ment.Smo.D ataProvide r.GetTable ()
at Microsoft.SqlServer.Manage ment.Smo.E xecuteSql. ExecuteWit hResults(S tringColle ction query, Object con, StatementBuilder sb)
at Microsoft.SqlServer.Manage ment.Smo.S qlObjectBa se.FillDat a(ResultTy pe resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Manage ment.Smo.S qlObjectBa se.FillDat aWithUseFa ilure(SqlE numResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Manage ment.Smo.S qlObjectBa se.BuildRe sult(EnumR esult result)
at Microsoft.SqlServer.Manage ment.Smo.S qlObjectBa se.GetData (EnumResul t erParent)
at Microsoft.SqlServer.Manage ment.Sdk.S fc.Environ ment.GetDa ta()
at Microsoft.SqlServer.Manage ment.Sdk.S fc.Environ ment.GetDa ta(Request req, Object ci)
at Microsoft.SqlServer.Manage ment.Sdk.S fc.Enumera tor.GetDat a(Object connectionInfo, Request request)
at Microsoft.SqlServer.Manage ment.Smo.E xecutionMa nager.GetE numeratorD ataReader( Request req)
at Microsoft.SqlServer.Manage ment.Smo.S qlSmoObjec t.GetInitD ataReader( String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Manage ment.Smo.S qlSmoObjec t.ImplInit ialize(Str ing[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Manage ment.Smo.S qlSmoObjec t.OnProper tyMissing( String propname, Boolean useDefaultValue)
at Microsoft.SqlServer.Manage ment.Smo.P ropertyCol lection.Re trieveProp erty(Int32 index, Boolean useDefaultOnMissingValue)
at Microsoft.SqlServer.Manage ment.Smo.P ropertyCol lection.Ge tValueWith NullReplac ement(Stri ng propertyName, Boolean throwOnNullValue, Boolean useDefaultOnMissingValue)
at Microsoft.SqlServer.Manage ment.Smo.P ropertyCol lection.Ge tValueWith NullReplac ement(Stri ng propertyName)
at Microsoft.SqlServer.Manage ment.Smo.A gent.Job.g et_LastRun Date()
at Microsoft.SqlServer.Manage ment.SqlMa nagerUI.St artAgentJo bs.WaitFor JobToFinis hAction.Do Action(Pro gressItemC ollection actions, Int32 index)
at Microsoft.SqlServer.Manage ment.SqlSt udio.Contr ols.Progre ssItemColl ection.DoW orkOnThrea d()
========================== =========
A severe error occurred on the current command. The results, if any, should be discarded. (.Net SqlClient Data Provider)
-------------------------- ----
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476
-------------------------- ----
Server Name: (local)
Error Number: 0
Severity: 11
State: 0
-------------------------- ----
Program Location:
at Microsoft.SqlServer.Manage ment.Commo n.Connecti onManager. ExecuteTSq l(ExecuteT SqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Manage ment.Commo n.ServerCo nnection.E xecuteWith Results(St ring sqlCommand)
==========================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Conne
--------------------------
Program Location:
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
==========================
A severe error occurred on the current command. The results, if any, should be discarded. (.Net SqlClient Data Provider)
--------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476
--------------------------
Server Name: (local)
Error Number: 0
Severity: 11
State: 0
--------------------------
Program Location:
at Microsoft.SqlServer.Manage
at Microsoft.SqlServer.Manage
are u able to take database backup by right clicking on database?
ASKER
Yes - this executes perfectly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That lets me run it if I press execute under jobs but the scheduled task doesnt run and I get the Logon to Server Local error again in the Server Agent logs. Could this be because server agent runs as a domain user (eusasys1@domain.com) I have added domain\eusasys1 to the SQL server logins but it wont let me add eusasys1@domain.com as it's not a valid NT account name or something.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Victory! I got the SQL Agent to run as Domain\eusasys1 and this appears to allow the Job Scripts you suggested run!
Thanks buddy!
Thanks buddy!
As you are saying that if you try to execute it manually even then it didn't did any thing. it mean that sql data backup plan is not created properly.
see this link to create backup plan
http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p1.aspx