Pattern matching issue in SQL Server 2008 R2

Hi, I am working on generalize survey questions. All this data is stored in a VARCHAR() datatype. I have few survey questions like below.
Do you take pills?
If you have so and so trouble. Do you take pills with any of these composition?
I am making it generic using CASE statement
CASE WHEN SurveyQuestion LIKE 'Do you take pills%' OR SurveyQuestion LIKE '%. Do you take pills%' THEN 'Do you take pills?'
END
But the resultset is not mapping '%. Do you take pills%' to Do you take pills?
Thanks in advance...........
Ione

It works for me! Please post DDL & DML like the following code:
DECLARE @T TABLE
( SurveyQuestion varchar(500));
INSERT @T
VALUES
( 'Do you take pills' ),
( '. Do you take pills' ),
( 'Do you take pill' ),
( 'Do you take pills2' );
SELECT
CASE
WHEN SurveyQuestion LIKE 'Do you take pills%'
OR SurveyQuestion LIKE '%. Do you take pills%'
THEN 'Do you take pills?'
END
FROM @T;
Cheers,
Saeid Hasani
Database Consultant
Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
[My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
[Twitter] [Facebook] [Email]

Similar Messages

  • What is the best way to deal with memory leak issue in sql server 2008 R2

    What is the best way to deal with memory leak issue in sql server 2008 R2.

    What is the best way to deal with memory leak issue in sql server 2008 R2.
    I have heard of memory leak in OS that too because of some external application or rouge drivers SQL server 2008 R2 if patched to latest SP and CU ( may be if required) does not leaks memory.
    Are you in opinion that since SQL is taking lot of memory and then not releasing it is a memory leak.If so this is not a memory leak but default behavior .You need to set proper value for max server memory in sp_configure to limit buffer pool usage.However
    sql can take more memory from outside buffer pool if linked server ,CLR,extended stored procs XML are heavily utilized
    Any specific issue you are facing
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • SQL Sever Management Studio intellisense issue in SQL Server 2008 R2 and in SQL Sever 2012

    Hi Team,
    Intellisense in sql server management studio is working fine when i am accessing the databases in my  local server.
    But Intellisense is not working when ever i am trying to connect to the remote servers with the client
    I tried different blogs and i tried to configure all the options i have upgraded to some patches upgraded for sql 2008 r2 client to sql 2012 client.
    But Intellisense is not working with the remote server databases in the sql management studio .
    Intellisense is working in the server but the same is not working when we are trying to access with client from our local machines.
    Please provide me help to fix this issue
    Regards
    Karthik Kattamudi

    Did you try to refresh the cache by hitting CTRL+SHIFT+R?
    Also, these remote servers, are they SQL Server 2008 R2 as well or different version?
    Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana

  • Issues installing SQL Server 2008 instance - Install fails

    Hi there,
    I have a server windows server 2008 R2 standard.
    While doing an Enterprise to Standard downgrade, I have removed enterprise edition of SQL Server 2008, rebooted and while installing standard edition, I get the below error saying "You
    SQL server 2008 installation completed with failures. Some or all identity references could not be translated"
    Bit of background. This server has another express instance of SQL Server 2008. I have used local system account, network service as well as our general SQL service account, but I get the error
    towards the end of the installation and it fails saying “Some or all identity references could not be translated.”
    I am installing a named instance with the same name as before but fails. I have tried creating a test instance that fails too. Any ideas? I have also run the clean up utility but no joy.
    Cheers
    Faltaf

    Hi FAltafB,
    According to your description, you come across the error that some or all identity references could not be translated. Please help to post SQL Server setup error log for analysis. By default, SQL Server setup summary and detail logs located in C:\Program
    Files\Microsoft SQL Server\100\Setup Bootstrap\Log.
    Based on my research, this issue could be due to the incomplete uninstallation for previous installation. Another cause could be that you are installing SQL Server after your machine becomes a domain controller.
    To troubleshoot the issue, please pay attention to the points below.
    1. Make sure you have administrative rights on the computer, uninstall all the components related with SQL Server 2008 enterprise from the control panel and delete registry keys mentioned in the article:
    http://blogs.msdn.com/b/sreekarm/archive/2010/03/15/sql-express-is-not-installed-properly-steps-to-be-taken-before-reinstall-again.aspx
    2. Use
    SQL Server 2008 R2 Best Practice Analyzer to detect if SQL Server is installed on a domain controller. If SQL Server is installed on a domain controller, please demote your machine from being a domain controller and install the SQL Server again since it
    is not recommended to install SQL Server on a domain controller.
    Regards,
    Michelle Li

  • Update Script Issue in SQL server 2008 r2

    please see my below script whenever i run this script i got below error
    update Scmdb..StockAge set Age1=SUM(a.gr_lin_acceptedqty) 
    from scmdb..gr_lin_details a 
    where DATEDIFF(day,a.gr_lin_fadate,'2014-02-02')<90 
    and ItemCode=a.gr_lin_itemcode 
    and VarCode=a.gr_lin_itemvariant
    Error : An aggregate may not appear in the set list of an UPDATE statement.

    Hi,
    Please check this
    update Scmdb..StockAge set Age1=(SELECT SUM(a.gr_lin_acceptedqty)
    from scmdb..gr_lin_details a
    where DATEDIFF(day,a.gr_lin_fadate,'2014-02-02')<90
    and ItemCode=a.gr_lin_itemcode
    and VarCode=a.gr_lin_itemvariant)
    I hope this is helpful.
    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    MCSE Data Platform
    MCITP: SQL Server 2008 Administration/Development
    MCSA SQL Server 2012
    MCTS: SQL Server Administration/Development
    MyBlog

  • Mirroring issue on sql server 2008 R2

    TITLE: Database Properties
    One or more of the server network addresses lacks a fully qualified domain name (FQDN). To start mirroring without using a FQDN, click "Yes." To specify the FQDN, click "No." Then, specify every TCP address by using the syntax for a fully
    qualified TCP address, and click Start Mirroring again.
    This syntax is:
    TCP://<computer_name>.<domain_segment>[.<domain_segment>]:<port>
    BUTTONS:
    &Yes
    &No

    Hi shravankumarkulkarni,
    According to your description, you fail to configure database mirroring. To troubleshoot this issue, please check one of the following methods.
    1. If the servers are in a domain environment.
        a. Find the fully qualified computer name (FQDN) of each server by running 'IPCONFIG /ALL' from the command prompt.      
        b. Concatenate the “Host Name” and “Primary DNS Suffix”.
             Host Name . . . . . . . . . . . . : A
             Primary Dns Suffix . . . . . . . : corp.mycompany.com
             Then FQDN of your computer name is just A.corp.mycompany.com.
        c. Configure database mirroring again.
    2. However, if the servers are not in a domain environment, follow the steps below to setup DNS suffix. Or you can choose to create a FQDN for each server by editing the host file.
        a. Open the server properties window (right click My Computer and then properties)
        b. Click Computer Name tab and then click the 'Change' button
        c. Click 'More' button
        d. Input the 'Primary DNS suffix of this computer'
        f. Click 'OK' & restart the server. For more details, please review this
    blog.
    Thanks,
    Lydia Zhang

  • Msg 8631 Internal error: Server stack limit has been reached on SQL Server 2012 from T-SQL script that runs on SQL Server 2008 R2

    I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
    potentially deep nesting in your query, and try to simplify it.
    The script itself doesn't seem to be all that deep or nested.  The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012.  I'm just really baffled why something that SQL Server generated with very
    few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
    I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server.  This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
    amount of our time doing it the manual way.
    Below is an 'condensed' version of the script which fails.  I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
    Wizard and told it to save to script.
    declare @dbname varchar(MAX), @SQL nvarchar(MAX)
    declare c_dblist cursor for
    select name from sys.databases WHERE name like 'dbone[_]%' order by name;
    open c_dblist
    fetch next from c_dblist into @dbname
    while @@fetch_status = 0
    begin
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
    null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
    @del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
    EXEC sp_executesql @SQL
    SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
    = null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
    EXEC sp_executesql @SQL
    fetch next from c_dblist into @dbname
    end
    close c_dblist
    deallocate c_dblist
    George P Botuwell, Programmer

    Hi George,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Allen Li
    TechNet Community Support

  • Daylight Time Saving - SQL Server 2008 Mirroring

    Dear SQL Forum Group Members,
    1) Could anyone clarify me, will there be any issues in SQL server 2008 Mirroring because of Daylight Time saving ?? Also, will there be any impact on Tlog backup scheduled jobs which will be running in 15 Minutes interval.?
    2) Do i need to reschedule my mirroring & scheduled jobs on Daylight saving days?? Is there manual(DBA) Intervention needed on these days??
    Awaiting your valuable feedback.

    Nope, there won't be any impact on the database mirroring as it continually transfer the log.
    http://www.sqlskills.com/blogs/paul/how-does-daylight-savings-time-affect-disaster-recovery/
    -Prashanth

  • Sql server 2008 and Windows 8

    Hi
    I published my WPF application using VS 2010 Express edition and trying to install it on Windows 8.  The application runs but when it comes to searching the database that was included in the installation package it gives the error
    "This program has compatibility issues Microsoft SQL Server(2008 and 2008 R2)"
    The installer when setup was run did download SQL Server so I am not sure why I am getting this error.  Any advice?

    Hello,
    Service Pack 3 for SQL Server 2008 is required to make it compatible for Windows 8 or Windows 8.1. For more information,
    please read the following Support article:
    https://support.microsoft.com/kb/2681562?wa=wsignin1.0
    You can download SP3 from the following URL:
    http://www.microsoft.com/en-us/download/details.aspx?id=27594
    If you are installing SQL Server 2008, continue setup despite of the warning and apply SP3 after installing SQL Server 2008.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Can I install SQL Server 2008 on Server 2012R2?

    <v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
     <v:stroke joinstyle="miter">
    <v:formulas>  <v:f eqn="if lineDrawn pixelLineWidth 0">
    </v:f></v:formulas></v:stroke></v:shapetype>When trying to install SQL 2008 on server 12R2 I get an error msg stating "This program has compatibility issues" (Microsoft SQL Server (2008 or 2008 R2).  Any ideas
    or thoughts.....
    Thanks
    Z<v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"><v:stroke
    joinstyle="miter"><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f eqn="prod @3 21600 pixelWidth">
      <v:f eqn="prod @3 21600 pixelHeight">
      <v:f eqn="sum @0 0 1">
      <v:f eqn="prod @6 1 2">
      <v:f eqn="prod @7 21600 pixelWidth">
      <v:f eqn="sum @8 21600 0">
      <v:f eqn="prod @7 21600 pixelHeight">
      <v:f eqn="sum @10 21600 0">
     </v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
     <v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
     <o:lock aspectratio="t" v:ext="edit">
    </o:lock></v:path></v:stroke></v:shapetype><v:shape alt="" id="Picture_x0020_2" o:spid="_x0000_i1025" style="width:304.5pt;height:237.75pt;" type="#_x0000_t75">
    <v:imagedata o:href="cid:[email protected]" src="file:///C:\Users\zshams\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png">
    </v:imagedata></v:shape>

    Hello,
    Based on the following article, you must apply SP3 or SP4 for SQL Server 2008 to make it compatible with on Windows Server
    2012 R2.
    https://support.microsoft.com/kb/2681562/?wa=wsignin1.0
    You can either perform a slipstream using the following Support article.
    http://support.microsoft.com/kb/955392
    or ignore the warning and continue with SQL Server 2008 setup, and when SQL Server installation is finished apply SP3 or SP4.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Crystal Report 2008 results "Password did not match error" in SQL Server Log

    Hi,
    I am trying to develop some crystal reports using Crystal Report 2008 SP4 to connect to SQL server 2008 through RDO (ODBC). My problem is that anytime Crystal Report is trying to establish a connection with SQL Server, first it tries to connect with the wrong password and results the following error message in SQL Server log:
    Login failed for user 'peyman'. Reason: Password did not match that for the login provided. [CLIENT: 192.168.2.198]
    The login name 'peyman' is the right one as I have quoted the same in setting up ODBC System DSN using "SQL Server Native Client 10". But somehow Crystal Report is taking its chance and trying to connect before prompting me for the password. After this error logged to SQL server side, I can see Crystal Report pops up the prompt to enter DSN password. After supplying password to this prompt, Crystal Report works fine and pulls the data and renders the report without having any more incorrect password error logged to SQL Server.
    The attached file shows the step I am taking to regenerate the issue. I need this to be fixed as anytime uses any of these reports and tries to render it with crystal runtime engine the same error message raises in SQL Server side and logged in the log file.
    Thanks,

    Hi Peyman,
    This is the way it should work, In CR designer when you open the report it does nothing. As soon as you hit the Refresh button then CR tries to use the connection saved with the report. It assumes what is saved with the report is a valid server and connection info. CR simply tries to verify the server is still active.
    If you don't want it to fail in CRD then before opening any report Click the File, Log on Database option and connect. Now when refreshing reports it won't log the failed.
    In the SDK it does the same thing, it assumes the Server info is the same and does try to connect to verify the Server does exist. It only takes a few milli-seconds to do this
    To stop this from happening set the log on info first then it won't log the attempt to connect, it's checking to see if Trusted is allowed.
    TIMESTAMP    THREAD_ID    FILENAME    LINE_NUMBER    LOGGED_DATA    LEVEL
    2014-6-2 8:30:11.439    57320    .\QESession.cpp    444    Set Product View Locale: 4105    20
    2014-6-2 8:30:11.439    57320    .\QESession.cpp    478    Set Preferred View Locale: 4105    20
    2014-6-2 8:30:11.439    57320    .\QESession.cpp    500    Set Process Locale: 4105    20
    2014-6-2 8:30:11.440    57320    .\qecommon.cpp    117    This property is currently in a read-only state and cannot be modified. File Name: ".\QEProperty.cpp". Line: 217    1
    2014-6-2 8:30:11.967    57208    .\QESession.cpp    444    Set Product View Locale: 4105    20
    2014-6-2 8:30:11.967    57208    .\QESession.cpp    478    Set Preferred View Locale: 4105    20
    2014-6-2 8:30:11.967    57208    .\QESession.cpp    500    Set Process Locale: 4105    20
    2014-6-2 8:30:11.968    57208    .\qecommon.cpp    117    This property is currently in a read-only state and cannot be modified. File Name: ".\QEProperty.cpp". Line: 217    1
    2014-6-2 8:30:11.999    57208    .\QESession.cpp    444    Set Product View Locale: 1033    20
    2014-6-2 8:30:12.4    57320    .\qecommon.cpp    117    This value is write-only. File Name: ".\QEProperty.cpp". Line: 145    1
    2014-6-2 8:30:56.278    57208    .\odbcapi.cpp    301    Beginning COdbcapi::DriverConnect    20
    2014-6-2 8:30:56.342    57208    .\odbcapi.cpp    335    Ending COdbcapi::DriverConnect    20
    2014-6-2 8:30:56.342    57208    .\connect.cpp    2170    SQLDriverConnect succeeded: DSN = 192.168.13.172, User ID = sa, Password = ********    10
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 854    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 854    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 826    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 854    1
    2014-6-2 8:30:56.348    57208    .\qecommon.cpp    117     File Name: ".\QEQueryInfo.cpp". Line: 916    1
    2014-6-2 8:30:56.348    57208    .\QERowset.cpp    1184    Beginning CQERowset::readFirstRecord    20
    2014-6-2 8:30:56.348    57208    .\QERowset.cpp    2149    Beginning CQERowset::restart    20
    2014-6-2 8:30:56.348    57208    .\QERowset.cpp    2370    Beginning CQERowset::execute    20
    2014-6-2 8:30:56.353    57208    .\DbQueryBuilder.cpp    514    Query Targets: sqlncli10, ODBC3SQLServer    10
    2014-6-2 8:30:56.353    57208    .\DbQueryBuilder.cpp    525    Successfully built query:    SELECT "Orders"."Customer ID", "Orders"."Employee ID"   FROM   "xtreme"."dbo"."Orders" "Orders"    10
    2014-6-2 8:30:56.353    57208    .\odbcapi.cpp    875    Beginning COdbcapi::ExecDirect    20
    2014-6-2 8:30:56.354    57208    .\odbcapi.cpp    884    Finishing COdbcapi::ExecDirect    20
    2014-6-2 8:30:56.354    57208    .\rowset.cpp    220    SQLExecDirect succeeded:  SELECT "Orders"."Customer ID", "Orders"."Employee ID" FROM   "xtreme"."dbo"."Orders" "Orders"    10
    2014-6-2 8:30:56.354    57208    .\QERowset.cpp    2814    bindToField succeeded: Orders.Customer ID is using client buffer    10
    2014-6-2 8:30:56.354    57208    .\QERowset.cpp    2814    bindToField succeeded: Orders.Employee ID is using client buffer    10
    Notice it doesn't try to connect first if I set the log on info first using code.
    So nothing we can do to stop SQL server from logging this info. Check with the DBA, possibly they can "filter" out the application attempts to connect or change your work flow in the app.
    If you have a Preview Button to view the report then simply add your Database log on info prompt there if Connectioninfo.Trusted is not true:
    mainSecureDB = rpt.Database.Tables[tableIndex].LogOnInfo.ConnectionInfo.IntegratedSecurity;
    if mainSecureDB = false then prompt the user for log on info and set accordingly, if it is true the it should not fail when it connects.
    This is simply a matter of changing your App work flow...
    Thanks
    Don

  • SQL Server 2008 Express edition install issue.

    Ok, i've been looking around forums for a while now and have not found a post similar to this one or one that offers a solution; so here it goes.
    I'm trying to install management studio and in the web platform installer i keep getting this error:
    "You must install visual C++ 2008 SP1 before you can install SQL server 2008 Express with tools"
    I managed to get the install to "work", but it didn't actually install the studio app. So heres my questions:
    Firstly...why? i've installed this before and not had any issues at all, so why the sudden need for C++?
    Secondly, does anyone have any insight into my problem and how i cant actually install it?
    The only real difference between this install and previous installs is that i'm not running it on vista home premium 64-bit (previously 32-bit).
    I tried installing visual C++ express, but that didn't work.
    Thank you in advance and for giving up your time to read this.

    Hi,
    Based on the error message, your computer has Visual C++ 2008 before you install SQL Server 2008. However, Visual Studio 2008 does not support having Visual Studio 2008 without a service pack. The error message indicates you to install Service Pack 1 for Visual C++.  Please download Microsoft Visual Studio 2008 Service Pack 1 from the following link and install it:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en
    For more information, please refer to "Actions that are required before you install SQL Server 2008 on a computer that has Visual Studio 2008 or the prerelease version of SQL Server 2008 installed":
    http://support.microsoft.com/kb/956139
    If there are any more questions, please let me know.
    Thanks.
    ***Xiao Min Tan***Microsoft Online Community***

  • SQL Server 2008 Express - timeout issues, "This SqlTransaction has completed; it is no longer usable."

    Good morning all!   I work for a small business that uses a robust Accounting/Inventory database called Traverse (or Open Systems) and is run on a desktop computer using SQL Server 2008 Express.
    We don't have an IT department, but I have a bit of knowledge, so I've been the go-to person to handle any tech support issues in our tiny 5 person office.  I've been reading up on SQL Server 2008 Express, but am completely stumped on this issue.
    Our database would work consistently well for quite a while - sometimes getting disconnected from the server and requiring a restart of either the SQL Server itself or the Traverse License Server.
    About two weeks ago, I noticed that nobody had ever run Windows Update on the desktop that we have SQL Server on, so I spent the better part of a day updating everything, hoping it would help some of the little buggy issues we've been having.   Unfortunately,
    by applying the updates, I think it may have altered settings - or updated appropriately and our functionality is diminished.
    Basically, we have 3 users connecting into the server to use the database at any time.  Sometimes we might not be accessing information constantly, and it appears we're getting a timeout message in the SQL Server Log - stating the system was awoken
    by user activity after around 25-30 minutes.  When this happens, the system is painfully slow and locks up, giving SQL Server Connection errors, or the "This SqlTransaction has completed; it is no longer usable." message.   I noticed that
    there is a connection timeout of 15 seconds set for our SQL Server, but it's greyed out in the dialog box I saw it in, and am not sure if that's even a culprit.
    I'd just like to get this working again to where we can continue to use the database throughout the day without waiting for it to seemingly load all of the data after "waking up".  It's to a point that one of my employees is coming into my
    office every 5 minutes complaining that she can't do anything in Traverse.  I'm about to lose my mind!  
    If anyone has any clue what could be the issue, I'd be so grateful for help.  If you need any logs, messages, etc.. please let me know which and I will share them.  Thank you again!

    This is known as the Zombie Check exception. It is generally caused by trying to commit a transaction twice or trying to roll back a committed transaction. It can also be caused by a connection closing before the transaction is complete. In you case I would
    suspect the latter.
    See this article on setting the default timeout.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Installation issue : sql server 2008 r2 some services failed to installed on windows 7

    I have been facing this problem while installing sql server 2008 r2.. i tried so many times but same result .. it shows sql server installed with some errors
    database engine service : failed
    SQL Server Replication : failed
    Full-Text Search : failed
    Analysis Services : failed
    Reporting Services : failed
    And my Log file (or) summary file is (it is in C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log):
    Overall summary:
      Final result:                  User cancelled
      Exit code (Decimal):           -2068380094
      Exit facility code:            1207
      Exit error code:               1602
      Exit message:                  User has cancelled.
      Start time:                    2014-08-14 21:15:26
      End time:                      2014-08-14 21:23:58
      Requested action:              AddNode
    Machine Properties:
      Machine name:                  MANJU-PC
      Machine processor count:       4
      OS version:                    Windows Vista
      OS service pack:               
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x86
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            Database Engine Services                
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            SQL Server Replication                  
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            Full-Text Search                        
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSAS10.MSSQLSERVER             Analysis Services                       
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSRS10.MSSQLSERVER             Reporting Services                      
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008                                                         
    Management Tools - Basic                 1033                 Developer Edition   
    10.0.1600.22    No        
      Sql Server 2008                                                         
    Management Tools - Complete              1033                 Developer Edition    10.0.1600.22   
    No        
      Sql Server 2008                                                         
    Client Tools Connectivity                1033                 Developer Edition    10.0.1600.22   
    No        
      Sql Server 2008                                                         
    Client Tools Backwards Compatibility     1033                 Developer Edition    10.0.1600.22    No      
      Sql Server 2008                                                         
    Client Tools SDK                         1033                
    Developer Edition    10.0.1600.22    No        
      Sql Server 2008                                                         
    Integration Services                     1033                 Developer Edition   
    10.0.1600.22    No        
    Package properties:
      Description:                   SQL Server Database Services 2008
      SQLProductFamilyCode:          {628F8F38-600E-493D-9946-F4178F20A8A9}
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       0
      Installation location:         D:\Softwares\JAVA & .NET SW\SQL Server 2008\SQL Server 2008\x86\setup\
      Installation edition:          DEVELOPER
    User Input Settings:
      ACTION:                        AddNode
      AGTSVCACCOUNT:                 <empty>
      AGTSVCPASSWORD:                *****
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 *****
      CONFIGURATIONFILE:             
      FAILOVERCLUSTERGROUP:          
      FAILOVERCLUSTERNETWORKNAME:    <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 *****
      HELP:                          False
      INDICATEPROGRESS:              False
      INSTANCENAME:                  <empty>
      MEDIASOURCE:                   D:\Softwares\JAVA & .NET SW\SQL Server 2008\SQL Server 2008\
      PID:                           *****
      QUIET:                         False
      QUIETSIMPLE:                   False
      SQLSVCACCOUNT:                 <empty>
      SQLSVCPASSWORD:                *****
      X86:                           False
      Configuration file:            C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140814_210558\ConfigurationFile.ini
    Detailed results:
      Feature:                       Integration Services
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Client Tools Connectivity
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Management Tools - Complete
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Management Tools - Basic
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Client Tools SDK
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Business Intelligence Development Studio
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140814_210558\SystemConfigurationCheck_Report.htm
    Exception summary:
    The following is an exception stack listing the exceptions in outermost to innermost order
    Inner exceptions are being indented
    Exception type: Microsoft.SqlServer.Chainer.Infrastructure.CancelException
        Message:
            User has cancelled.
        Stack:
            at Microsoft.SqlServer.Configuration.UIExtension.Request.Wait()
            at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceProxy.SubmitAndWait(Request request)
            at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceProxy.NavigateToWaypoint(String moniker)
            at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceService.Waypoint(String moniker)
            at Microsoft.SqlServer.Configuration.UIExtension.WaypointAction.ExecuteAction(String actionId)
            at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
            at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
            at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)

      Requested action:              AddNode
      OS architecture:               x86
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            Database Engine Services                
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            SQL Server Replication                  
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            Full-Text Search                        
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSAS10.MSSQLSERVER             Analysis Services                       
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008      MSSQLSERVER          MSRS10.MSSQLSERVER             Reporting Services                      
    1033                                      10.0.1600.22   
    No        
      Sql Server 2008                                                         
    Management Tools - Basic                 1033                 Developer Edition   
    10.0.1600.22    No        
      Sql Server 2008                                                         
    Management Tools - Complete              1033                 Developer Edition    10.0.1600.22   
    No        
      Sql Server 2008                                                         
    Client Tools Connectivity                1033                 Developer Edition    10.0.1600.22   
    No        
      Sql Server 2008                                                         
    Client Tools Backwards Compatibility     1033                 Developer Edition    10.0.1600.22    No      
      Sql Server 2008                                                         
    Client Tools SDK                         1033                
    Developer Edition    10.0.1600.22    No        
      Sql Server 2008                                                         
    Integration Services                     1033                 Developer Edition   
    10.0.1600.22    No        
    Instead of installing SQL server instance you selected add node which is to be selected when SQL server installation is to be made on Node which is being added to cluster. Since your OS is not clustered I am sure you selected worng option.
    Please right click on setup file and select run as administrator. Now installation window which pops up on that on left hand side select
    installation and then on page that appears select 'New server standalone installation or add feature to existing installation'.
    You already have SQL server 2008 installed on your machine as per feature discovery report
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Issue while connecting to MS SQL Server 2008

    Hi everyone,
    I have not seen any thread that gives me a clue to my problem.
    I have OBIEE 10.1.3.4.0 on Windows.
    I have created an ODBC3.5 Datasource to a SQL Server 2008 and the test connection is successful.
    I have also imported the tables from the SQL Server 2008 into the Physical Layer of the OBIEE Administration tool. However after check-in, my problem begins trying to do an Update Row Count with the following Error message:
    NQODBCSQL_STATE: HY000nQSError: 10058 A general error has occurred.
    nQSError: 43093 An error occured while processingthe EXECUTE PHYSICAL statement.
    nQSError: 16023 The ODBC function has returned an error. The database may not be available, or the network may be down.
    Any suggestion or pointer will be greatly appreciated.

    Reading your post Issue in connecting to MS SQL Server 2008 I guess this thread here can be closed.
    Cheers,
    C.

Maybe you are looking for

  • Logic Express 9 - missing loops

    I've recently installed LE 9.1.8 on a new Mac mini (2.3 GHz core i7, OS X 10.9.3) and can't get Apple loops to work.  The loops are there in Library/Audio/Apple Loops just like they should be, and Garage Band loops appear in GB.  But in LE, nothing. 

  • Stream AND Sync???

    Hmmm... I can't stream and SEE my photos, but I can sync and still see my photos. But wait, 40gb is 460GB TOO SMALL for me, so if I sync, I am limited to what I can view as far as Movies, TVs, Podcasts, Music are concerned. The dilemma... HOW can I B

  • Spare materials sending out for repair

    All, Pls see the scenario : This is a project in Egypt . Spare materials , for some repairs business will send outside the factory to some vendors for repair . After repair same material will take back . 1. Whether this is subcontracting or comes in

  • 890fx board having touble with ethernet connection

    i own an 890 fx mother board and i am having trouble connecting to the internet through my ethernet cable. i have checked the cables to make sure they work and i have checked both of my ethernet ports neither of them work. the internet through the po

  • Jumping to a specified text passage or panel

    hi, in a swing-application, I�ve a tree with categories and themes in one JTabbedPane and a list of text passages in a JScrollPane in another JTabbedPane. now i want tu jump to the suitable textpassage by clicking a category/theme in the tree (like t