Jump to content

antonch

Administrators
  • Posts

    1030
  • Joined

  • Last visited

  • Days Won

    7

Blog Entries posted by antonch

  1. antonch
    Τις τελευταίες μέρες κάνω διάφορα πειράματα και δοκιμές στον SQL Server 2008 πάνω σε Windows Server 2008 R2.
    Έτσι έφτιαξα μια μηχανή στην οποία ήθελα να έχω περισσότερα από ένα instances του SQL Server 2008.
    Έστησα το πρώτο έκανα και τα απαραίτητα updates & restarts και πήγα να στήσω το δεύτερο. Με το που ξεκίνησε μου βγάζει το μήνυμα

    “Invoke or BeginInvoke cannot be called on a control until the window handle has been created.”

    ‘Επειτα από μια έρευνα που έκανα βρήκα ότι αυτό γίνεται εξαιτίας της αλλαγής συμπεριφοράς που έχει το .NET Framework τόσο στον Windows Server 2008 R2, όσο και στα Windows 7, που αφορά το πως γίνεται handle τα UI dialogs με αποτέλεσμα σε κάποιες περιπτώσεις να βγάζει το μήνημα αυτό. Μάλλον είναι bug αλλά για να είμαι σίγουρος θα περιμένω την επιβεβαιώση. Από ότι φαίνεται αυτό θα το συναντήσουμε και στην R2 έκδοση του SQL Server 2008.
    Το καλό βέβαια είναι ότι δεν δημιουργεί ιδιαίτερο πρόβλημα μιας και αν αμέσως ξαναξεκινήσεις το setup αυτό θα προχωρήσει κανονικά.
    Φιλικά
    Αντώνης
  2. antonch
    Σήμερα αντιμετώπισα ένα μήνυμα λάθους που δεν το είχα ξαναδεί μέχρι τώρα

    Ο φίλος Νίκος Κοασίδης από την Θεσσαλονίκη προσπαθούσε να στήσει την Express έκδοση του SQL Server 2005 σε windows xp ελληνικά με sp3. Βέβαια αυτό μπορεί να συμβεί και στις άλλες εκδόσεις.

    Με το που ξεκινούσε την εγκατάσταση εμφάνιζε το μήνυμα λάθους


    “SQL Server Setup unexpectedly failed. For more information, review the Setup summary log file..."


    Μετά από μια σύντομη αναζήτηση βρήκα το εξής που λύνει το πρόβλημα αυτό.

    Πάμε στην registry και κοιτάμε δύο hives τα

    HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

    και

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

    Μέσα σε αυτές πρέπει να υπάρχει το entry “ΑppData”  με value “%USERPROFILE%\Application Data”.

    Έαν δεν υπάρχει το δημιουργούμε (String). Στον Νίκο έλειπε από το HKEY_CURRENT_USER\… .

    Τρέχουμε ξανά το setup και βγάζει ένα μήνυμα για το MSXML αλλα λέμε ΟΚ και όλα πάνε καλά
  3. antonch
    Λίγο πριν το Πάσχα λέω να κάνουμε ένα SQL Saturday Night το οποίο θα γίνει σύμφωνα με μια νέα φιλοσοφία όσον αφορά τον τρόπο διεξαγωγής του και συμμετοχής.

    Όσοι πραγματικά θέλουν να συμμετάσχουν στην ζωντανή παρουσίαση θα πρέπει να κάνουν registration ώστε να τους αποσταλθεί το link του Live Meeting.

    Η διαδικασία είναι απλή, και θα βελτιωθεί στο μέλλον. Με την ευκαιρία θα έρθετε σε επαφή με το SqlSchool.gr το οποίο είναι ακόμα στα πρώτα του βήματα και προδευτικά θα γεμίζει με υλικό. Φυσικά τα σχόλια και οι παρατηρήσεις σας είναι ευπρόσδεκτα.

    Όσοι θέλουν να κάνουν registration ας κάνουν κλικ στο δίπλα link

     

    Registration
  4. antonch
    Source: SQL Server Magazine
    SQL Server 2008 R2 has been released to manufacturing. Microsoft’s Ted Kummert, the senior vice president for the Business Platform Division, and Tom Casey, the general manager for Microsoft Business Intelligence, were excited to point out that this release comes only 20 months after SQL Server 2008 was released. However, SQL Server 2008 R2 won’t be generally available until May 13 (you can download it May 3 if you’re a MSDN or TechNet subscriber). In the meantime, you can download an evaluation version from the SQL Server 2008 R2 launch site.
  5. antonch
    Χειμώνιασε και νομίζω ότι είναι καιρός να αρχίσουμε .
    Βασανίστηκα αρκετά για να επιλέξω θέμα. Είχα να επιλέξω μεταξύ πολλών θεμάτων. Κάποια ήταν υψηλής δυσκολίας και ίσως φίλοι που δεν έχουν την απαιτούμενη εμπειρία στον SQL Server θα είχαν δυσκολίες στην παρακολούθηση. Κάποια άλλα εύκολα και οι έμπειροι φίλοι να τα έβρισκαν ανιαρά. Δύσκολη απόφαση.
    Έτσι πήρα μια απόφαση που πιστεύω ότι είναι η πιο δίκαιη. Θα ξεκινήσουμε από τα βασικά ώστε μέσα στα πρώτα 4-5 μαθήματα να έρθουν οι «μη έμπειροι» σε μια κατάσταση όμοια με τους «έμπειρους» .
    Στο 1ο μάθημα θα ξεκινήσουμε από την εγκατάσταση του SQL Server και θα φτάσουμε μέχρι την δημιουργία και την αρχιτεκτονική μιας database. Απλό θέμα αλλά νομίζω ότι είναι απαραίτητο για αρχή. Εξάλλου θα είναι και πιλότος για το διαδικαστικό μέρος της προσπάθειας αυτής.
    Παρακάτω θα σας δίνω τα στοιχεία του meeting και ελπίζω να δω τους περισσότερους από εσάς.
    Ημερομηνία & Ώρα : 16/10/2010 22:30 μμ
    Attendee URL: https://www.livemeeting.com/cc/mvp/join?id=ZR29ZM&role=attend&pw=5Kpf%5C%7B22w
    Meeting ID: ZR29ZM
    Attendee Entry Code: 5Kpf\{22w
    Duration: 2 hours
    Μέχρι τότε να είσαι όλοι καλά και να προσέχετε τον εαυτό σας.
  6. antonch
    Επειδή μάλλον το πρώτο άρεσε είπα να κάνω και το δεύτερο σύντομα.
    Έτσι λοιπόν θα συνεχίσουμε από εκεί που μείναμε δηλαδή την δημιουργία μιας database με πολλά tips για αυτούς που θέλουν να μάθουν να σχεδιάζουν σωστά μια database στον SQL Server.
    Φυσικά αυτό από πίσω κρύβει αρκετή δόση αρχιτεκτονικής.
    Παρακάτω θα σας δίνω τα στοιχεία του meeting και ελπίζω να δω τους περισσότερους από εσάς.
    Ημερομηνία & Ώρα : 23/10/2010 22:30 μμ
    Attendee URL: https://www.livemeeting.com/cc/mvp/join?id=WP7JZ9&role=attend&pw=s%26Dr5%29JWD
    Meeting ID: WP7JZ9
    Attendee Entry Code: s&Dr5)JWD
    Duration: 2 hours
    Μέχρι τότε να είσαι όλοι καλά και να προσέχετε τον εαυτό σας.
    Εδώ θα βρείτε την μαγνητοσκοπημένη παρουσίαση
  7. antonch
    Ολοκληρώθηκε το meeting και το recording αυτού μπορείτε να το βρείτε στα παρακάτω σήμεια
    https://www311.livemeeting.com/cc/mvp/view?id=DSZT9W http://www.techdays.gr --------------------------------------------------------------------------------------------------------
    Συνεχίζουμε στο ρυθμό μας, ελπίζοντας αυτή η προσπάθεια να σας αρέσει, με το 3ο Saturday SQL Night και θεματολογία Backup & Restore (έπειτα με απαίτηση αρκετών από εσάς ).
    Παρακάτω σας δίνω τα στοιχεία του meeting και ελπίζω να δω τους περισσότερους από εσάς.
    Ημερομηνία & Ώρα : 06/11/2010 22:30 μμ
    Attendee URL: https://www.livemeeting.com/cc/mvp/join?id=DSZT9W&role=attend&pw=p7%28pCxwWq
    Meeting ID: DSZT9W
    Attendee Entry Code: p7(pCxwWq
    Duration: 2 hours
    Μέχρι τότε να είσαι όλοι καλά και να προσέχετε τον εαυτό σας.
  8. antonch
    Με αυτό το post μου σε καμία περίπτωση δεν θέλω να εγείρω ατέρμονες συζητήσεις και διαμάχες απλά να καταγράψω και να σχολιάσω θέλω μια είδηση που βρήκα τυχαία εδώ και αναφέρει ότι η ORACLE έκανε αύξηση στη τιμή της 11g κατά 40%! μέσα σε αυτή την δύσκολη οικονομική συγκύρια.
    Από την άλλη η "επάρατη" Microsoft συνεχίζει να πουλάει με την ίδια τιμή τον SQL Server 2008 και μην μου πείτε ότι είναι καλύτερη η ORACLE 11g από τον SQL Server 2008 γιατί ξέρουμε όλοι ότι κάτι τέτοιο δεν ισχύει.
    Για όσους πάντως θέλουν να δουν τι θα πληρώσουν αν αγοράσουν SQL Server 2008 εδώ θα βρείτε ένα calculator που υπάρχει στον site του SQL Server.
    Εγώ δεν έχω να προσθέσω τίποτα άλλο, τα σχόλια και οι επιλογές είναι δικά σας πλέον.
  9. antonch
    from msdn
    Accessing SQL Server Databases with PHP Auditing in SQL Server 2008 Best Practices for Data Warehousing with SQL Server 2008 Connectivity Options for Microsoft SQL Server 2008 Integration Services Consolidation Guidance for SQL Server Consolidation Using SQL Server 2008 Cryptography in SQL Server Data Access Tracing in SQL Server 2008 Database Encryption in SQL Server 2008 Enterprise Edition Embedding SQL Server 2008 Express in an Application Engine Separation of Duties for the Application Developer FILESTREAM Storage in SQL Server 2008 Geo-Replication Performance Gains with SQL Server 2008 on Windows Server 2008 High Availability with SQL Server 2008 How to Implement Kerberos Constrained Delegation with SQL Server 2008 Hub-And-Spoke: Building an EDW with SQL Server and Strategies of Implementation Improving Performance with SQL Server 2008 Indexed Views Installing SQL Server 2008 Express Guidance Introduction to Fast Track Data Warehouse Architectures Introduction to New Data Warehouse Scalability Features in SQL Server 2008 Introduction to New T-SQL Programmability Features in SQL Server 2008 Introduction to Spatial Coordinate Systems: Flat Maps for a Round Planet Migrating DTS Packages to Integration Services Migrating to SQL Server from Other Database Products Partitioned Table and Index Strategies Using SQL Server 2008 Plan Caching in SQL Server 2008 Remote BLOB Store Provider Library Implementation Specification Reporting Services SharePoint Integration Troubleshooting Resources for Upgrading to SQL Server 2008 Scaling Up Your Data Warehouse with SQL Server 2008 SQL Server Best Practices - Implementation of Database Object Schemas SQL Server RDL Specification SQL Server 2008 Full-Text Search: Internals and Enhancements Statistics Used by the Query Optimizer in Microsoft SQL Server 2008 Troubleshooting Performance Problems in SQL Server 2008 Using the Microsoft Connector for Oracle by Attunity with SQL Server 2008 Integration Services Using Microsoft Connector for Teradata by Attunity Using the Resource Governor Using SQL Server to Build a Hub-and-Spoke Enterprise Data Warehouse Architecture Using SQL Server 2008 Integration Services with SAP BI 7.0 Using SQL Server 2008 Reporting Services with the.NET Framework Data Provider for Teradata Using SQL Server 2008 Reporting Services with SAP NetWeaver Business Intelligence Using Star Join and Few-Outer-Row Optimizations to Improve Data Warehousing Queries We Loaded 1 Terabyte in 30 Minutes with SSIS, and So Can You
  10. antonch
    To recording μπορείτε να το δείτε εδώ
     
    Σας έλειψαν το ξέρω, και εμένα.
    Αλλά από το τελευταίο έγιναν πολλά, IT PRO|DEV Connections 2010, έπεσε πολύ δουλειά και πολλά ακόμα, που δεν μου έδωσαν χρόνο να διοργανώσω ένα νέο. Όμως ποτέ δεν είναι αργά. Έτσι λέω να κάνουμε ένα το επόμενο Σάββατο 18/12/2010 την γνωστή ώρα 22:30 και με θέμα «Security in SQL Server 2008 R2»
    Για να συνδεθείτε στο event πατήστε εδώ
    Το επόμενο θα είναι με την νέα χρονιά.
  11. antonch
    ΚΑΛΗ ΧΡΟΝΙΑ ΜΕ ΥΓΕΙΑ ΣΕ ΟΛΕΣ ΚΑΙ ΟΛΟΥΣ.
    Για ακόμα μια χρονιά και εγώ όπως και αρκετοί ακόμα έλαβα το email που με ενημέρωνε ότι συνεχίζω να είμαι MVP στον SQL Server. Τι καλύτερο να γιορτάσω την ανανέωση αυτή με ένα post.
    Το τελευταίο καιρό ασχολούμαι συνεχώς με τον SQL Server 2012 και παρακολουθώ πολλά γύρω από αυτόν. Κατά μια διαολεμένη σύπτωση το BI του SQL Server είναι στην καθημερινότητα μου όλο και περισσότερο, όχι βέβαια ότι με χαλάει.
    Βρέθηκα στην ανάγκη για λόγους “πειραματικούς” να στήσω σε σχεδόν παραγωγικό περιβάλλον τον SQL Server 2012 RC0 και έπρεπε να μεταφέρω αρκετά SSIS Packages που είχα φτιάξει στην προηγούμενη έκδοση.
    Η εμπειρία είναι πραγματικά smooth and easy αρκεί να ακολουθήσεις τα πέντε παρακάτω tips που υπάρχουν στο άρθρο αυτό και είναι μέσα από την ομάδα του SSIS. Για το λόγο αυτό σας τα δίνω όπως έχουν με την επισήμανση ότι αυτά δίνονται από την ομάδα σαν AS IS.
     
    TIP #1: Edit Package Configuration and Data Source after upgrading

    The first step to upgrade an SSIS solution is to run the SSIS Package Upgrade Wizard. The SSIS Package Upgrade Wizard makes appropriate changes to package properties and upgrades the package format.
    The wizard launches when you open a pre-SQL Server 2012 package in the SQL Server Data Tools for the first time. SQL Server Data Tools replaces (BIDs). The wizard can also be launched manually by running SSISUpgrade.exe, which is located under %ProgramFiles%\Microsoft SQL Server\110\DTS\Binn.
    It is critical to note that the SSIS Package Upgrade Wizard does not upgrade settings such as connection strings that are defined in the package configurations. After a package upgrade, you may need to make some manual changes to the package configuration to run the upgraded package successfully.
    For example, you have an SSIS 2005 package. The package uses an OLE DB connection manager to connect to the AdventureWorks database in a local SQL Server 2005 instance. The package also uses an XML package configuration file to dynamically configure the ConnectionString property of the OLE DB connection manager. The following shows the contents of the XML package configuration file.

    You have set up a machine with a standalone SQL Server 2012 installation. You move the SSIS 2005 package to the machine and run the SSIS Package Upgrade Wizard to upgrade the package to SQL Server 2012. When the wizard finishes, you need to manually change the provider name from SQLNCLI.1 to SQLNCLI11.1 in the XML package configuration file to run the upgraded package successfully. The wizard does not update package configuration files.
    If you don’t update the provider name in the configuration file, the file configures the OLE DB connection manager to use the SQLNCLI.1 provider that is the SQL Server 2005 Native Client Library. SQLNCLI11.1 is the SQL Server 2012 Native Client Library. Because the SQL Server 2005 Native Client Library is not included in SQL Server 2012, the following error message will appear when you open or execute the upgraded package on the machine where SQL Server 2012 is installed:
    The requested OLE DB provider SQLNCLI.1 is not registered. If the 32-bit driver is not installed, run the package in 64-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
    So, if your pre-SQL Server 2012 package uses any kind of package configurations, it is important to remember that you may need to manually update the content of the package configurations after you upgrade the package to SQL Server 2012. This applies to the different types of configurations, such as XML configuration files.
    Connection strings that require updates and are stored in data source files or set by expressions, need to be updated manually.
    TIP #2: Convert to project deployment model using Project Conversion Wizard
    SQL Server 2012 SSIS supports two deployment models: the package deployment model and the project deployment model. The package deployment model was available in previous releases of SSIS and is the default deployment model for upgraded packages. In this model, the unit of deployment is the package. The project deployment model is new in SQL Server 2012 and provides additional package deployment and management features such as parameters and the Integration Services catalog. The unit of deployment is the project.
    Please read Project Deployment Overview in SQL Server "Denali" CTP1 - SSIS (http://social.technet.microsoft.com/wiki/contents/articles/project-deployment-overview-in-sql-server-quot-denali-quot-ctp1-ssis.aspx ) for a detailed walk through as well as comparison between these two deployment models.
    Read Projects in SQL Server “Denali” CTP1 - SSIS (http://social.technet.microsoft.com/wiki/contents/articles/projects-in-sql-server-denali-ctp1-ssis.aspx) for a thorough explanation of the new project concept.
    To convert a package to the project deployment, right click the project in Solution Explorer and then click Convert to Project Deployment Model. The Project Conversion Wizard launches and walks you through the conversion process.

    TIP #3: Update Execute Package Task to use project reference and use parameter to pass data from parent package to child package
    If an SSIS package contains an Execute Package Task, the Project Conversion Wizard prompts you to update the task to use the project reference.
    For example, your SSIS project contains several packages. Inside the project, one package (typically called the parent package) runs another package (typically called the child package) by using an Execute Package Task. In Pre-SQL Server 2012 releases of SSIS, the parent package references the child package by using a File connection manager. At deployment, you need to remember to update the File connection manager to ensure that it points to the new location of the child package.
    In SQL Server 2012 Integration Services you can configure the parent package to reference the child package by name when the child package is included in the same project as the parent package. Using this project reference makes the deployment experience much smoother. You don’t need to remember to update the reference between the parent package and the child package at deployment. For a thorough explanation of the project reference in the Execute Package Task, please see Changes to the Execute Package Task (http://blogs.msdn.com/b/mattm/archive/2011/07/18/changes-to-the-execute-package-task.aspx).
    In previous releases of SSIS, you pass data from the parent package to the child package by creating a package configuration that uses the parent variable configuration type. This enables a child package that is run from a parent package to access a variable in the parent.
    It is recommended that you configure the Execute Package Task to use parameter binding to pass data from the parent package to the child package. Parameters make this task easier. For example, you want a parent package to dynamically determine the number of days in a current month and have the child package perform a task for that number of times. You can create a variable in the parent package that represents the number of days and create a parameter in the child package. Then in the Execute Package Task, you bind the parameter in the child package to the variable in the parent package.

    Please read Parameters in SQL Server “Denali” CTP1 - SSIS (http://social.technet.microsoft.com/wiki/contents/articles/parameters-in-sql-server-denali-ctp1-ssis.aspx) for a description of parameters and the numerous benefits they offer.
    TIP #4: Parameterize PackageName property of Execute Package Task to dynamically configure which child package to run at execution time
    Suppose your SSIS 2008 package has an Execute Package Task, and the package uses a File connection manager to connect to a child package. You dynamically assign which child package the Execute Package Task runs by configuring the connection string property of the File connection manager.
    The following is the content of the XML package configuration file used by your SSIS 2008 package.

    When the Project Conversion Wizard converts the package to the project deployment model and updates the Execute Package Task to use the project reference, the File connection manager that was used to connect to the child package is no longer used by the Execute Package Task. To continue to dynamically determine which child package the task runs, you create a parameter and map that parameter to the PackageName property of the Execute Package Task as shown in the following image.

    TIP #5: Convert package configuration to parameter when possible
    Parameters are new to SQL Server 2012 Integration Services and are the replacement for package configurations. You use parameters to assign values to package properties, whether at design time or run time. The values are pushed to a package when it is executed rather than having the package pull values from the package configurations.
    The Project Conversion Wizard prompts you to optionally convert package configurations to parameters. It is possible that you might choose to keep a package configuration as an intermediate step of upgrading to SQL Server 2012. When your package has both configuration values and parameter values, it is important to understand the order in which these values are applied. Package configuration values will be applied first. If there are also parameter values for the same properties, these values will be applied next and will overwrite the package configuration values.
  12. antonch
    Για να δείτε την μαγνητοσκόπηση κάντε click εδώ
    ή επισκευθείτε το www.techdays.gr και αναζητήστε την με το tag SQL Saturday Nights
  13. antonch
    By Sylvia Moestl Vasilik, 2009/06/22
    Μου άρεσε πάρα πολυ και τα αναδημοσιεύω όπως έχει.
    So ... Bob's left the company to move back east, and you're the new lead database developer on the database. Or, the third-party company to which the maintenance has been outsourced is no longer working on it, so it's yours now. One way or another, you need to take over a database system that you had no part in developing. It's not in good shape, and there's not many resources for you to tap.
    What do you do?
    I've been faced with this situation a few times now, and have developed a list of some of the things that have helped me the most, both in getting productive, and in bringing the database system up to par.
    Backups
    Make sure that backups are happening. I'm assuming here that you're the database developer, and not the database administrator. However, just as minimum check, make sure that backups are occurring regularly. Ideally you should successfully restore the backup somewhere else.
    Research
    Look at the database. Go through and get an idea of the table structure, what the largest tables are by size, what the most commonly used stored procedures are, if there are jobs, and what documentation there is. Read through some the stored procedures. You may find it useful to create a quick and dirty database diagram if there isn't one, using the built in diagramming tool in SQL Server. This can also be a good visual aid when you talk to other people.
    Talk to the former developers
    This may not be an option, but try hard to have a least a few friendly interviews with the former developers. This is not the time to make comments like, "I can't believe you guys did [insert bad development practice here]". You don't know the history- maybe it was that way when they got the system. You'll want to get as much information as they can give you on current issues, items on this list, etc. Keep things friendly - and maybe try to get their cell number in case of questions. A good relationship with former developers can go a long way.
    A bug database
    Is there a bug database - somewhere that bugs (and sometimes enhancement ideas) are tracked for this system? This is certainly one of the things that you want to set up, if it's not there currently. I've always been lucky enough to work at companies where bug tracking was taken seriously, and there were systems already in place that I could just plug into. If there's no bug database, time to do some research. I wouldn't suggest reinventing the wheel here, since there's a lot of good systems out there -- just use what's available.
    Source code control
    Is the code in some kind of source code control system, such as VSS or Perforce? If it is -- is everything up to date? I'm going to hazard a guess that it's either not in source code control, or it hasn't been kept up to date. That's been a big task for me when starting work on inherited systems. There's a number of tools with which to tackle this. In the past I've used a custom written Perl tool that used SQL DMO, but I won't go into detail -- that's the topic of another article. If nothing else, you could use the built in tools that SQL Server provides to script out your database objects, and check them in. Once you have everything checked in, try running a database build from the checked in code, and compare it to production. Also -- make sure you have a good system to keep all the code updated!
    Talk to the users and/or business owners
    Sit down and have some conversations with the users. This is a good opportunity to get to know their problems and concerns, the improvements they would most like to see, and where things are heading in the future. You want to make sure that this database is sticking around, that it's not going to be replaced with a third party product or anything like that. If you're going to put a lot of work into improving the system, you need to know that your efforts are going to pay off for the business. Also-you'll probably be spending lots of time on issues that are important to a well-run database system (a bug database, source code control, etc), but that won't give them any new features. Make sure they understand this.
    Establish credibility with the users by fixing a few things or making some enhancements
    Even though you'll probably be needing to spend a lot of time on tasks like setting up source code control, bug tracking, etc, you don't want to do this exclusively. From talks with users, hopefully you've identified enhancements or bug fixes that you could get out quickly. Do what you can here. This is a great way to establish credibility with them. Let them know, too, that once you have the systems in place, bug fixes and enhancements will be much easier to roll out.
    Create a development environment
    If you don't have a development environment, but code still needs to be written, where are the developers going to write and test their code? I hate to tell you, but if they have access, they'll write and test in the production environment. So you may have stored procedures called CampaignEmailExport_TEST hanging around (and never getting deleted). Or -- oops -- you may accidentally overwrite the production version with your new version, and then it runs and causes hundreds of thousands of emails to be sent where they weren't supposed to. Not that I've ever heard of this happening. This kind of problem can go a long way towards convincing users that time and money needs to be spent on working on setting up a good foundation.
    For the development environment-you may be able to just get a backup from production, and set it up on another server. If it's too large, you might need to be creative. Whatever you do, don't develop or test in the production environment.
    Drop obsolete objects
    In a system that hasn't been maintained very well, it's likely that there are a lot of database objects out there that aren't being used. They may have suffixes like 'temp' or 'bak' on them. It can be hard to identify all of these, and you may be tempted to just leave them. However, they can cause a number of problems:
    They make it difficult to figure out what the actual working code base is. If you have a lot of duplicate, backup, "working" or "temp" objects, you don't know what your code base is like, and how complex it is. Supposed you'd like to drop a tables because it's huge, and looks like it hasn't been updated in a long time, but it turns out that they're being used by stored procedure X. If it turns out that stored procedure X is never used, but you're keeping it around in the database anyway, then you've just lost this opportunity to enhance your code because of an obsolete stored procedure. This kind of issue, multiplied by all the obsolete objects that are in the database, can cause development to be very slow, or even grind to a halt. Finally...
    There's potentially months and months of work if you start from scratch on all of the above. It'll require good judgment on what to prioritize, where to start, and how much time to spend on all the tasks that need doing. And perhaps you're not in a position to set all the priorities. But it can be worthwhile and fun to streamline and tune-up a database that just needs a little work to become a well-oiled machine, requiring much less development time.
    Thanks for reading! I welcome feedback in the form of comments, and may post an update to this article with the best suggestions and comments.
  14. antonch
    At the PASS Summit 2009 last week, Ted Kummert announced the soon-to-be-delivered November SQL Server 2008 R2 Community Technology Preview. We’re happy to announce that it is available today for MSDN and TechNet subscribers and it will be available to the general public on November 11th. Go to http://www.microsoft.com/sqlserver/2008/en/us/R2.aspx to get more information and to download!
  15. antonch
    O Roger Doherty, Sr. Technical Evangelist for SQL Server, τον οποίο είχα την τιμή να τον γνωρίσω και να μιλήσω αρκέτα μαζί του στη τελευταία επίσκεψη μου στο Microsoft Campus το 2008, ανακοίνωσε στο blog του την διαθεσιμότητα του SQL Server 2008 R2 Update for Developers Training Kit.
    Τα περιεχόμενα του Kit είναι ενδιαφέροντα και τα παραθέτω όπως ακριβώς τα έχει ο Roger στο blog του.

    SQL Server 2008 R2 offers an impressive array of capabilities for developers that build upon key innovations introduced in SQL Server 2008. The SQL Server 2008 R2 Update for Developers Training Kit is ideal for developers who want to understand how to take advantage of the key improvements introduced in SQL Server 2008 and SQL Server 2008 R2 in their applications, as well as for developers who are new to SQL Server. The training kit is brought to you by Microsoft Developer and Platform Evangelism.
    Overview and Benefits
    The training kit offers the following benefits:
    Learn how to build applications that exploit the unique features and capabilities of SQL Server 2008 and SQL Server 2008 R2. Provides a comprehensive set of videos, presentations, demos and hands-on labs. Contains new content for developers who are new to SQL Server. Contains new content for SQL Server 2008 R2. Contains all of the existing content from the SQL Server 2008 Developer Training Kit. Easy to download and install.
    Intended Audience
    The training kit is designed for the following technical roles: Developers who build applications for the Microsoft platform. Microsoft evangelists, technical specialists and consultants.
    Contents
    The training kit includes the following content: Videos (8) SQL Server 2008 R2 Update for Developers Overview Part I - SQL Server 2008 Review SQL Server 2008 R2 Update for Developers Overview Part II - Introducing SQL Server 2008 R2 Introducing SQL Server 2008 R2 StreamInsight Demo: Real Time Analytics with SQL Server 2008 R2 StreamInsight Introducing SQL Server 2008 R2 Application and Multi-Server Management Introducing SQL Server 2008 R2 Reporting Services Introduction To SQL Server 2008 R2 StreamInsight and Complex Event Processing Introducing PowerPivot for Excel 2010 and SharePoint 2010 Presentations (8) SQL Server 2008 R2 Update for Developers Overview Part I - SQL Server 2008 Review SQL Server 2008 R2 Update for Developers Overview Part II - Introducing SQL Server 2008 R2 SQL Server 2008 Filestream SQL Server 2008 Spatial SQL Server 2008 T-SQL SQL Server 2008 Date and Time Types SQL SErver 2008 SQLCLR SQL Server 2008 Reporting Services Demos (13) AdventureWorks Racing All-Up SQL Server 2008 Demo SQL Server 2008 All-Up Spatial Demo SQL Server 2008 Spatial Types Demo Intro to SQL Server 2008 Filestream Demo SQL Server 2008 SQL CLR Nullable Types Demo Programming with SQL Server 2008 Filestream Demo SQL Server 2008 Reporting Services Web Application Integration Demo Date and Time Support in SQL Server 2008 Demo SQL Server 2008 T-SQL Table-Valued Parameters Demo SQL Server 2008 T-SQL Row Constructors Demo SQL Server 2008 T-SQL Grouping Sets Demo SQL Server 2008 T-SQL Merge Demo Hands-on Labs (8) How to build your first Web Application with SQL Server and ASP.NET Using SQL Server 2008 Spatial Data in TSQL Using SQL Server 2008 Spatial Data in Managed Code Using SQL CLR in SQL Server 2008 PowerPivot in SQL Server 2008 R2 Using the New Features of Reporting Services 2008 R2 Introduction To SQL Server 2008 R2 StreamInsight and Complex Event Processing Data-tier Applications in SQL Server 2008 R2 and Visual Studio 2010 Το SQL Server 2008 R2 Update for Developers μπορείτε να βρείτε για download εδώ.
  16. antonch
    Εισαγωγή
    Αν και δεν είμαι αρκετά σίγουρος ότι όλοι έχουν καταλάβει ότι θα πρέπει να αποφεύγουν όπως ο διάολος το λιβάνι τα implicit conversions εντούτοις αυτό είναι κάτι γνωστό και πηγή δεινών αν αυτό γίνεται στην T-SQL. Υπάρχουν αρκετά άρθρα που το αναφέρουν αυτό και με αυτό το post θα συμπληρώσω και εγώ ακόμα ένα παράδειγμα με σκοπό μήπως και κάποιοι συνετιστούν και σταματήσουν να το κάνουν.
    Αυτό το post αποφάσισα να το γράψω μετά από ένα πραγματικό γεγονός που έγινε σε πραγματικό περιβάλλον εργασίας και το οποίο δημιουργούσε αρκετά προβλήματα.
    Για να γίνει κατανοητό αυτό ας έρθουμε να δούμε ένα παράδειγμα και για αυτό το λόγο ας έρθουμε να φτιάξουμε μια βάση με ένα πίνακα που θα παίξει το ρόλο του πειραματόζωου και θα είναι ένας πίνακας πελατών όπου η απόφαση που έχουμε είναι να υπάρχει το ΑΦΜ σαν σημείο αναφοράς για το record άρα και primary key. Σε αυτόν θα βάλουμε 10.000 rows. Όλα αυτά μπορούν να γίνουν με τα παρακάτω script
    περισσότερα
  17. antonch
    Πριν τις καλοκαιρινές μου διακοπές είχα ένα τμήμα στο οποίο έκανα μάθημα όλη την σειρά σεμιναρίων του SQL Server 2008 R2. Το τμήμα αυτό είχε συναδέλφους που ήταν αποκλειστικά Oracle DBAs και Devs. Κατά την διάρκεια των σεμιναρίων είχα αρκετές ερωτήσεις του στυλ στην Oracle κάνουμε αυτό στο SQL το κάνουμε και πώς το κάνουμε. Από μια σύμπτωση η σειρά το σεμιναρίων ήταν πρώτα το administration, και μετά το programming και μετά το σεμινάριο με την T-SQL.
    Μια ερώτηση που τέθηκε από την πρώτη μέρα από όλους αλλά ειδικά από τον Τ (ας τον πούμε έτσι για λόγους ανωνυμίας) ήταν αν ο SQL Server έχει cursors. Επειδή το θέμα θα το βλέπαμε διεξοδικά στο τελευταίο σεμινάριο, αλλά είναι και ένα θέμα που χωράει μεγάλη κουβέντα και ανάλυση του απάντησα όπως απαντώ όταν δεν έχω αρκετό χρόνο στην διάθεση μου ότι ναι έχει αλλά προσπαθούμε να τους αποφύγουμε.
    Φυσικά η απάντηση μου αυτή δεν άρεσε σε κανένα συμμετέχοντα καθώς παιδιά της Oracle τα κάνουν όλα με cursors. Εξήγησα ότι θα το εξετάσουμε το θέμα όταν έρθει ή ώρα του. Το δέχθηκαν και συνεχίσαμε ομαλά. Φυσικά ο φίλος Τ πάντα ρωτούσε με cursor μπορώ να κάνω αυτό ή αυτό το κάνω πανεύκολα με ένα cursor όταν έδειχνα κάτι. Για να μην πλατειάσω στην εισαγωγή η απάντηση μου ήταν σταθερά η ίδια και φυσικά αυτό έκανε τον φίλο T έξαλλο (μέχρι που ήρθε η στιγμή και τους εξηγήσαμε αναλυτικά και ηρέμησε).
    Αν ψάξουμε στο internet ή ρωτήσουμε ανθρώπους που ασχολούνται με τον SQL Server το σύνηθες είναι να διαβάσετε ή να ακούσετε ότι δεν είναι καλό στον SQL Server να χρησιμοποιούμε cursors γιατί
    καταναλώνουν αρκετή μνήμη, έχουν μεγάλο I/O, είναι αργοί σε απόκριση/ταχύτητα είναι κακός προγραμματισμός. Τελικά ισχύουν όλα αυτά; Είναι τόσο κακοί οι cursors που δεν πρέπει να τους χρησιμοποιούμε;
    Η αλήθεια είναι ότι οι cursors έχουν την φήμη αυτή γιατί έχουν κακοχρησιμοποιηθεί από junior devs ή από ανθρώπους που αγνοούν παντελώς την T-SQL γλώσσα και απλά κάποιος τους έδειξε τυχαία αυτό και το χρησιμοποιούν σαν ευαγγέλιο.
    Αν για παράδειγμα πούμε ότι είναι κακός προγραμματισμός τότε όλοι οι devs του SQL Server στην Microsoft είναι κακοί προγραμματιστές καθώς αν κάνουμε το παρακάτω query
    use master
    go
    select distinct id from sys.syscomments where text like '%cursor%'
    go

    θα δούμε πάνω από 200 system stored procedures και functions να κάνουν την χρήση cursor. Είναι όλοι αυτοί κακοί προγραμματιστές; Δεν το νομίζω…


    Πολλοί, μέσα σε αυτούς και εγώ, πιστεύουν ότι οι cursors υπάρχουν καλώς μέσα στον SQL Server αρκεί να γνωρίζουμε το πως δουλεύουν καθώς είναι απαραίτητοι για εργασίες όπως



    dynamic operations που δεν μπορούν να υλοποιηθούν με set-based operations,

    είναι εύκολοι στην κατανόηση και εύχρηστοι,

    προσφέρουν την γραμμή-γραμμή επεξεργασία,

    είναι ιδανικοί για scrolling ενός μέρους από ένα μεγάλο result set.


    Όμως έχουν και μειονεκτήματα όπως



    προσφέρονται για quick & dirty προγραμματισμό ειδικά από junior developers αλλά και από αυτούς που έμαθαν κάτι τυχαία και το έχουν κάνει ψωμοτύρι,

    εξαιτίας του ότι είναι memory resident set of pointers καταναλώνουν μνήμη,

    είναι γρηγορότεροι από ένα while loop αλλά έχουν περισσότερο overhead,

    όταν δεν ξέρεις πώς να τους χρησιμοποιήσεις τους χρησιμοποιείς με λάθος τρόπο και γράφει και λάθος τον κώδικα σε αυτούς.


    Δόξα το Θεό τα BOL του SQL Server περιγράφουν λεπτομερέστατα του cursors και δεν χρειάζεται να κάνω μια διεξοδική αναφορά σε αυτό το post.


    Αυτό που θα κάνω όμως είναι να εστιάσω την προσοχή σας στο πως δηλώνω ένα cursor με την παρατήρηση ότι υπάρχουν δύο συντάξεις η ISO και η T-SQL Extended, σας προτείνω να το διαβάσετε αναλυτικά και με προσοχή ιδιαίτερα την T-SQL Extended εκδοχή.


    Γνωρίζοντας τα παραπάνω θα είστε σε θέση την επόμενη φορά να χρησιμοποιήσετε σωστά τους cursors δηλώνοντας το σωστό cursor option με το οποίο θα χρησιμοποιηθεί ιδανικά τόσο η tempdb όσο και η μνήμη του συστήματος σας χωρίς να υπάρχουν performance penalties. Είναι τόσο απλό….


    /*antonch*/
  18. antonch
    Επειδή μερικά πράγματα πρέπει να τα κλείνεις γρήγορα έτσι σήμερα με αυτό το post θα καλύψω μια από τις υποσχέσεις που έδωσα στο τελευταίο μου post και θα μιλήσω σε αυτό για τις βελτιώσεις που έχουμε για auditing στο SQL Server 2012.
    Αρκετά σημαντικό για όσους είναι υποχρεωμένοι από την φύση της δουλειάς τους να έχουν κάτι τέτοιο αλλά και όχι μόνο για αυτούς καθώς ουκ εστίν ο αριθμός των περιπτώσεων που όλοι μας κάτι θέλουμε να έχουμε σε auditing για καλύψουμε την πλάτη μας αποδεικνύοντας, όταν χρειάζεται, ότι δεν είμαστε ελέφαντες με ροζ προβοσκίδα.
    περισσότερα
×
×
  • Create New...