Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Sunday, July 7, 2013

How to backup SQL Database automatically Maintenance Plans

There are some simple ways to do.Follow the steps first

Go To SQL Server Configuration Manager > SQL Server 

Services > Run SQL Server AgentAnd set it to run automatically


Then go to SQL Server Management Studio, Find TAB Management > Maintenance Plans. Right Click > Maintenance Plans Wizard.


Text your maintenance plans, ex: DailyBackup. Select Option button : Single Schedule for entire task.

Click Configure > Set Schedule according your demands.

Then you have to Select Maintenance tasks. for this case, you choose Full Database backup.
Click Next, then define which database to backup, set backup location, and backup extension.

Again Click Next, Choose your report mode, then Finish.

Thats all and be happy!!!

Gud Luck for all

Friday, July 5, 2013

How to Solve error: 40 in SQL - Could not open a connection to SQL Server

The error "error: 40 - Could not open a connection to SQL Server" istelf can be caused by several reasons.  The 
additional error code often helps to narrow down the problem. 
For example, the original post lists this:

"... (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL
 Server, Error: 2)"

- error 40 is generated by the SqlClient provider, and is somehwat generic in this case. 

- error 2 is the "winerror" that comes from the OS, and is more specific: ERROR_FILE_NOT_FOUND in this case 

ERROR_FILE_NOT_FOUND most frequently indicates that the client attempted a connection to the *local* SQL 
Server but the server is either not available, not running, or not accepting connections.  One possibility is that 
the server was specified as ".", "(local)" (or ".\SQLEXPRESS", "(local)\SQLEXPRESS").  If a connection to a remote 
server is desired the actual name of the server must be used instead of ".". 

With regard to connections to a default instance server that listens on a non-stadard TCP port: Client Network 
Utility cannot be used to configure the default target TCP port used by .Net Fraemwork 2.0 (or VS2005).  You 
either need to specify the port in the connection string, e.g. if the port is 1500 you can specify 
"targetServer,1500", or you can create an alias specifying the TCP port (here, Client Network Utility can be used).