SQL 2012 :: Escape For Quote In Install Configuration File
Aug 19, 2014
I've been installing SQL with a unattended install for awhile, and have the following settings in my install_configuration.ini file. I happened to come across a password with a quote in it today, what is the proper way to escape that quote? I've tried the standard backslash method, and found that to not work.
; SQL Server Agent Service Account
AGTSVCACCOUNT="DomainUserName"
AGTSVCPASSWORD="PasswordWith"AQuoteInIt"
; SQL Server Service Account
SQLSVCACCOUNT="DomainUserName"
SQLSVCPASSWORD="PasswordWith"AQuoteInIt"
; SSRS Service Account
RSSVCACCOUNT="DomainUserName"
RSSVCPASSWORD="PasswordWith"AQuoteInIt"
The cool thing is the install apparently tries a few time to authenticate before giving up, because it ends up locking out the account each time.
I am trying to find all instances of a string that contain the letters FSC. While I am able to find most of them, I am unable to find the ones wrapped in double quotes.
Query example:
Select * from myTable Where item like '%FSC%'
This works great with the exception of when FSC is surrounded by double quotes.
We are using Sql server 2012. One of our production database has hight no of vlfs. We are planning to shrink the logfile to reduce the no of VLFs but the database is configured for logshipping.
What is the effect of logshipping when you shrink the logfile?
I'm having trouble importing a CSV file into SQL using SSIS. The trouble seems to stem from truncation and from quote encapsulated fields.
Firstly it's worth noting that some of the data within the quotes contains the separator. E.g.
12,"some text, and a comma",34
Thankfully SSIS seems to cope with that by specifying " as the Text Qualifier. My next problem was that the SSIS Import and Export Wizard gave an error: "failed because truncation occurred". But I fixed this by specifying the OutputColumnWidth for the NCHAR and NVARCHAR type columns to be the width from the table definition.
But now I have another problem with the length of fields. Consider the following where the center column is NCHAR (22)
101,"some text, and a comma",303 102,"some ""quoted text"" bye",303
The first row has the correct width (once the encapsulating quotes are stripped out), but the second row does not, because it seems that when I exported the table the export wizard escaped the quote characters within encapsulated strings using quote characters. So I am back to getting the "truncation occurred" error. How can I get around this within SSIS?
We have an issue with importing a CSV file into SQL where using a double quote " text qualifier is failing. The data is correct but it fails on a particular line, complaining about the qualifier even though the qualifier is in place and previous lines have imported fine.
I have scoured the Microsoft forums and the internet to find out how I can generate the output of a CSV report that has double quotes around each value and is comma separated as follows:
"Abcd","123456","Efghi","789012","JKLMN"
If I try to concatenate double quotes around the values in the stored procedure or in the RDL, two double quotes appear around each value as follows.Â
I understand that this is because the default qualifier is double quote.  What I see is that every time a double quote appears in a value (along with commas and line breaks), the qualifier will activate. Is there any way to turn this off for double quotes?Â
If I try to enter: <Qualifier>false</Qualifier>, the word "false" appears as the qualifier instead.
The only way I have found that produces a result similar to what I need ("Abcd","123456","Efghi","789012","JKLMN") is if I add a line break - chr(10) in the RDL in each field. However, this won't work for me because I can't have line breaks in each field in the output.Â
Note that in SSRS 2005, I was able to produce the report output as IÂ state above by setting the field delimiter and qualifier as follows:
This essentially turned the field delimiter and qualifier off, as the values entered would never appear in the data. I then could add double quotes and commas in the RDL.  This used to work in the old version but does not anymore.
I'm exporting from a View using the bcp utility. I have the -t switch set for comma delimited. My first 3 columns are integers, but the rest of my columns need to be wrapped in double quotes because some of the string data contains commas. I can't find a simple way to do this, although I keep coming across notes about format files without any good examples.
I'm getting an error when the SQL install program checks the system - "The SQL Server System Configuration Checker cannot be executed due to WMI configuration on the machine DI-ERP2 Error:2148007941 (0x80080005).
I've tried a bunch of stuff as suggested by some of the other threads, but nothing is working so far...
I'm the following encountering WMI error message when invoking SQL2005 setup.
The SQL Server System Configuration Checker cannot be executed due to WMI configuration on the machine CAPRICORN Error:2147942405 (0x80070005).
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=setup.rll&EvtID=70342
I'ver found other postings related to WMI errors and tried the WMI fix batch, but to no avail. I noted the error code I have is 2147942405 which is different from other postings. And from examining setup log generated, this seems to be security related, but cannot find much help combing thru msdn/google, etc
SCCOpenPerformer Added machine: CAPRICORN RegisterAddCheckArticleCallbackFunction registered callback function
Calling add article callback function for article: WMIServiceWin32OSWorking Callback function returned TRUE Adding Article... Article Id: WMIServiceWin32OSWorking Article type: 4, ARTICLE_WMI_TYPE_VALUES Number of value: 2 Value: 1 Type: ARTICLE_WMI_TYPE_PROPERTY Namespace: cimv2 Class name: Win32_OperatingSystem Property name: OSLanguage Property type: 2 Value: 2 Type: ARTICLE_WMI_TYPE_PROPERTY Namespace: cimv2 Class name: Win32_OperatingSystem Property name: SystemDirectory Property type: 2
Calling add article callback function for article: WMIServiceWin32CompSystemWorking Callback function returned TRUE Adding Article... Article Id: WMIServiceWin32CompSystemWorking Article type: 4, ARTICLE_WMI_TYPE_VALUES Number of value: 1 Value: 1 Type: ARTICLE_WMI_TYPE_PROPERTY Namespace: cimv2 Class name: Win32_ComputerSystem Property name: NumberOfProcessors Property type: 2
Calling add article callback function for article: WMIServiceWin32ProcessorWorking Callback function returned TRUE Adding Article... Article Id: WMIServiceWin32ProcessorWorking Article type: 4, ARTICLE_WMI_TYPE_VALUES Number of value: 1 Value: 1 Type: ARTICLE_WMI_TYPE_PROPERTY Namespace: cimv2 Class name: Win32_Processor Property name: CpuStatus Property type: 2
Calling add article callback function for article: WMIServiceReadRegWorking Callback function returned TRUE Adding Article... Article Id: WMIServiceReadRegWorking Article type: 4, ARTICLE_WMI_TYPE_VALUES Number of value: 1 Value: 1 Type: ARTICLE_WMI_TYPE_REGISTRY DefKey: 0x80000002 Subkey name: SOFTWAREMicrosoftWindowsCurrentVersion Value name: ProgramFilesDir Registry type: 4
Calling add article callback function for article: WMIServiceWin32DirectoryWorking Callback function returned TRUE Adding Article... Article Id: WMIServiceWin32DirectoryWorking Article type: 3, ARTICLE_WMI_TYPE_CLASS Namespace: cimv2 WQL Query: Select * from Win32_Directory where name='C:\'
Calling add article callback function for article: WMIServiceCIMDataWorking Callback function returned TRUE Adding Article... Article Id: WMIServiceCIMDataWorking Article type: 3, ARTICLE_WMI_TYPE_CLASS Namespace: cimv2 WQL Query: Select * from CIM_DataFile where name='C:\'
Calling add article callback function for article: XMLDomDocument Callback function returned TRUE Adding Article... Article Id: XMLDomDocument Article type: 1, ARTICLE_TYPE_GENERIC_FUNCTION RegisterCallbackFunction registered callback function Callback filter = 0x6
Performing check on local machine CAPRICORN Connecting to CAPRICORN machine ConnectServer returned 0 (0x0) ConnectServer returned 0 (0x0) Openning namespace \rootcimv2 GetNamespace \rootcimv2 returned 0 (0x0) Creating class instance Win32_ComputerSystem CreateInstanceEnum Win32_ComputerSystem returned 0 (0x0) Enumerating the first class of Win32_ComputerSystem EnumClass of Win32_ComputerSystem returned 2147942405 (0x80070005) Creating class instance Win32_OperatingSystem CreateInstanceEnum Win32_OperatingSystem returned 0 (0x0) Enumerating the first class of Win32_OperatingSystem EnumClass of Win32_OperatingSystem returned 2147942405 (0x80070005) Creating class instance Win32_OperatingSystem CreateInstanceEnum Win32_OperatingSystem returned 0 (0x0) Enumerating the first class of Win32_OperatingSystem EnumClass of Win32_OperatingSystem returned 2147942405 (0x80070005) Creating class instance Win32_Processor CreateInstanceEnum Win32_Processor returned 0 (0x0) Enumerating the first class of Win32_Processor EnumClass of Win32_Processor returned 2147942405 (0x80070005) Openning namespace \rootdefault GetNamespace \rootdefault returned 0 (0x0) Getting method EnumValues in StdRegProv class GetMethod returned 0 (0x0) Executing method EnumValues in StdRegProv class ExecMethod returned 2147942405 (0x80070005)
Processing article WMIServiceWin32OSWorking Scc Error: 50026 (0xc36a) Error code: 2147942405 (0x80070005) Calling callback function for reason: 0x2 Callback function returned TRUE
Processing article WMIServiceWin32CompSystemWorking Scc Error: 50026 (0xc36a) Error code: 2147942405 (0x80070005) Calling callback function for reason: 0x2 Callback function returned TRUE
Processing article WMIServiceWin32ProcessorWorking Scc Error: 50026 (0xc36a) Error code: 2147942405 (0x80070005) Calling callback function for reason: 0x2 Callback function returned TRUE
Processing article WMIServiceReadRegWorking Scc Error: 50024 (0xc368) Error code: 2147942405 (0x80070005) Calling callback function for reason: 0x2 Callback function returned TRUE
Processing article WMIServiceWin32DirectoryWorking Openning namespace \rootcimv2 GetNamespace \rootcimv2 returned 0 (0x0) Scc Error: 50022 (0xc366) Error code: 70347 (0x112cb) Calling callback function for reason: 0x2 Callback function returned TRUE
Processing article WMIServiceCIMDataWorking Openning namespace \rootcimv2 GetNamespace \rootcimv2 returned 0 (0x0) Scc Error: 50022 (0xc366) Error code: 70347 (0x112cb) Calling callback function for reason: 0x2 Callback function returned TRUE
Processing article XMLDomDocument Scc Error: 0 (0x0) Error code: 0 (0x0) Calling callback function for reason: 0x4 Callback function returned TRUE SccPerformer closed.
I have tried several times to install SQL Server 2005 Developer Edition (most recently from MSDN Disk 3097.1) I have tried to complete an uninstall before each attempt.
I do get the warning about Minimum Hardware Requirement, but can find nothing in the detail requirements to exclude my PCs configuration.
I have installed: IIS and .NET Framework 2.0
I have also used ..aspnet_regiis -r to register ASP.NET
I am, successfully, running Visual Studio 2005.
Why does the installation process stop there and what can I do next?
We have an application with replicated environment setup on sql server 2012 . Users will have a replica on their machines and they will replicate to the master database. It has 3 subscriptions subscribed to the publications on the master db.
1) We set up a replica(which uses sql server 2012) on a machine with no sql server on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 33gigs and ldf has grown to 41 gigs. I went to sql server management studion . Right click and checked the properties of the local database. over all size is around 84 gb with little empty free space available.
2) We set up a replica(which uses sql server 2012) on a machine with sql server 2008 on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.
3) We set up a replica(which uses sql server 2012) on a machine with sql server 2012 on it. We have dropped the local database and recreated the local db and did the initial synchronization using replmerge tool. The mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.
Why it is allocating the space differently? This is effecting our initial replica set up times.
We have SCCM 2012Â primary site and Remote SQL 2012 server. Due to hardening and password reset we are facing reporting issue.
while we Open the SRS report in SQL server and try to edit the Report (Report Builder) we are getting following error due to which we are unable to configure Reporting Service point in the SCCM 2012 server. We created the New Reporting server database still we are getting the below error.
I cannot get the log file path read from the configuration.
If the path in the Connection Manager is invalid, package throws an error "SSIS logging provider has failed to open the log" instead of reading it from the config.file. What am I doing wrong?
Here is the portion of the config file. Everthing else is read from the config file correctly.
We changed the IP addresses for several SQL Servers and we're a little confused by what we see in Configuration Manager. The TCP/IP properties "IP Addresses" tab still shows the old IP address, even after a restart. On "Protocol" tab, Listen All is set to "Yes".
We've found one source that says this setting causes the listening on an individual IP to be ignored.
I installed SQL Server 2012 on a windows server 2012 that had an existing 2008 R2 SQL installation.
After the install I can see only the 32 bit network configuration options in SQL Server Configuration Manager for both versions. Before the install they were available in the 2008 R2 version of the tool.
I have installed SQL Server 2012 on Node1 successfully and trying add node on Node2 and its failing with below message. I attached the screen shot.
Here we are not doing multi-subnet failover clustering. Why we are getting extra and asking for IP and what IP should we enter there?Add Node option should automatically detect the IP we configured on Node1.
[Error Message] To support SQL Server multi-subnet failover clustering, you must select at least one valid IP address for every subnet in the cluster.
[Details] Microsoft.SqlServer.Configuration.Cluster.ClusterIPAddressPublicValidationException: To support SQL Server multi-subnet failover clustering, you must select at least one valid IP address for every subnet in the cluster.
I have done a fresh sql 2012 standalone installation but the instance services are not getting reflected in SQL server configuration manager
Although I can find the instance details in services.msc and also in n/w configuration of configuration manager but in the sql services tab of config manager , it is not showing .
The hide instance is unchecked when I check the protocol properties.
I'm trying to run the SQL Server 2012 Best Practices Analyzer. After learning that I first had to install the Microsoft Baseline Configuration Analyzer, I did that.
When I tried to run the Microsoft Baseline Configuration Analyzer/Best Practices Analyzer remotely, though, I got an extremely verbose error message and want to confirm if I really need to do all of the steps involved on each target server that I want to analyze.
Here is what I tried after launching the Microsoft Baseline Configuration Analyzer application (I'm using 'MYSERV' as the target server name):
1. Clicked on "Connect to another computer" 2. Clicked "Another computer:" entered: MYSERV 3. Checked the "Connect as another user:" box 4. Clicked "Set User..." added by Windows credentials. 5. Checked the Use CredSSP box 6. Clicked OK.
After a second or two, the error below came back. Is that what I have to do on each remote computer to run the analyzers?
Microsoft Baseline Configuration Analyzer
Connecting to the remote server failed with the following error message : The WinRM client cannot process this request. CredSSP authentication is currently disabled in the client configuration. Change the client configuration and try the request again. CredSSP authentication must also be enabled in the server configuration. Also, Group Policy must be edited to allow credential delegation to the target computer. Use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials. Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the following; WSMAN/myserver.domain.com or WSMAN/*.domain.com For more information
I nabbed a couple from some recent installs I did, and, assuming I can get my SAN guy to always give drives the same letter assignment, it looks fairly useful.
There's still a bunch of additional stuff to do, like turn on instant file initialization, size/create additional tempdb files, and set up alerts and database mail, etc.
Can the configuration file be expanded to handle any of that? Do you use something else to template/automate your SQL installs? The more I do it, the less I want to keep doing it.
I have a simple SSIS package (stored in the file system) that gets a file path from a configuration file. The configuration type is an indirect XML configuration file that uses an environment variable to store the location of the configuration file.
When I run the package using dtexecui, or just dtexec from a command line, the package successfully picks up the file path from the configuration file (for verification I am writing out the variable containing the path to the log file). However when I run the package from a SQL Agent job it appears that the configuration file is not being used (the path is set to the same dummy path that I used during development). I have tried running the job as both a CmdExec and an Integration Services job and both fail on the same thing (invalid file path).
Both the SQL Server Agent service and the Integration Services service use a domain account as their start up account. This domain account has been included in the local administrators group on the server (in case it was having trouble accessing the environment variables).
What is the problem here €“ surely changing the way in which the package runs should not affect the configuration file settings! Any help would be appreciated€¦
We are just finishing our migration to SQL 2012. In our old environment, the instance which held our SharePoint databases also served other applications. We did not experience any performance related issues in the past due to this.
SharePoint basically requires MAXDOP to be 1, which is correct on the old server. Since this configuration may not be ideal for other applications that may be put within our environment, we our entertaining the idea of isolating SharePoint into its own instance, probably on the same box.
My manager wants me to come up with performance trace data to better prove that we need to go this route since we apparently have had issues in the past by blindly following Microsoft's best practices.
1.MAXDOP configuration - I understand this may be a 2 pronged approach that would require looking at various execution plans and CPU related counters in Perfmon. SharePoint likely requires a maxdop of 1 due to the nature of the application (lots of concurrent processes). What is the best way to show this need graphically?
2. Memory configuration for multiple instances - Does the Total Server Memory reveal all the memory that a given SQL instance is utilizing? Should I use this counter to identify appropriate min/max memory configurations for multiple instances on a single cluster?
The problem with the perfmon approach is that it's scope is limited to just the server. Since our SharePoint environment is currently being shared with other applications, I understand that I may have to utilize DMV statistics to narrow down my analysis.
I have installed SSRS 2012 Standard Edition in our DR site. We replicate over the reporting server databases over from our Production server via storage replication. It is on a different server than the reporting service. When I configure the SSRS in DR it is still seeing the SSRS from our Production server and tries to make it a scale out deployment which it is obviously not allowed to be because of the edition.Is there something in the database itself I need to change so it doesn't think the production server is still connecting?
We are deploying our SSIS packages into different folders. For example: Test1 est2 production
Test1 points to the Test1 database, etc.
So, I configured my SSIS package to use a database connection called dbMAIN.
I then setup the SSIS File Configuration (XML) so that "dbMain" points to Test1. This xml file, called Global.dtsConfig, sits in C: est1, the same place as my ssis.dtsx file.
I want to copy my dtsx file and my dtsconfig file into est2 and production. The problem is that the the location of dtsconfig is HARDCODED in the ssis package!
How do I dynamically change it?
I tried to hardcode the location to ".Global.dtsconfig", but that did not work! Please advise!
I'm sitting down again to see if I can get configuration files to work. To test, I've set up a simple package that reads a flat file and writes to a table.
I've enabled configurations by clicking the checkbox in the configurations window. I am using an xml file on the local server, and there is an absolute path defined to the file. I also added a password to the xml file so the connection will work. To this point, everything works.
However, when I go into the configuration file and edit it to point to another server, it doesn't pick it up!
That is, when I run my package, it still writes the data to the old server. It's like it's completely ignoring the configuration file and just using the OLE DB connection manager instead.
However, if I delete the OLE DB conn mgr, the package doesn't work.
That's the question. I'm sure I will be encourage to use xml or other configuration types rather than INI files. But INI file has the advantage of not embedding any object property path and can be used for both packages and other applications. Imagine a large implementation with hundreds of packages and dozens of class libraries and applications which are configured from the same INI file. Imagine also that the production environment must support both DTS 2000 and SSIS 2005 packages as it's impossible to migrate all at once.
I've read that SSIS would support INI configuration files:
In Package Configurations Kirk says:
"...The two types of package configurations that haven't been documented yet in books online is INI and SQL configurations. INI package configurations have basically been provided for backward compatibility..."
And in BOL, in the DTSConfigurationType Enumeration description we can find that the INIFile configuration Type is also mentioned.
Anyway, a possible workaround is building a custom task with an UI that allows to assign INI keys to object properties, but I wanted to know if it's possible to avoid this.