RcBuilder@walla.com
call centre: 054-5614020

make database tables copy using fetch next

Posted by: RcBuilder  /   Category: FETCH NEXT / Master / Replication / SQL / SQL Data Types / SQL Function / Stored Procedure   /   1 Comment
01
Jul
2014

make database tables copy using fetch next declare _cursor CURSOR FOR SELECT TABLE_NAME, TABLE_SCHEMA FROM information_schema.tables OPEN _cursor declare @currTABLE nvarchar(50), @currSCHEMA nvarchar(50) FETCH NEXT FROM _cursor INTO @currTABLE, @currSCHEMA -- first row -- WHILE @@FETCH_STATUS = 0 BEGIN BEGIN TRY exec('select * into copyDB.' + @currSCHEMA + '.' + @currTABLE + ' from '+ @currTABLE) --select @currSCHEMA + '.' + @currTABLE END TRY BEGIN CATCH PRINT('ERROR :.

Read more

send email via SQL

Posted by: RcBuilder  /   Category: Master / SQL / SQL Function   /   No Comments
11
May
2014

send email via SQL steps: * turn on the 'Database Mail XPs' option (need to turn on 'show advanced' option) * add mail profile: msdb.dbo.sysmail_add_profile_sp @profile_name='', @description=''; * add mail account : msdb.dbo.sysmail_add_account_sp @account_name = '', @email_address = '', @display_name = '', @replyto_address = '', @description = '', @mailserver_name = '', @mailserver_type = 'SMTP', @port = , @username = '', @password = '', @enable_ssl = ; * set profile level sysmail_add_principalprofile_sp @profile_name='', @is_default=0, @principal_name='public'; * add the.

Read more

Server ‘SERVERNAME’ is not configured for RPC

Posted by: RcBuilder  /   Category: BUGS / DBA / Linked Server / Master / SQL   /   No Comments
08
May
2014

Server ‘SERVERNAME’ is not configured for RPC error message: -------------- Server .... is not configured for RPC. problem: after adding linked server and trying to execute remote stored procedure located in this server exception was thrown regular queries not throw exception!! fix: * in the local server go to the defined linked server (Server Objects -> Linked Servers) * properties -> Server Properties.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים