Two digit year cutoff in SQL Server 2008 R2

Hi All,
We have a 2008R2 setup here and have SSIS jobs importing data from flat files into our database. Some sources only give us 2 digit years unfortunately. 
Looking at some data, the default 2 digit year cutoff  is not really appropriate to our setup, a value of 2080 would be better. However, when checking the official documentation here:
http://msdn.microsoft.com/en-us/library/ms191004(v=sql.105).aspx
there is a warning to leave the value alone to maintain backwards compatibility. This warning is NOT present for the newer versions of SQL Server. Is this just a generic warning about the general application landscape, or is there some Microsoft code somewhere
within SQL Server/SSIS/SSRS which assumes this default is locked to 2049? In other words, if I understand the application landscape at my office - am I safe to change this? Or is there some underlying code which will break?
Also, am I right in the assumption that once a 2 digit year is imported into a database table, it's then converted to a 4 digit year, so any existing data is "safe" from this setting being changed? In other words, the DB loses all memory of whether
an imported date was originally imported as a 2 digit year?
Thanks

Import the string dates into DATE/DATETIME format.
DATE/DATETIME has 4 digit year.
You can convert it differently than the automatic 2049 flip year.
DATE/TIME functions & string conversions:
http://www.sqlusa.com/bestpractices/datetimeconversion/
Here is an automatic conversion example.
DECLARE @StringDate char(8) = '10/23/80';
DECLARE @Date DATE;
SELECT @Date=CONVERT(date, @StringDate, 1);
SELECT @Date;
-- 1980-10-23
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

Similar Messages

  • I cant re-start sql server (2008 developer) on win 7 workstation after enabling tcpIP -- been running fine for a year

    I had successfully installed sql server 2008 Developer edition on a win7 pro workstation about a year ago.  I has been running fine for the last year (locally and running .Net 4.5 framework).  All services (RS, Analysis) running fine.  
    Then today someone decided to enable tcpIP and went to services to restart the server on my workstation but it would not restart. I ran repair from the sql server installation center x64 - still nothing - the server wont restart. But Analysis server and Reporting
    services work fine -- these services can restart fine ... Just not the main server. I'm also running Sql Server express. that runs OK too. But I need my sql server 2008 Developer to run. I looked at the system event viewer -- it said this:
    The SQL Server (SQLDEVELOPER) service terminated with service-specific error The specified module could not be found..
    I went to Control panel ... services and looked at the properties for Sql Server Developer -- the path was listed as:
    C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLDEVELOPER\MSSQL\Binn\sqlservr.exe" -sSQLDEVELOPER
    Everything in windows explorer appears to be in order.  How can I restart the server?  Do I need to uninstall it and then reinstall it?  Any suggestions appreciated.
    I rebooted the entire workstation a few times already also, but still server won't restart.  What to do?
    Rich P

    There were several Error Logs (for today) since I tried restart several times.  They appear to say the same thing:
    2014-07-14 12:57:31.27 Server Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)
    Apr 2 2010 15:48:46
    Copyright (c) Microsoft Corporation
    Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    2014-07-14 12:57:31.27 Server (c) Microsoft Corporation.
    2014-07-14 12:57:31.27 Server All rights reserved.
    2014-07-14 12:57:31.27 Server Server process ID is 4452.
    2014-07-14 12:57:31.27 Server System Manufacturer: 'Dell Inc.', System Model: 'OptiPlex 9010'.
    2014-07-14 12:57:31.28 Server Authentication mode is WINDOWS-ONLY.
    2014-07-14 12:57:31.28 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLDEVELOPER\MSSQL\Log\ERRORLOG'.
    2014-07-14 12:57:31.28 Server This instance of SQL Server last reported using a process ID of 2640 at 7/14/2014 12:55:59 PM (local) 7/14/2014 7:55:59 PM (UTC). This is an informational message only; no user action is required.
    2014-07-14 12:57:31.28 Server Registry startup parameters:
    -d C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLDEVELOPER\MSSQL\DATA\master.mdf
    -e C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLDEVELOPER\MSSQL\Log\ERRORLOG
    -l C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLDEVELOPER\MSSQL\DATA\mastlog.ldf
    2014-07-14 12:57:31.29 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2014-07-14 12:57:31.29 Server Detected 4 CPUs. This is an informational message; no user action is required.
    2014-07-14 12:57:31.38 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
    2014-07-14 12:57:31.40 Server Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
    2014-07-14 12:57:31.41 spid7s Starting up database 'master'.
    2014-07-14 12:57:31.46 spid7s 1 transactions rolled forward in database 'master' (1). This is an informational message only. No user action is required.
    2014-07-14 12:57:31.46 spid7s 0 transactions rolled back in database 'master' (1). This is an informational message only. No user action is required.
    2014-07-14 12:57:31.46 spid7s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
    2014-07-14 12:57:31.51 spid7s Resource governor reconfiguration succeeded.
    2014-07-14 12:57:31.51 spid7s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
    2014-07-14 12:57:31.51 spid7s SQL Server Audit has started the audits. This is an informational message. No user action is required.
    2014-07-14 12:57:31.52 spid7s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLDEVELOPER'.
    2014-07-14 12:57:31.54 spid7s SQL Trace ID 1 was started by login "sa".
    2014-07-14 12:57:31.55 spid7s Starting up database 'mssqlsystemresource'.
    2014-07-14 12:57:31.58 spid7s The resource database build version is 10.50.1600. This is an informational message only. No user action is required.
    2014-07-14 12:57:31.78 spid10s Starting up database 'model'.
    2014-07-14 12:57:31.78 Server Warning: Support for the VIA protocol is deprecated and will be removed in a future version of Microsoft SQL Server. If possible, use a different network protocol and disable VIA.
    2014-07-14 12:57:31.78 spid7s Server name is 'WKS308\SQLDEVELOPER'. This is an informational message only. No user action is required.
    2014-07-14 12:57:31.82 spid10s Clearing tempdb database.
    2014-07-14 12:57:31.89 Server A self-generated certificate was successfully loaded for encryption.
    2014-07-14 12:57:31.89 Server Error: 26055, Severity: 16, State: 1.
    2014-07-14 12:57:31.89 Server The SQL Server failed to initialize VIA support library [QLVipl.dll]. This normally indicates the VIA support library does not exist or is corrupted. Please repair or disable the VIA network protocol. Error: 0x7e.
    2014-07-14 12:57:31.89 Server Error: 17182, Severity: 16, State: 1.
    2014-07-14 12:57:31.89 Server TDSSNIClient initialization failed with error 0x7e, status code 0x60. Reason: Unable to initialize the VIA listener. The specified module could not be found.
    2014-07-14 12:57:31.89 Server Error: 17182, Severity: 16, State: 1.
    2014-07-14 12:57:31.89 Server TDSSNIClient initialization failed with error 0x7e, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The specified module could not be found.
    2014-07-14 12:57:31.89 Server Error: 17826, Severity: 18, State: 3.
    2014-07-14 12:57:31.89 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
    2014-07-14 12:57:31.89 Server Error: 17120, Severity: 16, State: 1.
    2014-07-14 12:57:31.89 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
    2014-07-14 12:57:31.97 spid10s Starting up database 'tempdb'.
    2014-07-14 12:57:32.19 spid14s A new instance of the full-text filter daemon host process has been successfully started.
    2014-07-14 12:57:32.22 spid13s Starting up database 'ReportServer$SQLDEVELOPER'.
    2014-07-14 12:57:32.22 spid10s Starting up database 'msdb'.
    2014-07-14 12:57:32.22 spid17s Starting up database 'Sales_DW'.
    2014-07-14 12:57:32.22 spid15s Starting up database 'DB1dev'.
    2014-07-14 12:57:32.22 spid18s Starting up database 'ConferenceData'.
    2014-07-14 12:57:32.22 spid14s Starting up database 'ReportServer$SQLDEVELOPERTempDB'.
    2014-07-14 12:57:32.22 spid19s Starting up database 'SubsDBstuff'.
    Cannot close event log because there are still event handle users active.
    Rich P

  • SQL*Loader - two-digit year

    Hello,
    Oracle 9
    I'm loading data into a table using sql*loader. Included is a date field with a two-digit
    year. When the data is loaded, the century for the date defaults to 20. Is there a way to
    change the ctl file to set the century based on a pivot year. For example if the year
    is greater than 50 then change the date so that the century is 19, otherwise the century would
    be 20.
    Here's data:
    12345678901234567890123456789 <-- postion
    0000000 <--- record 1
    0010000062603DUNNING PATRI <--- record 2
    0000000 <--- record 3 0010000073002BARRIS THEOD <--- record 4
    0000000 <--- etc 0000000 0000000 0000000000000BANK PEOPL
    Here's the ctl file:
    LOAD DATA
    INFILE 'S4_MST01.TST'
    REPLACE
    INTO TABLE mreadm.SBX_ACCOUNT_INFO
    LAST_PAYMENT_AMOUNT POSITION(01:07) DECIMAL EXTERNAL ":LAST_PAYMENT_AMOUNT/100",
    LAST_PAYMENT_DATE POSITION(08:13) DATE "MMDDYY" NULLIF (77:78) = '00',
    CUSTOMER_SHORT_NAME POSITION(14:29) CHAR
    Thanks.
    Paul

    There probably is a way to do it at the instant you load the data. I suggest you use a different approach.
    Load the data into the table. Then execute a simple statement like:
    select case when(to_number(to_char(sysdate,'YY'),99)) > 50 THEN '20' ELSE '00' END from dual;
    replace the sysdate above by the name of your column and issue a simple update statement. Let me know if I confused you, I can give a more specific exmaple on updating.

  • Is it possible to create a two node cluster with SQL server 2012 STD on node1 and SQL Server 2008 ENT on node2 on a Windows server 2012?

    Hi All,
    Is it possible to create a two node cluster with SQL server 2012 STD on node1 and SQL Server 2008 ENT on node2 on a Windows server 2012?
    aa

    I think you are confused with the way cluster is installed. Installing SQL on cluster is a two step process. On first node you create a new SQL cluster and on second node you need "AddNode" action.
    Same edition media has to be used in above two operation.
    you can install two separate instances with one enterprise and one standard.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Is it possible to have two or more virtual machines point to a shared instance of SQL Server 2008 R2 for systems administration?

    Hello All,
    I am the Systems Admin for a production box running SQL Server 2008 R2.  I have been ask to do the following and and trying to figure out if it's even possible.
    1. The Production Server is named ProductionA
    2. Create 3 Administrator accounts on ProductionA each with access to the SQL Server instance on ProductionA.  Use Standard SQL Server login for credentials. i.e. Username/Password and assign the role sysadmin.
    3. Install 3 Virtual Machines on ProductionA each with Windows 2008 R2 64 bit operating system.
    4. For each Virtual Machine, Install SQL Management Studio and write down the IP Address assigned to each VM.
    5. Using Remote Desktop Connection, connect to each virtual machine to be able to manage the SQL Server.
    Is this possible?  And, why am i doing it?  Because I DO NOT want the three people who will be having access to the production SQL Server to also have access to the primary host ProductionA.  Since I have to allow them to RDC into the box
    to manage the SQL Server, I figure why not create a separate VM for each one of them and they can RDC into those instead.
    Does this make any sense?
    Any tips are greatly appreciated.  The main reason for doing this is because the three people who will be accessing the box, I need to isolate each one of them and at the same time keep them off of the primary ProductionA.
    Thanks for your help.
    M

      Because I DO NOT want the three people who will be having access to the production SQL Server to also have access to the primary host ProductionA.  Since I have to allow them to RDC into the box to manage the SQL Server, I figure why not create
    a separate VM for each one of them and they can RDC into those instead.
    Does this make any sense?
    Any tips are greatly appreciated.  The main reason for doing this is because the three people who will be accessing the box, I need to isolate each one of them and at the same time keep them off of the primary ProductionA.
    Thanks for your help.
    M
    Hello M,
    Since you dont want the 3 guys to have access to Production machine A.You can install SQL Server client .By client i mean SQL server management studio(SSMS) on there local desktop and then create login for them in SQL Server.Open port on which your SQL server
    is running for three of the machines so that they can connct.Now with SSMS installed on each machine each can connect to SQL server from there own machine.
    I would also like you to be cautious with giving Sysadmin privilege to all three of them ,first please note down what task they would do and then decide what rights to be provided.
    Your option will also work but you need to create 3 VM for that .Which is more tedious task.
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Using SSDT-BI in Visual Studio 2012 to create and maintain SSRS, SSAS, SSIS in SQL Server 2008 R2

    Hi,   My management is wanting all the developers (database and .net) to upgrade from Visual Studio 2008 to Visual Studio 2012.  We are currently using SQL Server 2008 R2 for our data warehouse and using Business Intelligence (SSIS,
    SSAS, and SSRS) to maintain it.  Our database team is also wanting to create database projects and include that in our Team Foundation Server 2010 code repository along with our BI code.  From what I've been able to research googling the
    internet is there are two products available SSDT and SSDT-BI which can be installed into VS2012, but it appears that only SSDT for database projects is the only thing that will work until we someday upgrade to SQL Server 2012.  Most of the information
    I've found on the internet regarding this subject is over a year old and a lot can change in a year.  So my questions are can we install VS2012 and both SSDT and SSDT-BI to create and maintain the SSIS, SSRS, and SSAS currently in our SQL Server 2008
    R2 database?  If we can install these three items, VS2012 and the two SSDTs, and are able to create new BI and maintain our current BI in our SS2008R2 database then what issues might we have with our TFS2010 code repository?  We prefer
    to use only VS2012 or VS2008 but not both at the same time.  If we can't do everything we are currently doing in VS2008 with our SS2008R2 database by switching to VS2012 and the two SSDTs then we will stay with VS2008 until we someday upgrade
    to SS2012.  Please advise and thank you.  James M.

    I'm going to move this to the SSAS blog, where most SSDT-BI questions are answered (this forum mainly answers SSDT questions). Someone there may be able to give you better information but here's what I know:
    - I think you'll only need to install SSDT-BI since you're using SSIS, SSAS and SSRS. SSDT is the database tooling which it sounds like you wouldn't use, and it's actually built into VS2012 in any case.
    - SSIS projects don't work with earlier versions of SQL Server, but SSAS and SSRS do. Details are on
    this blog post. I don't have enough knowledge to suggest workarounds or best practices for handling the SSIS issue. Perhaps you could keep 2 projects, or 2 branches of the same project (one for 2012, one for 2008) if that's possible? I think your BIDS projects
    will be upgraded to SSDT-BI compatible projects so it's work checking them into source control, upgrading, then comparing to understand what's changed. You might be able to keep the same overall source and just change a few settings in the different branches?
    Hopefully someone on the SSAS forum can help give you more information and suggestions.
    Kevin

  • SQL Server 2008 R2 Replication - not applying snapshot and not updating all repliacted columns

    We are using transactional replicating on SQL Server 2008 R2 (SP1) using a remote distributor. We are replicating from BaanLN, which is an ERP application to up to 5 subscribers, all using push publications. 
    Tables can range from a couple million rows to 12 million rows and 100's of GBs in size. 
    And it's due to the size of the tables that it was designed with a one publisher to one table architecture.  
    Until recently it has been working very smooth (last four years)) but we have come across two issues I have never encountered.
    While this has happen a half dozen times before, it last occurred a couple weeks ago when I was adding three new publications, again a one table per publication architecture.
    We use standard SS repl proc calls to create the publications, which have been successful for years. 
    On this occasion replication created the three publications, assigned the subscribers and even generated the new snapshot for all three new publications. 
    However,  while it appeared that replication had created all the publications correctly from end to end, it actually only applied one of the three snapshot and created the new table on both of the new subscribers (two on each of the
    publications).  It only applied the snapshot to one of the two subscribers for the second publications, and did not apply to any on the third.  
    I let it run for three hours to see if it was a back log issue. 
    Replication was showing commands coming across when looking at the sync verification at the publisher and 
    it would even successfully pass a tracer token through each of the three new publications, despite there not being tables on either subscriber on one of the publishers and missing on one of the subscribers on another.  
    I ended up attempting to reinitialize roughly a dozen times, spanning a day, and one of the two remaining publications was correctly reinitialized and the snapshot applied, but the second of the two (failed) again had the same mysterious result, and
    again looked like it was successful based on all the monitoring. 
    So I kept reinitializing the last and after multiple attempts spanning a day, it too finally was built correctly.  
    Now the story only get a little stranger.  We just found out yesterday that on Friday the 17th 
    at 7:45, the approximate time started the aforementioned deployment of the three new publications, 
    we also had three transaction from a stable and vetted publication send over all changes except for a single status column. 
    This publication has 12 million rows and is very active, with thousands of changes daily. 
    , The three rows did not replicate a status change from a 5 to a 6. 
    We verified that the status was in fact 6 on the publisher, and 
    5 on both subscribers, yet no messages or errors.  All the other rows successfully updated.  
    We fixed it by updating the publication from 6 back to 5 then back to 6 again on those specific rows and it worked.
    The CPU is low and overall latency is minimal on the distributor. 
    From all accounts the replication is stable and smooth, but very busy. 
    The issues above have only recently started.  I am not sure where to look for a problem, and to that end, a solution.

    I suspect the problem with the new publication/subscriptions not initializing may have been a result of timeouts but it is hard to say for sure.  The fact that it eventually succeeded after multiple attempts leads me to believe this.  If this happens
    again, enable verbose agent logging for the Distribution Agent to see if you are getting query timeouts.  Add the parameters
    -OutputVerboseLevel 2 -Output C:\TEMP\DistributionAgent.log to the Distribution Agent Run Agent job step, rerun the agent, and collect the log.
    If you are getting query timeouts, try increasing the Distribution Agent -QueryTimeOut parameter.  The default is 1800 seconds.  Try bumping this up to 3600 seconds.
    Regarding the three transactions not replicating, inspect MSrepl_errors in the distribution database for the time these transactions occurred and see if any errors occurred.
    Brandon Williams (blog |
    linkedin)

  • Unable to install SQL server 2008 r2 standard edition on windows server 2008 r2 sp1

    I am unable to install sql server 2008 r2 standard edition on windows server 2008 r2 sp1.
     On the Setup Support Files page, choose Install this step I don't get any other window i.e. nothing happens I waited for 5-10 min.  Then I checked the log file.
    Final result:                  Failed: see details below
      Exit code (Decimal):           -2068053929
      Exit facility code:            1212
      Exit error code:               87
      Exit message:                  Failed: see details below
      Start time:                    2014-03-18 14:59:31
      End time:                      2014-03-18 15:00:25
    === Verbose logging started: 3/19/2014  9:45:47  Build type: SHIP UNICODE 5.00.7601.00  Calling process: E:\SQL Server 2008 R2 Standard\x64\setup100.exe ===
    MSI (c) (10:34) [09:45:47:496]: Note: 1: 2203 2: E:\SQL Server 2008 R2 Standard\x64\redist\watson\dw20sharedamd64.msi 3: -2147287038
    MSI (c) (10:34) [09:45:47:496]: MsiOpenPackageEx is returning 2.
    === Verbose logging stopped: 3/19/2014  9:45:47 ===
    Please help As i am running out of time as i have to upgrade TFS for that first step is to install SQL server.

    Hello,
    The following are a few things you can try:
    Copy the media to the local disk drive, unzip it (in case you are installing from an ISO file, and run SQL Server setup from there.
    Try to unregister and register the Windows Installer with the following two commands:
    msiexec /unregister
    msiexec /regserver
    Try to use Process Monitor to log the detailed error produced when the installation of dw20sharedamd64.msi fails. You can download Process Monitor from the following link:
    http://technet.microsoft.com/en-us/sysinternals/bb896645
    Share with us the error captured by Process Monitor.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • "Value cannot be null" error when trying to edit or create Maintenance Plan in SQL Server 2008

    I have SQL Server 2008 installed on Windows Server 2008 64bit, every time I try to open or create a new Maintenance Plan I receive the error:
    Value cannot be null.
    Parameter name: component (System.Design)
    Program Location:
       at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent component)
       at Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String connectionString, Object connection, String objectUrn)
       at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()
    And in the Design view screen
    "Microsoft SQL Server Management Studio is unable to load this document: Could not load type 'Microsoft.SqlServer.Dts.runtime.Wrapper.IDTSPackageSigning100' from assembly 'Microsoft.SqlServer.DTSRunTimeWrap, Version=10.0.0.0, Culture=neutral'. 
    I have searched for a possible solution and have tried some suggestions of registering the msxml6.dll but and have installed VS2008 SP1 but I'm not in a position where I can do a full reinstall of SQL Server right now. Any help is appreciated. My SQL server
    environment information is below. 
    Microsoft SQL Server Management Studio
    10.0.1600.22 ((SQL_PreRelease).080709-1414 )
    Microsoft Analysis Services Client Tools
    2007.0100.1600.022 ((SQL_PreRelease).080709-1414 )
    Microsoft Data Access Components (MDAC)
    6.0.6002.18005 (lh_sp2rtm.090410-1830)
    Microsoft MSXML 3.0 4.0 5.0 6.0 
    Microsoft Internet Explorer 8.0.6001.18943
    Microsoft .NET Framework 2.0.50727.4206
    Operating System 6.0.6002

    I digged a little deeper and figured out it was a missing directory/file in %TEMP%. Seems some CleaningTool removes all files/directories in %Temp% and after that SSMS was not working any longer. The missing file is actually not needed, but the
    missing directory causes the "Value cannot be null" error.
    My missing file name was:
    C:\Users\<username>\AppData\Local\Temp\2\6vvdaozf.tmp
    But the file name changes on every startup.
    So my missing directory name was:
    C:\Users\<username>\AppData\Local\Temp\2
    After creating a empty directory with the name "2" in %TEMP% all went back to work fine for me.
    I'm not sure the directory name is every time the same, but you can discover your missing file with the process monitor from Sysinternal Tools and filters to "Process Name is ssms.exe" and "Path contains AppData\Local\Temp"
    Hope this helps other people to solve their issues too.
    Thank you!! When I run %temp% it takes me to "C:\Users\Admin ...~\AppData\Local\Temp\some random number". At first the random number was 3, after I logged off and back on it was 2. My temp variable in enviromental variables is correct. I looked on another machine
    running SQL2008 and temp is correct there. If I try to rename the numbered folder SSMS stops working. Any idea?

  • MS SQL Server 2008 R2 Enterprise Edition on Windows Server 2008 R2 Standard Edition

    Hello Team, 
    Is there any issue/conflicts/limitationn to install MS SQL Server 2008 R2 Enterprise Edition on Windows Server 2008 R2 Standard Edition. 
    OR their is nothing to worry about it I guess their is memory limitation between both of them. Please suggest
     Regards
    Naveed Amir

    Hi,
    Here you can find the officially Hardware and Software Requirements for SQL Server 2008 R2:
    http://msdn.microsoft.com/en-us/library/ms143506(v=sql.105).aspx
    There should be NO problem as much as I know if the basic limitation fit you (as shanky mentioned).
    I had (an clients still have) several servers with Windows Server 2008 R2 Standard & SQL
    Server 2008 R2 Enterprise and Standard with no problem (today I have one old developing server with this exact installations work great for several years).
    [Personal Site] [Blog] [Facebook]

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • Crystal report 9 Sql Server 2008 R2 compatability

    Can we use Crystal report version 9 in Sql server 2008 R2 to generate reports in web server.
    Kindly tell us about the compatability of  these two. If there is any support issue between these two kindly mention the same.
    Edited by: Deepan1 on Jun 7, 2011 5:32 PM

    Upgrade to CR 2008 SP 4 is your only option.
    The Platforms file was on the CR CD or it may be in the Documents folder on install. I don't have it installed any more so I can't say exactly where it is. Search your PC for platforms.
    The problem is SQL 2008 uses a new Client engine and MS renamed the DLL do CR isn't aware of it. Using the MDAC version of SQL Server OLE DB Provider may work but it won't be supported if you find errors.
    If you do upgrade to CR 2008 then install the MS SQL Server 2008 Client Tools from the CD or download the MSI from Microsoft and then use the MS SQL Server Native 10 client and it should all work for you.
    Thank you
    Don

  • SQL Server 2008 KB2977321 Failed with Error code 1642

    As part of application of security patches via windows update, sql server KB2977321 was applied along with a number of OS security patches. 
    Prior to applying the patches, I stopped the agent, engine, reporting, analysis and full text services.
    The Sql server build prior to windows update was (for both instances):
    ProductVersion           
    ProductLevel               
    Edition
    10.0.5500.0                 
    SP3            
    Standard Edition (64-bit)
    After the update process, my main instance is showing (the second instance is not in use yet and I have left it in its stopped state)
    Microsoft SQL Server 2008 (SP3) - 10.0.5520.0 (X64)
    Jul 11 2014 16:11:50
    Copyright (c) 1988-2008 Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)
    In the Administrative Logs after the OS patches were applied (and all were reported as successful by windows update), I found the following errors listed:
    Log Name:     
    Application
    Source:       
    MsiInstaller
    Date:         
    11/18/2014 7:16:45 PM
    Event ID:     
    1024
    Task Category: None
    Level:        
    Error
    Keywords:     
    Classic
    User:         
    SYSTEM
    Computer:     
    SJCDB3.intranet.co.st-johns.fl.us
    Description:
    Product: Microsoft SQL Server 2008 Database Engine Services - Update '{9145CF54-462E-4A28-8FB5-A44C93AD3716}' could not be installed. Error code 1642. Windows Installer can create logs to help troubleshoot
    issues with installing software packages. Use the following link for instructions on turning on logging support: http://go.microsoft.com/fwlink/?LinkId=23127
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
    <Provider Name="MsiInstaller" />
    <EventID Qualifiers="0">1024</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-11-19T00:16:45.000000000Z" />
    <EventRecordID>1764186</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SJCDB3.intranet.co.st-johns.fl.us</Computer>
    <Security UserID="S-1-5-18" />
      </System>
      <EventData>
    <Data>Microsoft SQL Server 2008 Database Engine Services</Data>
    <Data>{9145CF54-462E-4A28-8FB5-A44C93AD3716}</Data>
    <Data>1642</Data>
    <Data>(NULL)</Data>
    <Data>(NULL)</Data>
    <Data>(NULL)</Data>
    <Data>
    </Data>
    <Binary>7B38373544383436332D313135422D343444322D414432352D3731454337453833423843437D207B39313435434635342D343632452D344132382D384642352D4134344339334144333731367D2031363432</Binary>
      </EventData>
    </Event>
    In the C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_191448\Detail.txt file I found the following around the time the error was reported
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_engine_core_inst_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_engine_core_inst_Cpu64 - NotInstalled on the baseline msi package sql_engine_core_inst_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_engine_core_inst_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_engine_core_inst_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_engine_core_inst.msp PatchCode={9145CF54-462E-4A28-8FB5-A44C93AD3716}
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_engine_core_inst_Cpu32 - The baseline msi is not installed. 
    The patch package is ignored.
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_engine_core_inst_Cpu32 - Detail description of this patch package is: PatchId=KB2977321_sql_engine_core_inst_Cpu32 PatchVersion=10.3.5520.0 BaselinePackageId=sql_engine_core_inst_Cpu32
    BaselineVersion=10.3.5500.0; PatchFileName=sql_engine_core_inst.msp PatchCode={9145CF54-462E-4A28-8FB5-A44C93AD3716}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_rs_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_rs_Cpu64 - NotInstalled on the baseline msi package sql_rs_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_rs_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_rs_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_rs.msp PatchCode={2296F7DD-2D3D-4802-B61A-AE7460EFB767}
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_rs_Cpu32 - The baseline msi is not installed. 
    The patch package is ignored.
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_rs_Cpu32 - Detail description of this patch package is: PatchId=KB2977321_sql_rs_Cpu32 PatchVersion=10.3.5520.0 BaselinePackageId=sql_rs_Cpu32 BaselineVersion=10.3.5500.0;
    PatchFileName=sql_rs.msp PatchCode={2296F7DD-2D3D-4802-B61A-AE7460EFB767}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_is_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_is_Cpu64 - NotInstalled on the baseline msi package sql_is_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_is_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_is_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_is.msp PatchCode={E870296C-24CC-4D82-BB59-CD136692E2BD}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_bids_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_bids_Cpu64 - NotInstalled on the baseline msi package sql_bids_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_bids_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_bids_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_bids.msp PatchCode={EA407FA6-C2D1-4D3D-9227-B9E06DDDEFD0}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_ssms_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_ssms_Cpu64 - NotInstalled on the baseline msi package sql_ssms_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_ssms_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_ssms_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_ssms.msp PatchCode={8A81B870-E8F0-415D-AC80-13BEAA3EC8C8}
    2014-11-18 19:16:30 Slp: Baseline Package Id: sql_common_core_Cpu64 - No patches are found by SQL Discovery on the installed package whose ProductCode is {5340A3B5-3853-4745-BED2-DD9FF5371331}
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_common_core_Cpu64 - NotInstalled on the baseline msi package sql_common_core_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_common_core_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_common_core_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_common_core.msp PatchCode={CF023E0F-3A19-4DBF-BCA3-0F664B447EDB}
    The instance came up successfully and seems to be operating normally. Was there an error or was the KB installed correctly as the result of the windows update process indicated? 
    Is there a way I can verify this? 

    I did some research on this particular KB article and it seems to be related to Master Data Services which I am not using.  The KB was pushed automatically and I am not sure that it was a required update in our situation. I'd like to understand exactly
    what caused the error message before initiating a repair as this is a production and not a test environment.  Everything appears to be functioning properly and I have received direction from Microsoft in the past that information in some logs identified
    as level 'error' are in fact to be ignored.  I checked the windows update and this KB shows 'Successful' rather than failed or cancelled.
    I would also like more information on why sql server services should not be stopped prior to allowing the OS patches to be applied.   I have received messages in the past that stopping the services before service packs are applied
    prevent the necessity for a reboot of the machine.  I've never heard before that it is a best practice not to stop Sql service prior to applying patches.  Once the services are stopped, I have our infrastructure admin start a VM snapshot on
    the machine then kick off the windows update process. When done, I reboot the machine, test out Sql Server processes and then if all goes well give the ok to release the VM snapshot.  I've supported various databases for 12 years, Sql Server for 5
    years and this is the first time I've heard stopping the service manually can cause problems.  If that is the case, I will certainly change how I do things....
    I did run the discovery report and the results follow:
    Microsoft SQL Server 2008 Setup Discovery Report
    Product
    Instance
    Instance ID
    Feature
    Language
    Edition
    Version
    Clustered
    Sql Server 2008
    MSSQLSERVER
    MSSQL10.MSSQLSERVER
    Database Engine Services
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSSQL10.MSSQLSERVER
    SQL Server Replication
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSSQL10.MSSQLSERVER
    Full-Text Search
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSAS10.MSSQLSERVER
    Analysis Services
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSRS10.MSSQLSERVER
    Reporting Services
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    EVAULT
    MSSQL10.EVAULT
    Database Engine Services
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    Management Tools - Basic
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    Management Tools - Complete
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Client Tools Connectivity
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Client Tools Backwards Compatibility
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Client Tools SDK
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Integration Services
    1033
    Standard Edition
    10.3.5520.0
    No

  • How to Configure Remote Connections To SQL Server 2008 R2 Express

    Post written June 10, 2010 and pertains to:
    SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
    SQLX_LOC
    SQL Server 2008 R2 Management Studio on both my server and local machines:
    MS_SRV, MS_LOC
    Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
    SQL Server Configuration Manager on both my server and local machines:
    CMGR_SRV, CMGR_LOC
    Server Manager: SMGR
    I am connecting to my hosting server via Remote Desktop Connection: RDC
    I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine.  I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV.  However I am not able to use MS_LOC to connect
    with SQLX_SRV.  Here's what I have done so far:
    SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles.  Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
    CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue.  On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No.  I've tried it both
    ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP.  On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field. 
    For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field.  For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
    fields.
    CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart.  This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
    On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
    The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS".  My server machine name is "SERVER1" on the EnglishBrains.com domain.  So the proper local name (local within the context of my remote server as connected via RDC) for
    my instance of SQLX_SRV would be:
    SERVER1\SQLEXPRESS 
    Note the use of a backslash NOT a forward slash. 
    Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
    SERVER1.EnglishBrains.com\SQLEXPRESS
    I must also use SQL Server Authentication.  Before I can use such a remote connection, however, there are still several configuration steps required.  So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
    for the server name and Windows Authentication.  Once connected I performed the following steps:
    MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode".  This will enable connections using either type
    of authentication.
    Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
    Click OK to save these changes and close the Server Properties dialogue.
    MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
    On the General page Enter a name for your new login
    Select SQL Server Authorization
    Enter and confirm a password
    Uncheck Enforce password expiration
    Select the default Database and Language
    On the ServerRoles page Public will be checked, also check SysAdmin.  This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
    On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
    At the bottom of the User Mapping page you'll see the Database Roles table.  Public will be selected by default.  Also select db_Owner.  Again this is probably not a good idea, and I'll refine this once I can connect.
    On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
    Click OK to save all changes and close the Login - New dialogue.
    With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login.  I tried this and it worked fine.  Next I tried to use this same login
    remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
    SERVER1.EnglishBrains.com\SQLEXPRESS
    and opting for SQL Server Authentication and supplying the name and password of my new login.
    THIS DID NOT WORK??  Instead I get the following error message:
    Cannot connect to SERVER1.EnglishBrains.com\SQLEXPRESS.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
    For help, click:
    http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
    If you follow the suggested help link, you are told:
    The SQL Server client cannot connect to the server.  This error could be caused by one of the following reasons:
    A specified SQL Server instance name is not valid.
    The TCP, or named pipes protocols are not enabled.
    The firewall on the server has refused the connection.
    The SQL Server Browser service (sqlbrowser) is not started.
    WRONG on all 4 counts!  The instance name IS valid.  Both TCP/IP and Named Pipes protocols are enabled.  The firewall has been shut down, so it is not relevant.  Finally the SQL Server Browser IS started.
    The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
    tcp:68.71.134.186,1433
    Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running. 
    However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work??  I get the following error message:
    Cannot connect to tcp:68.71.134.186,1433.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
    If you follow the help link you are told:
    "The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
    However, the firewall has been shut down and the server HAS been configured to accept remote connections! 
    I confirmed that i could indeed Ping to 68.71.134.186  and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
    tcp:68.71.134.186,1433 .
    IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine! 
    If anyone can help me figure out why I would be very, very grateful!

    My two cents to help you out on c# code example to configure the remote sql server express.
    Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data.SqlClient;
    namespace sqlremoteconnection
    class Program
    static void Main(string[] args)
    // this is the local sql server connection
    // 192.168.1.101\SQLEXPRESS
    // now, the configuration for remote access:
    // activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
    // SQL Server Configuration Manager
    // --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
    // --> Log On -> Start -> Ok
                // netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
    // VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
    // on the router!!!
    // TCP: 1433
    // UDP: 1434
    // or just a personal port like TCP 31433/UDP 31434
    // read carefully the netsh commands above
    // server name: 123.132.24.177\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
    // server name: anyurl.myftp.org\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
    SqlConnection myConnection = new SqlConnection(
    "user id=sa;" +
    "password=password_goes_here!;" +
    "server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
    //"Trusted_Connection=no;" +
    "database=database_name_here; " +
    "connection timeout=30");
    try
    myConnection.Open();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    SqlDataReader myReader = null;
    SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
    myReader = myCommand.ExecuteReader();
    while (myReader.Read())
    Console.WriteLine(myReader["tab01_name"].ToString());
    Console.WriteLine(myReader["tab01_age"].ToString());
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    myConnection.Close();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    Adelino Araujo

  • How to access the datasource window in SSRS for sql server 2008 R2 for writing my query without having to go through the wizard?

    I have used SSRS a lot years ago with Sql Server 2000 and Sql Server 2005. I have written external assemblies, ... But now I have to do this with Sql Server 2008 (R2 -- which I realize I am way behind the times already but ...)  in sql server 2000 and
    2005 there was a tab for datasource to the left of the tab for design which was to the left of the preview tab. How do I get to the datasource window in sql server 2008 (r2) ?
    I see that datasource explorer.  But where can I get to the datasource window to edit my queries and so forth for sql server 2008 (R2)?
    Thanks
    Rich P

    I think I found the answer to my question --- just right-click on the the Data Sources or Datasets for editing connections and dataset queries.  I'm guessing it gets even fancier with Sql Svr 2012 - 2014.    Man, that's the one thing
    about coding platforms -- you let it go for a few years and come back, and everything has changed (well, a lot of things).  Now I need to figure out how to add an external assembly to SSRS 2008 (R2).
    Rich P

Maybe you are looking for

  • Strange wifi problem on a brand-new MacBook Pro

    Hey there, I'm new here. Desperation has got the better of me, and I hope I can get some advice. So, last sunday I bought a brand new 13" MacBookPro with 2.8g i7 processor and 10.7.2 OS (I can't update to 10.7.4 because System Update tells me the dow

  • What are these shared computers and how do I remove them from Finder?

    I have four Macs on my closed, hidden wifi network. Two iMacs and Two macbooks. For some reason, two unknown computers are showing up on the network, but only on two out of the four macs, one imac and one macbook, incedentally the two units with buil

  • Compile error when connecting to JDBC:ODBC

    Hi I am not used to java so probably this is an enivorment problem, but I cannot fix, please help! FOLLOWING CODE import java.sql.*; public class DBtest { public static void main (String args[]) { String jdbcDriver = "sun.jdbc.odbc.JdbcOdbcDriver"; S

  • Finder won't run on G5 iMac after 10.5.1

    Finder just won't start and CPU is stuck at 100% after 10.5.1 update, see the following in the crash log: Process: mdworker [270] Path: /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework /Versions/A/Support/mdworker Ident

  • Problems migrating to a bigger hard disc on Satellite Pro A120

    Hi, I've been trying to upgrade to a bigger HDD (same brand and series) using Drive Image XML. Ive done it this way on other PCs before but it didn't work. I've also tried using WinDD with the same results and Ghost but I don't have SATA support. I c