How to export data with column headers in sql server 2008 with bcp command?
Hi all,
I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
am trying to import data with bcp command data has been copied but column names are not came.
I am using the below query:-
EXEC master..xp_cmdshell
'BCP "SELECT * FROM [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
Thanks,
SAAD.
Hi All,
I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
DECLARE @BCPCMD
nvarchar(4000)
DECLARE @BCPCMD1
nvarchar(4000)
DECLARE @BCPCMD2
nvarchar(4000)
DECLARE @SQLEXPRESS
varchar(50)
DECLARE @filepath
nvarchar(150),@SQLServer
varchar(50)
SET @filepath
= N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
as varchar(4))
+RIGHT('00'+CAST(MONTH(GETDATE())
as varchar(2)),2)
+RIGHT('00'+CAST(DAY(GETDATE())
as varchar(2)),2)+'.log" '
Set @SQLServer
=(SELECT
@@SERVERNAME)
SELECT @BCPCMD1
= '''BCP "SELECT
* FROM [tempdb].[dbo].[wErrorLog] " QUERYOUT '
SELECT @BCPCMD2
= '-c -t , -T -S '
+ @SQLServer +
SET @BCPCMD
= @BCPCMD1+ @filepath
+ @BCPCMD2
Print @BCPCMD
-- Print out below
'BCP "SELECT
* FROM [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
EXEC
master..xp_cmdshell
@BCPCMD
''BCP' is not recognized as an internal or external command,
operable program or batch file.
NULL
if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
EXEC
master..xp_cmdshell
'BCP "SELECT * FROM
[tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
Thanks, SAAD.
Similar Messages
-
SSPI handshake error in SQL Server 2008 with SharePoint 2010
Hi,
I am having some trouble with my SharePoint database server this time. SharePoint Server 2010 is running on Windows Server 2008 R2 and SQL Server 2008 is running on Windows Server 2008 R2 as SharePoint database also. SharePoint users are authenticated through
Active Directory. I am getting the following error almost everyday in SQL Server-
SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure.
[CLIENT: (Server IP Address)].
Could somebody help me to resolve this error?
Thanks in advance.Hi pointtoshare,
No, a Service Principal Name (SPN) must be registered with Active Directory to use Kerberos authentication with SQL Server and not need to use NTLM authentication.
Could you run the following query on your SharePoint Server and check the value of the auth_scheme column?
SELECT auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@spid ;
Edit:The
query above should run on the SharePoint machine with using SQL Management Studio.
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Problem with restore database in sql server 2008
hi,,,when i want to restore database from a .bak file i see this error
TITLE: Microsoft SQL Server Management Studio
Restore failed for Server 'ALI-PC'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4000. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a
backup that is compatible with this server. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&LinkId=20476
BUTTONS:
OK
i checked overwrite the existing database(WUTH REPLACE) in option,but i cant restore again,,,please help meHi,
You need to install SQL Server 2008 R2 Service Pack 2
Download
http://www.microsoft.com/en-us/download/details.aspx?id=11093, you are currently running the RTM and the backup was from Version 10.50.4000 and your attempting to restore to version 10.00.1600.
To find your current SQL Version open a New Query and paste the following then execute
SELECT @@VERSION AS 'SQL Server Version
Reference:
http://sqlserverbuilds.blogspot.com/
http://support.microsoft.com/kb/321185
http://technet.microsoft.com/en-us/library/ms177512.aspx
Cheers,
-Ivan -
How to convert string to an integer in SQL Server 2008
Hi All,
How to convert string to an integer in sql server,
Input : string str="1,2,3,5"
Output would be : 1,2,3,5
Thanks in advance.
Regards,
SunilNo, you cannot convert to INT and get 1,2,3 BUT you can get
1
2
3
Is it ok?
CREATE FUNCTION [dbo].[SplitString]
@str VARCHAR(MAX)
RETURNS @ret TABLE (token VARCHAR(MAX))
AS
BEGIN
DECLARE @x XML
SET @x = '<t>' + REPLACE(@str, ',', '</t><t>') + '</t>'
INSERT INTO @ret
SELECT x.i.value('.', 'VARCHAR(MAX)') AS token
FROM @x.nodes('//t') x(i)
RETURN
END
----Usage
SELECT * FROM SplitString ('1,2,3')
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Temporarily disable Digital Signature Checks to Install MS SQL Server 2008 with no Internet Access
I am attempting to install a licensed copy of MS SQL Server 2008 in a Private Enclave that does NOT have Internet access on a Win2008 R2 SP1 server (that is VM - thus I can't reboot and press F8 to select "Disable Driver Signature Enforcement"
). The installation fails with an error of the vc_red.cab file being found either corrupt or a bad digital signature. The file is good, but the signature has an expiration of 2011. I understand that a DOTNET SDK v1.1 program called setreg.exe
will enable disabling the digital signature check, but I am not permitted to use that program.
I might be permitted to use the "Signtool.exe" utility, but it is not clear what command sequences are necessary to disable and then re-enable the Digital Signature checks.
I saw a thread that recommended using the command:
bcdedit.exe /set nointegritychecks ON
However, the comments indicated that this might not have worked.
Are there Registry settings I can use with regedit to make the necessary changes to be able to install the application? I anticipate running into this problem with other software when I do not have Internet connectivity. I already tried
downloading the Microsoft CRL files; updated the lists on the Server; and rebooted. This did not solve my problem.Hi,
As far as I know, it is not recommended to disable digital signature check.
Since we are not familair with installing MS SQL server, please also refer to SQL forums below to see if experts there have more insights regarding the matter.
https://social.technet.microsoft.com/Forums/sqlserver/en-US/home
Best Regards,
Amy
Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
Hi:
According to all the Reporting Services logs my Reporting Point was setup correctly. When I try and run any report I see the entries below in the srsrp.log on the SQL Server. The report names show up in the Console but when I right any of the
listed reports I get errors and no report runs.
I am running SQL Server 2008 R2 SP2 on a remote server. SQL is installed on its own server. There is no firewall between the Configuration Manager server and SQL Server.
Thanks.
Mark
(!) Error retrieving folders - [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
connected host has failed to respond.)]. SMS_SRS_REPORTING_POINT
1/25/2013 9:15:07 AM 4532 (0x11B4)
No folder configuration information found.
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Next security configuration at [1/25/2013 9:22:42 AM]
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Root Folder exists
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Successfully checked that the SRS web service is healthy on server DBSCCM.LOCAL
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
Waiting for changes for 1 minutes
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM
4532 (0x11B4)
SRSRP registry key change notification triggered.
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:16 AM
4532 (0x11B4)
Waiting for changes for 1 minutes
SMS_SRS_REPORTING_POINT 1/25/2013 9:15:16 AM
4532 (0x11B4)
Timed Out...
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Reporting Services URL from Registry [http://dbsccm/ReportServer/ReportService2005.asmx]
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Reporting Services is running
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
Updating data source {5C6358F2-4BB6-4a1b-A16E-8D96795D8602} at ManagedDesktops_MD1
SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM
4532 (0x11B4)
(!) Error retrieving folders - [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
connected host has failed to respond.)]. SMS_SRS_REPORTING_POINT
1/25/2013 9:17:40 AM 4532 (0x11B4)
No folder configuration information found.
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Next security configuration at [1/25/2013 9:22:42 AM]
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Root Folder exists
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Successfully checked that the SRS web service is healthy on server DBSCCM.LOCAL
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Waiting for changes for 1 minutes
SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM
4532 (0x11B4)
Timed Out...
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Reporting Services URL from Registry [http://dbsccm/ReportServer/ReportService2005.asmx]
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Reporting Services is running
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Retrieved datasource definition from the server.
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)
Updating data source {5C6358F2-4BB6-4a1b-A16E-8D96795D8602} at ManagedDesktops_MD1
SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM
4532 (0x11B4)Hi:
Windows Firewall is off on both systems.
I can ping the Configuration Manager server from the SQL Server by netbios name, ip address and fully qualified domain name. I can ping the SQL Server from the Configuration Manager server by netbios name, ip address and fully qualified domain
name.
I have uninstalled and installed the Reporting Point Service a couple of times and everything looks fine according to the logs after the install finishes but these errors only appear each time I try and Run a report.
Mark -
Hi there,
I have a Windows 2008 R2 Enterprise x64 SP2 cluster which has 2 SQL Server 2008 R2 Enterprise Edition x64 SP2
instances.
A domain account "Domain\Login" is administrator on both physcial nodes and "sysadmin" on both SQL Server instances.
Currently both instances are running on same node.
While logging on to SQL Server instance 2 thru "Domain\Login" using "IP2,port2", I get error 18452 "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication". This happened in the past
as well but issue resolved post insatllation of SQL Server 2008R2 SP2. This has re-occurred now. But it connects using 'SQLVirtual2\Instance2' without issue.
Same login with same rights is able to access Instance 1 on both 'SQLVirtual1\Instance1' and "IP1,port1" without any issue.
Please help resolve the issue.
Thanks,
AYHello,
I Confirm that I encountred the same problem when the first domain controller was dow !!
During a restarting of the first domain controller, i tried to failover my SQL Server instance to a second node, after that I will be able to authenticate SQL Server Login but Windows Login returns Error 18452 !
When the firts DC restart finishied restarting every thing was Ok !
The Question here : Why the cluster instance does'nt used the second DC ???
Best Regards
J.K -
Utility data collection job Failure on SQL server 2008
Hi,
I am facing data collection job failure issue (Utility-data Collection) on SQL server 2008 server for, below is the error message as :
<service Name>. The step did not generate any output. Process Exit Code 5. The step failed.
Job name is collection_set_5_noncached_collect_and_upload, as I gothrough the google issue related to premission issue but where exactly the access issues are coimng, this job is running on proxy account. Thanks in advance.Hi Srinivas,
Based on your description, you encounter the error message after configuring data collection in SQL Server 2008. For further analysis, could you please help to collect detailed log information? You can check the job history to find the error log around the
issue, as is mentioned in this
article. Also please check Data Collector logs by right-clicking on Data Collection in the Management folder and selecting View Logs.
In addition, as your post, the exit code 5 is normally a ‘Access is denied ’ code. Thus please make sure that the proxy account has admin permissions on your system. And ensure that SQL Server service account has rights to access the cache folder.
Thanks,
Lydia Zhang -
How to point out high CPU Utilization in sql server 2008
Hi,
I am using sql server 2008 , where in i have 10 instances in the physical box of all sql server 2008 versions.
I can see , the CPU (12 CPUS) that is allocated to the physical box is consuming around 90% of utilization, I need your help to point out the exact sql instance that is using more CPU, Please give me the mathods , since i understand that there is no fixed
rule to derive the solution.
Thank you
hemadriThis first thing to check if CPU is at 100% is to look for parallel queries:
-- Tasks running in parallel (filtering out MARS requests below):
select * from sys.dm_os_tasks as t
where t.session_id in (
select t1.session_id
from sys.dm_os_tasks as t1
group by t1.session_id
having count(*) > 1
and min(t1.request_id) = max(t1.request_id));
-- Requests running in parallel:
select *
from sys.dm_exec_requests as r
join (
select t1.session_id, min(t1.request_id)
from sys.dm_os_tasks as t1
group by t1.session_id
having count(*) > 1
and min(t1.request_id) = max(t1.request_id)
) as t(session_id, request_id)
on r.session_id = t.session_id
and r.request_id = t.request_id;
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to export data to 2 tabs in excel from form with two tabs
Hi friends
i am now faceing a prbs of exporting data to excel to different tabs.
ex:- i have a multiple records form with two tab . i want to export data corresponding to excel as two tabs.
can anyone suggest me how can i export data to 2nd tab.. is any functions or procedure to help me .Hello,
at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet. And both describe how to do it.
Regards
Marcus -
How to use update trigger in sql server 2008 with specific column
Hello friends currently my trigger updates on table update, and I need to change this to only fire when specific column changes.
/****** Object: Table [dbo].[User_Detail] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User_Detail](
[sno] [int] IDENTITY(1,1) NOT NULL,
[userid] [nvarchar](50) NULL,
[name] [nvarchar](max) NULL,
[jointype] [nvarchar](50) NULL,
[joinside] [nvarchar](50) NULL,
[lleg] [nvarchar](50) NULL,
[rleg] [nvarchar](50) NULL,
[ljoining] [int] NULL,
[rjoining] [int] NULL,
[pair] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[User_Detail] table data ******/
SET IDENTITY_INSERT [dbo].[User_Detail] ON
INSERT [dbo].[User_Detail] values (1, N'LDS', N'LDS Rajput', N'free', N'Left', N'jyoti123', N'SUNIL', 6, 4, 4)
INSERT [dbo].[User_Detail] VALUES (2, N'jyoti123', N'jyoti rajput', N'free', N'Left', N'mhesh123', N'priya123', 3, 2, 2)
SET IDENTITY_INSERT [dbo].[User_Detail] OFF
/****** Object: Table [dbo].[User_Detail] trigger ******/
CREATE TRIGGER triggAfterUpdate ON User_Detail
FOR UPDATE
AS
declare @userid nvarchar(50);
declare @pair varchar(100);
select @userid=i.userid from inserted i;
select @pair=i.pair from inserted i;
SET NOCOUNT ON
if update(pair)
begin
insert into Complete_Pairs(userid,pair)
values(@userid,1);
end
GO
/****** Object: Table [dbo].[Complete_Pairs] Script Date: 05/22/2014 21:20:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Complete_Pairs](
[Sno] [int] IDENTITY(1,1) NOT NULL,
[userid] [nvarchar](50) NULL,
[pair] [int] NULL
) ON [PRIMARY]
GO
my query is TRIGGER triggAfterUpdate is fired only when pair column in User_Details table is update only and when we update other column like ljoin or rjoin then my trigger is not fired
please any one can suggest us how it can done or provide solution
Jitendra Kumar Sr. Software Developer at Ruvixo Technologies 7895253402>select @userid=i.userid
frominserted i;
select
@pair=i.pair
frominserted i;
The code above assumes a single row UPDATE.
You have to setup the trigger for set processing like when 100 rows are updated in a single statement.
UPDATE trigger example: http://www.sqlusa.com/bestpractices2005/timestamptrigger/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
BCP - Error with column text in sql server 2000
Hi,
Im trying to restore a bcp using the command:
bcp "db.dbo.tb_log_old" in "tb_log2013.out" -SSERVER -T -n
Im using SQL 2000 with the table below
CREATE TABLE [dbo].[tb_log_old](
[cd_id] [int] NULL,
[cd_servico] [int] NULL,
[dt_ocorrencia] [datetime] NULL,
[nm_xml_entrada] [text] NULL,
[nm_xml_saida] [text] NULL,
[dt_inicio_processamento] [datetime] NULL,
[dt_fim_processamento] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
I have got the error
Starting copy...
SQLState = S1001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Memory allocation failure
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Text column data incomplete
SQLState = 37000, NativeError = 4810
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Expected the TEXT token in data stream for bulk copy of text or image data.
BCP copy in failedI tried with binary and nvarchar but I got the error below:
Can I get just 2 columns in the bcp?
Starting copy...
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
BCP copy in failed -
How to track only one column updated in SQL Server 2012?
Is there a way to only track one specific column named Newsletter (bit format) of a table only when any record in that column has been changed from False to True?
e.g. In SQL Serer 2012, I have a table named tblSignupHistory. so i originally set the query like this:
ALTER TABLE tblSignupHistory
ENABLE CHANGE_TRACKING
WITH(TRACK_COLUMNS_UPDATED = ON)
and in my stored procedure, if any data is changed, SQL Server will automatically send me an email notification.
BUT i only want the notification email to be send only when this one specific column's value is changed from 0 to 1 (False to True). Any changes in other columns for the same table can be ignored.
Thanks.Blog on the topic:
http://www.exacthelp.com/2012/03/send-email-when-data-of-any-columns-of.html
QUOTE: "Over all idea
1. Enable the change tracking (CT) in database
2. Enable the change tracking (CT) in table
3. Enabled and configure the database mail
4. Create a stored procedure which will get data change using CT and send an email
5. Create a sql sever agent job which will execute the procedure in every 10 second.
Alternate solutions blog on the topic: Get an alert when a certain record changes in SQL Server
SQL Server UPDATE() function:
http://technet.microsoft.com/en-us/library/ms177523.aspx
Kalman Toth Database & OLAP Architect
Free T-SQL Scripts
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to replicate data between Oracle db and SQL server dbs in real time?
Hello,
Anyone has idea that what tool we can use to do data replication in real time between Oracle and SQL sever or Oracle and Sybase or Sql server and Sybase?
This is topic is brought by a project manager?
I only know Oracle to Oracle dbs by streams or GoldenGate.
Thanks
JerrySince GoldenGate's bread and butter was (and is) replicating data between heterogeneous data sources, and since Oracle has purchased GoldenGate, that would seem like a natural place to start.
Beyond that, it depends on the architecture you want and how you define "real time." Just about any ETL tool on the market, whether Oracle's ODI or OWB or any number of third party products (Informatica, DataStage, etc) can handle "trickle feeds" from various data sources to a database target of your choosing. Different tools will have different sorts of integration with the source database, many will require that a bunch of triggers are created to track changes on the source systems.
If you want Oracle to control the replication process (which doesn't really make sense if we're talking about replication from a non-Oracle database to another non-Oracle database), you can use the Oracle Transparent Gateway products to create database links from Oracle to the non-Oracle databases and query data on the source database periodically.
Justin -
How to get clients connected in WMS on windows server 2008 with c# coding
Sorry to bother anyone about this question.
Can anyone knows how to retrieve amount of client connection to Windows Media Server in real time same as WMS does on server console by c# programming ?
I got logfiles of WMS in system32 directory for details but it must be off-line of all connections which will able to get those informations for doing anything,but in this case I want real time client connection
at online when a client connects to WMS that I will get amout of that client also.
I have tried to search Windows Media Service SDK to develop this on my Windows 7 OS,but I did not find that really.
Can anyone knows this,please ?
Regards,
BigBermHi SYaGCi,
Denis is right this is actually documented in the Supported Platforms Documentation:
"Windows 7 and Windows Server 2008 R2 are new platform support additions in Service Pack 3 which are only available for support on the SP3 full release install of SAP BusinessObjects Enterprise. The SP3 patch only release of SAP BusinessObjects Enterprise does not provide support for these two new platforms."
Kind regards,
John
Maybe you are looking for
-
How do I download a DVD to my iMac?
I'm new at this, have not tried this before. I have a privately made DVD of a one-act play I produced this summer. I want to download it to my iMac so I can upload it to my website's server. I have not found a "download" feature under Finder or el
-
Is there any way to print return address labels?
Is there any way to print return address labels in Pages?
-
FTP Adapter - file.sender.customizer_class
Hey, Anyone has a working example on how to implement this class? I have one class, and apparently, in its simplest form it could be something like this: package slf.nask.FileSender; import java.util.Date; import oracle.oai.agent.adapter.sdk.Agent; i
-
Can you filter a date range in Numbers 3.1?
It seems crazy... but I can't figure out how to filter a date range in the new Numbers (3.1). In other words, I have a column with individual dates e.g. 31-Dec-2012, 29-Feb-2013, 19-April-2004, etc. I want to filter it so that ONLY the dates from 20
-
I have a Apple Lightning to HDMI adapter, it was working fine but now I get no output on my Ipad Air. I have checked the lead which works fine with my Iphone 5. Is it likely to be the hardware interface on the Ipad (i.e. broken) or is it a software i