[SQL 2012] split string with forbidden characters

Hi all,
I have an issue with a query
I would like to find an equivalent of pivot function, but with a column that contains forbidden characters (like []&) and using delimiter (,), and when number of value on column could be different :
colA              colB                   colC
toto              titi                     [valeur].[membre].&[test1],[valeur].[membre].&[test2],[valeur].[membre].&[test3]
tata              tutu                   [valeur].[membre].&[test4],[valeur].[membre].&[test5]
fifi                fafa                    [valeur].[membre].&[test6]
fofo              fufu                    [valeur].[membre].&[test7],[valeur].[membre].&[test7],[valeur].[membre].&[test9]
what should give :
colA              colB                   colC
toto              titi                     [valeur].[membre].&[test1]
toto              titi                     [valeur].[membre].&[test2]
toto              titi                     [valeur].[membre].&[test3]
tata              tutu                   [valeur].[membre].&[test4]
tata              tutu                   [valeur].[membre].&[test5]
fifi                fafa                    [valeur].[membre].&[test6]
fofo              fufu                    [valeur].[membre].&[test7]
fofo              fufu                    [valeur].[membre].&[test8]
fofo              fufu                    [valeur].[membre].&[test9]
I try with splitstring function, xml path, but nothing works.
Thanks in advance.
Xavier

Xavier,
check if this helps:
simple usage of a split function which can then be cross applied with the table.
--CREATE FUNCTION dbo.fn_sample_Split
-- @RowData nvarchar(2000),
-- @SplitOn nvarchar(5)
--RETURNS @RtnValue table
-- Id int identity(1,1),
-- Data nvarchar(100)
--AS
--BEGIN
-- Declare @Cnt int
-- Set @Cnt = 1
-- While (Charindex(@SplitOn,@RowData)>0)
-- Begin
-- Insert Into @RtnValue (data)
-- Select
-- Data = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1)))
-- Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData))
-- Set @Cnt = @Cnt + 1
-- End
-- Insert Into @RtnValue (data)
-- Select Data = ltrim(rtrim(@RowData))
-- Return
--END
declare @tab table (cola varchar(20),colb varchar(20),colc varchar(100))
INSERT @tab SELECT 'toto','titi','[valeur].[membre].&[test1],[valeur].[membre].&[test2],[valeur].[membre].&[test3]'
INSERT @tab SELECT 'tata','tutu','[valeur].[membre].&[test4],[valeur].[membre].&[test5]'
INSERT @tab SELECT 'fifi','fafa','[valeur].[membre].&[test6]'
INSERT @tab SELECT 'fofo','fufu','[valeur].[membre].&[test7],[valeur].[membre].&[test7],[valeur].[membre].&[test9]'
select t.cola,t.colb,fn.data
From @tab t
cross apply dbo.fn_sample_split(t.colc,',') fn
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

Similar Messages

  • SQL 2012 install fails with 'Object reference not set to an instance of an object.'

    Hi, I'm trying to install SQL 2012 RTM Enterprise on a Windows 2008 R2 single node cluster.
    The installer starts goes through some checks and then fails with the message 'Object reference not set to an instance of an object.' It happens while the small 'wait while...' dialog box is
    showing, another window pops up briefly (I think the feature selection window - can't really tell as it doesn't draw before disappearing). Then the ‘Object reference not set’ message comes up.
    From the summary log file..
    Overall summary:
    Final result:                 
    Failed: see details below
    Exit code (Decimal):          
    -2147467261
    Exit facility code:           
    0
    Exit error code:              
    16387
    Exit message:                 
    Object reference not set to an instance of an object.
    Start time:                   
    2012-09-26 08:52:53
    End time:                     
    2012-09-26 08:54:08
    Requested action:             
    InstallFailoverCluster
    Exception help link:          
    http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.2100.60&EvtType=0x9AF1AE5E%400x44A889F9&EvtType=0x9AF1AE5E%400x44A889F9
    Exception summary:
    The following is an exception stack listing the exceptions in outermost to innermost order
    Inner exceptions are being indented
    Exception type: System.NullReferenceException
    Message:
    Object reference not set to an instance of an object.
    Data:
    HelpLink.EvtType = 0x9AF1AE5E@0x44A889F9
    DisableWatson = true
    Stack:
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.ShouldRuleRun(Rule rule)
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.IsRuleSkipped(Rule rule)
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRule(String ruleId, List`1 ruleProperties, XmlSchema ruleSchema, XmlElementParserFactory elementParser)
    at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRules(IEnumerable`1 ruleIds)
    at Microsoft.SqlServer.Configuration.InstallWizard.RunRuleProgressController.Initialize()
    I have rebooted, tried different media, tried uninstalling the setup files and rerunning but always get the same result.
    Any help would be gratefully accepted.
    Thanks,
    Bruce.

    Hi Alberto,
    Whenever I am trying to install SQL 2012 with SP1 clustering, I am getting below error. Can you please advise on this. 
    Additional information are
    Windows Servers Version and Edition - Windows 2012 Strandedition
    SQL Server Version and Edition - SQL 2012 with SP1
    All the machines are running on Hyper-V and Passed the cluster validation test successfully. there is no issue. The servers' (Nodes) names are;
    DomainServerName - ACONDomainGroup (1gb ram allocated)
    Node1 - AconNODE1W2K12STD (2.5gb ram allocated )
    Node2 - AconNODE2W2K12STD (1.5 ram allocated allocated)
    WindowsClusterName - AconWinCLTR
    Below is  Summary.txt Error
      Update Source:                 MU
    User Input Settings:
      ACTION:                        InstallFailoverCluster
      AGTDOMAINGROUP:                <empty>
      AGTSVCACCOUNT:                 <empty>
      AGTSVCPASSWORD:                <empty>
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      ENU:                           true
      ERRORREPORTING:                false
      FAILOVERCLUSTERDISKS:          <empty>
      FAILOVERCLUSTERGROUP:          
      FAILOVERCLUSTERIPADDRESSES:    <empty>
      FAILOVERCLUSTERNETWORKNAME:    <empty>
      FEATURES:                      
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    <empty>
      INSTANCENAME:                  <empty>
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 <empty>
      SQLSVCPASSWORD:                <empty>
      SQLSYSADMINACCOUNTS:           <empty>
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140420_052344\ConfigurationFile.ini
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140420_052344\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: System.NullReferenceException
        Message: 
            Object reference not set to an instance of an object.
        HResult : 0x80004003
        Data: 
          HelpLink.EvtType = 0x9AF1AE5E@0x44A889F9
          DisableWatson = true
        Stack: 
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.ShouldRuleRun(Rule rule)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.IsRuleSkipped(Rule rule)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRule(String ruleId, List`1 ruleProperties, XmlSchema ruleSchema, XmlElementParserFactory elementParser)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRules(IEnumerable`1 ruleIds)
            at Microsoft.SqlServer.Configuration.InstallWizard.RunRuleProgressController.Initialize()

  • Use a SQL 2012 database server with Reporting Services 2008?

    Hello, we have a SQL Server 2008 R2 Reporting Services Standard server with the reporting databases running on a SQL Server 2008 Standard database server. I would like to upgrade the database server to SQL Server 2012 before I upgrade the reporting server.
    Can I run SQL Server 2008 R2 Reporting Services against a 2008-version database running on a SQL 2012 database server? Thanks for your help.

     
    Hi Nicole
    Thanks for your posting.
    Are you asking if we can connect from SSRS 2008 r2 to a database sitting on SQL Server 2012.  Am I right?, please ignore me if I misunderstood your question. If that is your question
    then I think you will be able to using BIDS 2008, I have created A database on SQL Server 2012 and I use that database table inside  my SSRS 2008 R2 dataset. I can even think that you can use a database of compatibility level of 2012(110) as well
    Many thanks
    Syed Qazafi Anjum

  • SQL 2012 AlwaysOn AG with 3 Nodes

    First, what would be the best option of quorum/quorum witness for my SQL 2012 AlwaysOn group?
    I have setup the following:
    SQL 2012 AlwaysOn with 3 nodes.
    1 primary
    2 secondaries - one of them is read-only (for reporting and backup)
    Dynamics CRM and Reporting DBs are running on them.
    How can I achieve the highest avalability and DR with my SQL? Do I even need to create the quorum witness? What kind of Quorum (majority nod with network share?)
    Second, Is it good idea to run the backup on that read-only node?  If I setup the maintenance plan on this 3rd read-only mode with full and transactional backups, I should be able to restore without any issues?
    Third, I have another DB (SharePoint) that needs to be moved over to this SQL AlwaysOn AG but wondering if I can restore it in the secondary node to utilize the unused resources.  Is that possible or not recommended?

    Are the replicas on the same network subnet? If they are, then, you already have a quorum with node majority (odd number of votes.) Since you are already paying for an additional license to run read-only workloads on your readable secondary, you can take
    backups on this replica. Full database backups are in COPY_ONLY mode but you can take regular log backups which will truncate the log on the primary replica. In theory, you will be able to restore the backups taken from your readable secondary but you should
    test (hence, why I mentioned "in theory.") I wouldn't move my SharePoint databases to this SQL Server Availability Group mainly because of the different requirements between the two - SharePoint and Dynamics CRM. MAXDOP =1, disabling index maintenance and
    statistics updates on SharePoint databases, etc. are just a few of them. Besides, I doubt that the recovery objectives and service level agreements between those two applications are the same within your organization.
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • SQL 2012 R2 - SSRS with the Report Server Web Service URL, can't access

    Hello:
    I am installing Dynamics CRM 2013.  When I am on RS Configuration manager; I am running into the SSRS (SQL 2012 on Server 2012)SQL issue, can't access the
    http://servername/:80/ReportsServer or
    http://servername/:Reports web pages
    The database server has SSRS native mode installed, it is using a domain account for the service credentials.  This account also has permission to log on a service in the GPO
    Account is a domain admin and is a local administrator
    SQL server is 2012 R2 on Windows Server 2012.  User base is less than 60 people and they have SharePoint 13 on the same SQL server.  Server more than enough resources.
    Any assistance would be appreciated.
    Thanks..Dan

    Hi DCas1,
    According to your description, you could not access
    http://servername/:80/ReportsServer or http://servername/:Reports web pages from Reporting Services configuration manager, SSRS in configured in native mode and the account you used is a local administrator.
    In Reporting Services, URLs are used to access the Report Server Web service and Report Manager. Before we can use either application, we need to configure at least one URL each for the Web service and Report Manager. If we are using the Reporting Services
    Configuration tool to create or modify the URLs, we can accept the default values for a URL or specify custom values. When we create a report server URL, we must specify the following parts: Host name, port and Virtual directory. In order to improve the efficiency
    of troubleshooting, I need to ask several questions:
    Since the default URL is http://<computername>/reportserver, did you type the URLs manually? or the URLs configured in Reporting Services configuration manager are
    http://servername/:80/ReportServer and
    http://servername/:Reports?
    Could you provide detailed information of error log(default location: %programfiles%\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles)?
    For more information about Configuring a URL, please refer to the following documents:
    http://msdn.microsoft.com/en-us/library/ms159261(v=sql.110).aspx
    http://msdn.microsoft.com/en-us/library/bb630447(v=sql.110).aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Executing a SQL 2012 SSIS project with DTExec using Protection Level "EncryptAllWithPassword"

    I'm trying to execute a very basic SQL 2012 Project that only has 1 single package that contains a simply email task.
    The project will run fine from command line using basic syntax.
    dtexec /project  "F:\SSIS\Projects\project1\bin\Project 1 Configuration\project1.ispac" /package "Main.dtsx"
    Once I add the protection level of EncryptAllWithPassword to the project and the package things suddenly stop working. New command line syntax is.
    dtexec /project  "F:\SSIS\Projects\project1\bin\Project 1 Configuration\project1.ispac" /package "Main.dtsx" /P "Password"
    I get the following output.
    Microsoft (R) SQL Server Execute Package Utility
    Version 11.0.2100.60 for 64-bit
    Copyright (C) Microsoft Corporation. All rights reserved.
    Started:  5:14:49 PM
    Could not load project "F:\SSIS\Projects\project1\bin\Project 1 Configuration\project1.ispac" because of error 0x80131500.
    Description: The encrypted data in project manifest failed to load. The project
    manifest is corrupted or if the project is password protected, the specified password is incorrect.
    Source: Microsoft.SqlServer.ManagedDTS
    Started:  5:14:49 PM
    Finished: 5:14:49 PM
    Elapsed:  0.078 seconds
    I'm confident my passwords are entered correctly in the two spots. Is there something I'm missing in my command line to use protection levels correctly. I have also built the project and deployed to SSISDB.
    Thank you

    Add the PassWord attribute as  :
    dtexec /project  "F:\SSIS\Projects\project1\bin\Project
    1 Configuration\project1.ispac" /package "Main.dtsx" /P "YourPassWord"
    For more info :
    http://technet.microsoft.com/en-us/library/ms138023(v=sql.105).aspx

  • Automate SQL 2012 policy management with powershell

    Hello.
    I´m trying to automate policy management via Powershell and I´m running into some problems. What I want to do is register a SQL 2012 server to a group in a CMS server and then import a pre defined policy into that server. The first part where I register
    the client server is no problem but I cant figure out how to import the policy.
    Has anyone else run into this problem?
    Regards.
    /Niklas

    Of course!
    First thing you need to do if it is not already done is to register the CMS server. 
    Set-Location "SQLSERVER:\SQLRegistration\Central Management Server Group"
    New-Item -Name $CMSServer -ItemType registration -Value "server=$CMSServer;integrated security=true"
    Second you want to register the client server into a CMS server group.
    Set-Location "SQLSERVER:\SQLRegistration\Central Management Server Group\$CMSServer\SQL Server Group"
    New-Item -Name $serverToRegister.Replace("\","`$") -ItemType registration -Value "server=$serverToRegister;integrated security=true"
    When this is done I want to create my policy and schedule on all my target machines. I defined my policies directly in my powershell script so if
    you want to import the exported policies you probably need to extract information from the XML files.
    This example creates a schedule called hisec that executes daily at 1 am.
    $createSchedulecommand = @"
    DECLARE @start_date varchar(8) = convert(varchar(8), DATEADD(day,-1,GETDATE()), 112)
    EXEC msdb.dbo.sp_add_schedule  @schedule_name = N'hisec',
    @enabled = 1, @freq_type = 4, @freq_interval = 1, @active_start_date = @start_date,
    @active_start_time = 010000; "@ 
    Invoke-Sqlcmd -Query $createSchedulecommand -ServerInstance $targetInstanceName -Database "msdb" 
    Next thing is to create my policy. This example checks if XPCmdShell is enabled.
    $createPolicyCommand = @"
    DECLARE @object_SET_id int
    EXEC msdb.dbo.sp_syspolicy_add_object_SET
    @object_SET_name=N'hisec_ObjectSET',
    @facet=N'IServerSecurityFacet',
    @object_SET_id=@object_SET_id OUTPUT;
    DECLARE @target_SET_id int
    EXEC msdb.dbo.sp_syspolicy_add_target_SET
    @object_SET_name=N'hisec_ObjectSET',
    @type_skeleton=N'Server',
    @type=N'SERVER',
    @enabled=True,
    @target_SET_id=@target_SET_id OUTPUT;
    GO
    DECLARE @uid varchar(40)
    SET @uid = (select schedule_uid from msdb..sysschedules where name = 'hisec')
    DECLARE @policy_id int
    EXEC msdb.dbo.sp_syspolicy_add_policy
    @name=N'hisec',
    @condition_name=N'ServerSecurity',
    @policy_category=N'',
    @description=N'',
    @help_text=N'',
    @help_link=N'',
    @schedule_uid=@uid,
    @EXECution_mode=4,
    @is_enabled=True,
    @policy_id=@policy_id OUTPUT,
    @root_condition_name=N'',
    @object_SET=N'hisec_ObjectSET';
    GO
    Invoke-Sqlcmd -Query $createPolicyCommand -ServerInstance $targetInstanceName
    -Database "msdb"
    Hope this can help you somehow.

  • Splitting a string with special characters

    Alrights, lets say I had a string, which will be defined as "1 + 2 + x". I want to split the string into a string array with " + " as my delimeter. How would I do so?
    String blah = "1 + 2 + x";
    String blahTwo[] = blah.split(" + ");
    System.out.println(blahTwo[0]);this would out put "1 + 2 + x" instead of "1".

    The compiler gives an error if the delimeter is called as "+" for the
    split method.Javac doesn't care but the RE compiler does. If you want to split a
    string around the '+' chacacter use "\\+", i.e. one backslash to keep
    Javac silent and the other one to keep the RE from whining.
    kind regards,
    Jos

  • SQL 2012 install fails with 'Object reference not set to an instance of an object" On windows 8.1 Hyper-V

    Hi All,  
    Could you please help me here? On my Laptop which is running on windows 8.1 Operation system, I enabled the Hyper-V client feature and setup the Windows Fail-over Clustering using Windows 2012 Standard Edition. So, there are three machines which are running
    on the Hyper-V. Below are the machine details;
    1st machine - Working as Domain controller and its name is "ACONDomainGroup" and allocated to
    1GB RAM to use.
    2nd machine - Working as Node1 and its name is "AconNODE1W2K12STD"
    and allocated to 2.5GB RAM to use.
    3rd machine - Working as Node1 and its name is "AconNODE1W2K12STD"
    and allocated to 1.5GB RAM to use.
    and the windows virtual cluster name is "AconWinCLTR". While I am doing the SQL Cluster Installation, I am getting below mentioned error. all systems have 4.5 .net installed. May you please guide me where and what i am missing to complete sql clustering.....
      Update Source:                 MU
    User Input Settings:
      ACTION:                        InstallFailoverCluster
      AGTDOMAINGROUP:                <empty>
      AGTSVCACCOUNT:                 <empty>
      AGTSVCPASSWORD:                <empty>
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      ENU:                           true
      ERRORREPORTING:                false
      FAILOVERCLUSTERDISKS:          <empty>
      FAILOVERCLUSTERGROUP:          
      FAILOVERCLUSTERIPADDRESSES:    <empty>
      FAILOVERCLUSTERNETWORKNAME:    <empty>
      FEATURES:                      
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL
    Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft
    SQL Server\
      INSTANCEID:                    <empty>
      INSTANCENAME:                  <empty>
      ISSVCACCOUNT:                  NT AUTHORITY\Network
    Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 <empty>
      SQLSVCPASSWORD:                <empty>
      SQLSYSADMINACCOUNTS:           <empty>
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup
    Bootstrap\Log\20140420_052344\ConfigurationFile.ini
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup
    Bootstrap\Log\20140420_052344\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: System.NullReferenceException
        Message: 
            Object reference not set to an instance of an object.
        HResult : 0x80004003
        Data: 
          HelpLink.EvtType = 0x9AF1AE5E@0x44A889F9
          DisableWatson = true
        Stack: 
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.ShouldRuleRun(Rule
    rule)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.IsRuleSkipped(Rule
    rule)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRule(String
    ruleId, List`1 ruleProperties, XmlSchema ruleSchema, XmlElementParserFactory elementParser)
            at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.LoadRules(IEnumerable`1
    ruleIds)
            at Microsoft.SqlServer.Configuration.InstallWizard.RunRuleProgressController.Initialize()

    Dharmendra, the log details are incomplete are not sufficient enough for I guess anyone to help. Besides, from the details above, I can see that the Failover Cluster Disks are not selected:-
    FAILOVERCLUSTERDISKS:          <empty>
      FAILOVERCLUSTERGROUP:          
      FAILOVERCLUSTERIPADDRESSES:    <empty>
      FAILOVERCLUSTERNETWORKNAME:    <empty>
    Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana

  • Double to String with 2 characters decimals

    How to a get a String from a Double with only 2 characters after the dot/comma ?
    chmurb

    double aDbl = XXXXX;
    DecimalFormat fmt = new DecimalFormat( "0.00;-0.00"
    String stringVal = fmt.format( aDbl );^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    a better answer than mine :)

  • SQL 2012 Always on with WFC

    Hi Expert,
    I have following infrastructure at par. where i have 3 server in WFC(Windows Failover cluster) Win2012 and out of 3 servers two servers are active/passive cluster with SQL Instance hosted on it and i have created AG group for 3 users database and setup Sync
    Replica on 3rd server within my WFC cluster.
    I have SQL VIP(Virtual Server Name) for cluster and also i have AG Listener resources also on the cluster. Now this cluster is attached to SAN single.
    3rd server where we kept sync replica its storage is not coming from SAN it has local storage attached to it.
    Now we know we have single point failure if SAN goes down My SQL Server 2node active passive cluster instance will also come down.
    Now in this kind of event will my AG Listener can be online on WFC even if SAN is down so that it can redirect connection to the 3rd server where it has sync replica copy.
    Also if in case Listener will not be able to be online in event of SAN failure what would alternative path we consider here
    your valuable suggestion and time are most welcome.
    Thank you very much..
    Regards, Nirav Joshi

    This will depend on your quorum configuration. If you started building your SQL Server failover clustered instance before adding your 3rd node, you may have a node a disk majority quorum. When the SAN fails, you take down the disk witness and the SQL Server
    instance but since you still have 2 additional voting nodes, you still have a quorum so the Availability Group stays online. Unfortunately, because you have a combination of SQL Server Failover clustered instance and stand alone instance for your Availability
    Group, you lose the ability to have automatic failover. So, even if there is a majority of votes in your cluster, you still have to manually failover the Availability Group and the listener name on the standalone instance running on the 3rd node.
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • Splitting string with changing length length

    Hi,
    I am trying to read the position of an automatic stage in X,Y,Z axes. The stage returns a string of the three axes, and I would like to get the position of each axis separately. The thing is that the length of the string changes as the stage moves, so I cannot simply split at a predetermined offset.
    Any help will be appreciated,
    Gaby 
    Solved!
    Go to Solution.

    There is an easier way.  Use the Spreadsheet String to Array primitive to do it in one node.  No loops required.  This primitive (and its inverse) is useful any time you have a token separated string to parse in a regular fashion.
    Message Edited by DFGray on 11-25-2008 07:41 AM
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    SpaceSeparatedNumbersToArray.png ‏1 KB
    SpaceSeparatedNumbersToArray.vi ‏9 KB

  • Initialising strings with unicode characters

    This works
    System.out.println("Hello World");
    but this will not compile
    System.out.println("&#20320;&#22909;");
    How do I get unicode characters into my Java source?
    I am running Windows XP and editing my files using notepad.
    If I save my source as ASCII it compiles, but I do not get the foreign characters.
    If I save my file as utf-8 or unicode the source will not compile.

    I have got it!
    On Windows XP using notepad the java source file can be "saved as" Unicode.
    The source can then be compiled using;
    javac HelloWorld.java -encoding unicode
    The code compiles and executes.
    It is even possible to give variables names that are Chinese characters, which is really what you would expect to be able to do.

  • How to set a variable to a string with special characters?

    I want to set a variable to
    <cfset inputstring = "<img src="../../../server/win/form/stamp/string_1" />"/>
    but i keep getting error:
    Invalid CFML construct found on line 184 at column 32.
    ColdFusion was looking at the following text:
    I have try it different ways , what i'm i doing wrong?

    You have to either escape the inner quotes or mix single and double quotes.  Try:
    <cfset inputstring = "<img src=""../../../server/win/form/stamp/string_1"" />"/>
    or
    <cfset inputstring = '<img src="../../../server/win/form/stamp/string_1" />'/>
    Oh, and the trailing forward slashes aren't necessary in the <cfset> tag.
    -Carl V.

  • SQL 2012 Reporting Services hang

    Hello,
    we are using SQL 2012 Reporting Services with Dynamics CRM Reports. Since a few wekkes every other day it looks like my Reproitng services do fail. CRM Reports do not work and  If I try to browse https://sql2012.mobilex.intra/Reports/Pages/Folder.aspx
    I get the login prompt but than it only shows "Could not find file 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\vsuzsax3.dll'." while the dll is always a different one. It looks like whole path C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp
    is not available at that moment. If I than restart my SQL Reporting Services service everything starts working again for one or two days...
    Any idea where I can start debugging this issue?
    kind regards,
    Dieter Tontsch, mobileX AG

    Hello Vicky, thanks for your reply,
    see attached a log-file snippet while it just occurs again. It might be a file permission issue. I will do the changes suggested by you once I am back to the office. It is true that yet the Reporting Service runs under Network Service account. Some questions:
    - you suggested to change SQL Service Logon, do you realy mean SQL service itself, or just Reporting services? Should I change all SQL services logon credentials to the same account?
    - second you said "Provide full access to the "\Documents and Settings\NetworkService\Local Settings\Temp" for any account that needs to access the report server.". I am not sure which path is meant with "\Documents and Settings\NetworkService\Local
    Settings\Temp" since there is no Documents and settings, this is users now. But I guess this is not the place you mean since there is no profile for NetworkService in there.
    But one more thin, this temporary file the server complains about like in this case 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\uiy82bjf.dll' is not existing at this point. I don't know if this is relevant, but it looks to me like it looks
    for a temporary file which is already gone by some reason. So, it is not the problem that the file cannot be accessed, but it is not there or not there any more, I don't know. Fact is that immediately after a Reporting Service restart, with no changes made,
    the Services work again for a while. 
    Dieter
    ui!ReportManager_0-4!115c!04/30/2015-08:00:43:: e ERROR: System.IO.FileNotFoundException: Could not find file 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\uiy82bjf.dll'.
    File name: 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\uiy82bjf.dll'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
       at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
       at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
       at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
       at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
       at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
       at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
       at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
       at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
       at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
       at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
       at Microsoft.SqlServer.ReportingServices2010.ReportingService2010..ctor()
       at Microsoft.SqlServer.ReportingServices2010.RSConnection2010..ctor(String reportServerUrl, Boolean useSharePointProxy)
       at Microsoft.ReportingServices.UI.Global.get_ReportServer()
       at Microsoft.ReportingServices.UI.Global.SecureAllAPI()
       at Microsoft.ReportingServices.UI.ReportingPage.EnsureHttpsLevel()
       at Microsoft.ReportingServices.UI.ReportingPage.ReportingPage_Init(Object sender, EventArgs args)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Web.UI.Control.OnInit(EventArgs e)
       at System.Web.UI.Page.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ui!ReportManager_0-4!115c!04/30/2015-08:00:43:: e ERROR: System.IO.FileNotFoundException: Could not find file 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\_dww3cf5.dll'.
    File name: 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\_dww3cf5.dll'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
       at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
       at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
       at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
       at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
       at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
       at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
       at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
       at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
       at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
       at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
       at Microsoft.SqlServer.ReportingServices2010.ReportingService2010..ctor()
       at Microsoft.SqlServer.ReportingServices2010.RSConnection2010..ctor(String reportServerUrl, Boolean useSharePointProxy)
       at Microsoft.ReportingServices.UI.Global.get_ReportServer()
       at Microsoft.ReportingServices.UI.Global.SecureAllAPI()
       at Microsoft.ReportingServices.UI.GlobalLinks.Control_Init(Object sender, EventArgs args)
    ui!ReportManager_0-4!115c!04/30/2015-08:00:43:: e ERROR: HTTP status code --> 500
    -------Details--------
    System.IO.FileNotFoundException: Could not find file 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\uiy82bjf.dll'.
    File name: 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\uiy82bjf.dll'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
       at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
       at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
       at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
       at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
       at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
       at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
       at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
       at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
       at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
       at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
       at Microsoft.SqlServer.ReportingServices2010.ReportingService2010..ctor()
       at Microsoft.SqlServer.ReportingServices2010.RSConnection2010..ctor(String reportServerUrl, Boolean useSharePointProxy)
       at Microsoft.ReportingServices.UI.Global.get_ReportServer()
       at Microsoft.ReportingServices.UI.Global.SecureAllAPI()
       at Microsoft.ReportingServices.UI.ReportingPage.EnsureHttpsLevel()
       at Microsoft.ReportingServices.UI.ReportingPage.ReportingPage_Init(Object sender, EventArgs args)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Web.UI.Control.OnInit(EventArgs e)
       at System.Web.UI.Page.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ui!ReportManager_0-4!115c!04/30/2015-08:00:44:: e ERROR: System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Thread.AbortInternal()
       at System.Threading.Thread.Abort(Object stateInfo)
       at System.Web.HttpResponse.End()
       at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)

Maybe you are looking for