Skip to main content

Posts

Showing posts from September, 2012

Create Linked Server using T-SQL

Create Linked Server using T-SQL While the linked server can be created using the built-in wizard of the Management Studio, it can also be created using TSQL statements as in the following listing (run both statements, the first one creates the linked server and the second the logins). Exec master.dbo.sp_addlinkedserver @server=N’localhost’, @srvprodcut=N’MySQL’, @provider=N’MSDASQL’, @datasrc=N’MySQL’ Exec master.dbo.sp_addlinkedserverlogin @server=N’localhost’, @locallogin=NULL, @rmtuser=N’user’, @rmtpassword=N’<your password>’ @rmtsrvname=N’localhost’

Configure Database Mail - Send Email From SQL Database

http://www.codeproject.com/Articles/29060/SQL-SERVER-2008-Configure-Database-Mail-Send-Email 1. create profile 2.  configure email      run this code for configure     sp_CONFIGURE 'show advanced', 1    GO    RECONFIGURE    GO    sp_CONFIGURE 'Database Mail XPs', 1    GO    RECONFIGURE    GO 3. Send mail EXEC sp_send_dbmail @profile_name= 'Test' , @recipients= 'test@example.com' , @subject= 'Test message' , @body= 'This is the body of the test message. sent through DataBase mail'