VSTSC's Community Server

Community Server: The platform that enables you to build rich, interactive communities.
VSTeamSystemCentral: Your Team System community!

Welcome to VSTSC's Community Server Sign in | Join | Help
in Search

Tim Benninghoff

A SQL Server DBA attempts a personal IT project and documents the (mis)adventures.

  • Best Thing I Learned at PASS Summit

    PASS, the Professional Association of SQL Server, is currently holding a contest, looking for people to blog or email them about the best thing they learned at a PASS Summit they've attended.

    Networking: it's not just for sleezy marketing types.  Hmmm.  Perhaps.... Networking: it's not just for people looking for a new job.  Let's just say that before attending PASS I had some preconceptions about what 'networking' was based on the ugliest parts of it that I'd seen.  I don't wish to sound like I'm diminishing the value of the sessions that I attended, because I learned a ton that I could take back to my job, but I think the biggest value for my company from PASS was that the network of SQL Server professionals I met at the conference pays off every day.

    Combined with technologies like email, RSS feeds, and Twitter, I have instant access to hundreds of smart SQL Server professionals who can answer a question I have.  Or, they may be talking about some topic I don't know I need to know about yet, and I find myself curiously prepared when the crisis comes.  And those professionals are of every type, from the luminaries of SQL Server to the folks just like me, solving the same problems I’m facing.

    There’s nothing stopping you from connecting to those people outside of a conference via the internet, but, if I may be so bold, your primate DNA means your connection to that community is going to be ever so much stronger if you've had face time instead of just connecting through some glowing rectangle.  I hope I can help them as much as they help me daily.

     

     

  • Islands with WiFi

    Recently I was tagged by Jeremiah Peschka with a question that goes a little something like this:

     "So You’re On A Deserted Island With WiFi and you’re still on the clock at work. Okay, so not a very good situational exercise here, but let’s roll with it; we’ll call it a virtual deserted island. Perhaps what I should simply ask is if you had a month without any walk-up work, no projects due, no performance issues that require you to devote time from anything other than a wishlist of items you’ve been wanting to get accomplished at work but keep getting pulled away from I ask this question: what would be the top items that would get your attention?"

    By comparison of an impromptu poll at some webcast the other month which I don't remember, where I work is towards the low end of # of servers/DBA.  Still, for numerous reasons, we don't have any 3rd party tools that help automate the monitoring of our SQL Servers, so alot of what we do is a combination of automation that we've built ourselves, manual monitoring when necessary, and prioritizing the machines that need the highest level of scrutiny.

    If I had this mythical month, I'd reinforce my monitoring web along a 3-part strategy, making every effort to use it as an opportunity to learn new technologies or skills.

    Alerts

    When something goes horribly wrong, the DBAs need to know about it right away, and preferably in advance of the users.  All of our servers should notify us directly of any catastrophic errors, and if applications have database functionality that requires high availability, these components should notify the DBAs when they break.  I'm happy to say that I'd have very little work to do in this area.

    Reports

     In this arena, we have a fair number of gaps, and I could easily see myself spending quite a bit of time in my 'free' month shoring up our reports and initiating the collection of metrics for historical analysis.  I like reports for a number of reasons.  They provide another line of defense for alerts and help identify any alerting components that haven't been configured properly.  They help us identify the beginnings of issues so that we can intervene on them before they become alerts.  They help us know our systems better.  But, the type of reporting I'm referring to here is really only real-time, or over a window of time no longer than a month, and most likely just within the last 24 hours.

    The chief technologies I'd leverage for this aspect of monitoring would be PowerShell and SQL Server Reporting Services.  I like PowerShell because of the ease with which I can use it to connect to many different sources of information, like the OS, hardware, SQL Server instances, AD, etc., and I like Reporting Services for the presentation layer to make the data I collect via T-SQL and PowerShell look pretty.

    Analysis and Forecasting

     In this final layer, I'd start storing the data I'm gathering from my real-time or near real-time reports so that I can make more accurate long term projections about disk space needs, resource usage, user connections, and peak-use times, to name a few.  And, I'd be able to analyze historical trends to confirm or reject the notions that we currently have about our systems.

     Uhh....

     I know that to some of you the monitoring I've described above are things that you already have in place and couldn't live without.  In fact, you may think that not having these things in place borders on criminally negligent.  Well, for us, most of the systems that use SQL Server are secondary systems, at best.  Yes, they are still important, but most of them could tolerate outages of a day or more without adversely impacting the business.


     

    To keep the question alive, I'd like to tag Stuart over at codegumbo, Trevor Barkhouse, who helped me immensely with a tricky PowerShell scripting question recently, and Chad Miller, who continues to lead the way on using PowerShell with SQL Server.

  • Despite my best intentions...

    Honestly, I was all set to blog more frequently, and then disaster struck.  My home desktop, the one on which I do most of my hobbies and tech stuff after work, had died a hard death thanks to the failure of my video card.  I had no on-board video to save me, and, to make matters worse, I couldn't even make a remote desktop connection into the machine.  The failure had been so bad that the abrupt power shutoff of the entire machine had corrupted my Windows install.  The only course of action left to me was to live without access to my machine, survive on the laptop that my wife had bought me one Christmas, even though my ownership of that machine is more akin to Marge's Bowling Ball.

     Fortunately, a couple months earlier I had been talking on twitter with a person or two about home backup strategies, and I had bravely professed that I didn't really back up files at home because, well, I didn't have anything that important to back up.  And then I remembered the bazillion digital photos that my wife has taken of our daughter and stored on my desktop, and I imagined the long, sleepless nights on a couch should anything happen to them.  That evening I quickly ordered an external backup drive, sought some advice on twitter about free backup utilities, and implemented my own daily backup strategy thanks to SyncToy 2.0 and Western Digital.

    So, here we are, months later.  The desktop failed, and while I remain confident that I'll be able to retrieve all of my files from the original hard drive, I still have access to all of the important files thanks to my external hard drive.  And, I got to be the hero when I told my wife she had not lost an entire batch of photos that she'd just uploaded to the computer a couple days prior to the failure.  Don't get me wrong.  Hardware failures still suck, and I'm still pulling together pieces to fix my desktop and considering a new box, but a personal backup strategy can take away some of the sting.

  • Books Online and securityadmin

    Sometimes Books Online really ruffles my feathers, and this is one of those times.  We have a separate security department that handles our IT security.  They'd like to have their accounts be able to just administer the security on our SQL Server boxes, and not have to worry about the tremendous responsibility of having sysadmin and the ability to do...well, everything.  So, having read up on fixed server roles in SQL Server 2005 recently, I said 'What about securityadmin?'  They said they'd tried it, but couldn't seem to do what they needed to be able to do, but they couldn't remember the specifics about what it was they weren't able to do.

     So, I went back to BOL and checked the entry on securityadmin to make sure I wasn't imagining things when I'd read that security admin could "also GRANT, DENY, and REVOKE database-level permissions".  Awesome, that sounded pretty close to what i needed.  So, I fired up my test SQL Server 2005 environment, created a securityadmin login, and then logged into the Object Explorer as my test securityadmin user.  I navigated to one of my test databases and tried to expand it and was met with the decidely unpleasant "The database X is not accessible (ObjectExplorer)" error.

     Not so easily defeated, I started a query, and tried to navigate to my test database.  I could select it from the dropdown list, but I always ended up back in master.  Yuk.  Attempting to USE X ended up with the "The server principal "<name>" is not able to access the database "X" under the current security context" error.

     OK, fine.  I'll give my fine securityadmin login a user in the database, and then surely it will be able to exercise it's vaunted ability to GRANT, DENY, and REVOKE database-level permissions; and that's just what I did, and it was able to do so.

    You might be asking yourself, "What's Tim's beef?"  Simply this, while the BOL entry is technically correct, to me it seems a little absurd that a login would have certain permissions at the database-level even while they have no permissions to connect to any database.  And, well, perhaps my own belief about what a fixed-server role called 'securityadmin' should be able to do on a server colored my opinion.  I mean, shouldn't the role be able to administer security entirely on the server?  Should it not only be able to create logins and grant them server-level permissions, but also be able create users in any database and grant them database-level permissions?

    So, I fear the security administrators will just have to carry the yoke of awesome responsibility that we DBAs must also bear.

  • PowerShell and WMI namespaces

    When I wrote my previous blog post about blogging, I remembered how much of a sucker for the concept of recursion I'd become, even though it still bewilders me,  after I'd read Godel, Escher, Bach: An Eternal Golden Braid by Douglas R. Hofstadter.  I'd refer to it familiarly as GEB if I had a pointier head.  Alas, my head is too round, and full of mush, and so I'm left to contemplate whether irony isn't a form of recursion in itself.  I like irony.

    Anyway, the other day I was searching the webz for a way to explore all of the WMI namespaces that are available on my machine, and I came across this PowerShell script that creates a GUI for exploring WMI namespaces.  It's an awesome script, but I'm still wickedly amused by the idea of using PowerShell, something that at least partially was made accessible to get away from GUI administration, to create a GUI interface.  Yes, yes, I know there's much more to PowerShell than that, but let me have my cheap thrills.

    Anyway, if you, like the Incredible Hulk, think that 'GUI BAD!!!', then you can find out what WMI namespaces are available by getting the root namespace, and then looking at the __Namespace class, something like this:

    gwmi -namespace "root" -class "__Namespace" | Select Name

    Of course, as with most things PowerShell, there's more than 1 way to complete a task.  If you've had a long day in PowerShell and find yourself pining for T-SQL, why not use a little WQL, or SQL for WMI, to find out the same information?

    Get-WMIObject -namespace "root" -query "SELECT * FROM __Namespace" | Select Name

    So, armed with the namespaces, what can you find out?  Well, only what classes are in that namespace to explore, as the Powershell.com folks helped me figure out.

    gwmi -namespace "root\WMI" -list

    Got a favorite WMI class?  I'm kind of partial to Win32_PingStatus and Win32_Service from the default namespace CIMV2 at the moment.  I'm sure I'll have a different favorite tomorrow.

  • Blogging about blogging

    Here I am, about 5 months into blogging in 2009, and I find myself unsatisfied with the frequency with which I update this blog.  Sure, there is some content with which I am well pleased, but I just can't seem to understand why I can barely reach the 1 post-a-week goal I had set for myself back in January.  What gives?

     So, over the past 2 weeks I started to seriously think about the entire process I use to decide whether to blog about a subject or not, and I realized that I ask myself a number of questions whenever an idea for a blog post floats through my grey matter.  The questions go something like this:

    Has it been blogged already?  If I google the subject, will I find the answer out there already?  Am I contributing to the discussion in any way, or just adding to internet detritus?

    Opinions are like....   Everyone's got an opinion.  What makes mine so special?  If I can't come up with an angle, I won't post it.

     Would I want to read about that?  If I were a follower of my own blog, would I want to read what I'd posted?

    And I find that, while on any given day I can usually come up with 3 or 4 ideas that might make a passable blog post, most of them never make the cut because they can't make it through the preliminary examination questions.  I'm not terribly satisfied by that result.

    Yes, the internet is one giant data store, but even those of us with the greatest of google-fu know that it is sometimes very difficult to find an answer to a particular question.  And, if you'd bear with my poetic license for a moment, data and information isn't just a reservoir we go to when we need something, it's the stuff we swim through.  It's the conversation I had today with my wife about carbohydrates, it's the facebook message I got from an friend about a place we used to both work, it's the question someone asked on Twitter about SQL.  And so, dealing with data is both a combination of looking for it, and it finding us when we least expect it.  When I self-limit what I blog about, am I preventing data from finding someone?

     So, as a warning to my kind readers, I think I'm going to experiment for a month by NOT asking myself those little questions about whether now is a time to blog, and see if that gets me to a happier blogging place.  Pardon the dust.

  • Creating a Reporting Services rdl from PowerShell

    It's no small secret that I'm a big fan of using PowerShell to manage SQL Servers.  I've gone through all the trouble of loading the SQL Server assemblies and/or configured PowerShell to use the SQL Server provider, and I've jumped into SMO, sometimes to much joy, and sometimes to much sorrow.  But, the other day I started to wonder, 'Where's the object model for Reporting Services?  And, being a big fan of the Script method from SMO, can I script out an rdl of a report?'

     I started digging deeper, and sadly I could find no assembly or aspect of the SQL Server provider that would grant me easy(?) access to the Reporting Services objects.  So, I hit the documentation to find out why.

    As Books Online was eager to point out, Reporting Services is fundamentally a web service that is accessed via the Simple Object Access Protocol (SOAP) over HTTP.  Huh?  Well, our friend BOL tries to explain further, stating that the web service has endpoints that you can connect to in order to either kick off reports or manage your report server.  So, great, how do I connect to a web service?

    The internet abounds with suggestions, most of which revolve around using the Visual Studio and the .NET Framework's SDK in order to create a WSDL in order to create a proxy of the web service, thereby gaining access to the objects and the methods therein.  And, as I read those suggestions, I began to empathize, ever so briefly, with developers who must likewise look at relational databases as if there were some sort of horrible, horrible spawn of darkness.  Mainly, though, I was wondering how I was going to get around this problem without having to hit up my boss for a license to Visual Studio, and then spending hours to learn the ins and outs of web services, proxies, and using the great and glorious WSDL.exe to create a WSDL file.

     But, thankfully, the PowerShell community generally rules, and I was able to find a nifty little PowerShell script by Oisen Grehan which allows me to create a proxy to my Reporting Services without all the aforementioned yuckiness.  So, having downloaded the script, scanned it for a basic understanding of what's going on, and then placed it in my trusty C:\PowerShell directory, I fired up PowerShell and ran the following:

    $url = "http://<myserver>/ReportServer/ReportService2005.asmx"
    $proxy = C:\PowerShell\New-WebServiceProxy.ps1 -Url $url -SoapProtocol Soap

    I provide my credentials at the prompt the script generates, and now, suddenly, I have access to information regarding the properties and methods I'm looking for on my Reporting Services installation with the simple yet powerful:

    $proxy | gm

    OK, great, so now we can access our Reporting Services objects, but what about generating that rdl for a report?  If I know the report name, including it's full deployed path of folders, I can use the GetReportDefinition method to get a byte array of the report:

    $report = $proxy.GetReportDefinition("/<path>/ReportName")

    And, then it's just a matter of converting that byte array to text, and writing it out to a file:

     [System.Text.Encoding]::ASCII.GetString($report) >> ReportName.rdl

    Still, I think it would be much nice if the SQL Server PowerShell provider made it possible to accessing Reporting Services as part of the SQLServer: PSDrive.

  • Object Limit and SQL PowerShell Provider Answered

    In a previous blog post I talked about being puzzled as to why I wasn't able to get, in my mind, accurate table counts for a database in SQL Server 2005 that had over 50,000 tables.  I kept getting only 1,000.

     With the help of Chad Miller, I've figured it out.

    To reiterate, when I had navigated to the PSDrive for the tables within one of my databases and had run the following command:

    (get-childitem *).count

    I got 1000, even though I clearly had more than 1000 tables in my database.  But, a curious thing happens when I alter the command slightly:

    (get-childitem).count

    I get the full 50,000+!?!?  So, what's going on?

    Well, it looks like one of the other global variables for the PowerShell provider,  SqlServerMaximumTabCompletion, is getting into the mix.  In my particular environment I have this set to 1000.  Coincidence?  Apparently not.  It seems that the use of the wildcard, *, is limited by this global variable, for when I change SqlServerMaximumTabCompletion to be equal to 0, which is unlimited, (dir *).count now returns the correct number of tables.

    Likewise, when I use wildcards to return a list of tables that contain a certain string in the name:

    get-childitem *ROLE*

    I now get all of the tables I'm expecting.

    It seemed counter-intuitive to me at first, but it seems to make sense because of the way the wildcard can be used in conjunction with tab completion.

  • SQL Quiz, WHAT?

    I was tagged in a blog post making the rounds based on the question, 'Who has been a great leader in your career and what made them a great leader?'

    I think I'll join the bandwagon on this way and politely decline on talking about great leaders in my career, except perhaps obtusely, and instead focus on what makes a great leader.  What makes a great leader?  In my mind, it's the following things:

     Advocacy

     A leader knows how to advocate for those he is leading, as well as advocating for the things that his followers truly believe are the right direction to go.

     A Good Listener

     No, this isn't a cheesy personal ad.  I think good leaders know how to listen to their subordinates and know when to rely on their technical expertise to help fill in holes in their own understanding of a situation.  Using this information, they are able to make good decisions on direction and set challenging, yet attainable goals.

    A Keen, Analytical Mind

    To me, a leader also has the ability to quickly identify a problem, either because they understand the inner workings of the technology, or the political situation, or because they've listened to their technical experts and know how to synthesize that information in order to make the best decisions.  Using this information, they figure out what needs to be done, they know how to direct the resources they have at their disposal, and, because they know their subordinates, they know what they need to do in order to inspire and motivate their employees.

    Trust

     This one is huge.  Leaders have to be trustworthy or everything else is pointless.  Don't do anything to lose trust.  It's really hard to get back.

     Connect on a Personal Level

     A good leader knows you.  They know what motivates you, they know your weaknesses, and they know how to get the best from you.  They know how to challenge you without overwhelming you.

     

    And, though I'm not tagging anyone further on this one, I PROMISE to tag at least one person next time one of these blog memes hits me.

  • Any Number You Want As Long As It's 1

    Any customer can have a car painted any colour that he wants so long as it is black. - Henry Ford in his autobiography "My Life and Work"

    SQL Server has a stored procedure for creating new SQL Agent jobs called sp_add_job, and this stored procedure has a parameter named @start_step_id.  However, when you try to create a new job with a start step other than 1, you get the following error:

    Msg 14266, Level 16, State 1, Procedure sp_verify_job, Line 75
    The specified '@start_step_id' is invalid (valid values are: 1).

    As the error indicates, and we can verify by digging into the code, sp_add_job also kicks off an undocumented stored procedure called sp_verify_job.  Looking at the code of sp_verify_job, we find this little nugget in the comments:

     For [new] MSX jobs we allow the start step to be other than 1 since
        --       the start step was validated when the job was created at the MSX

     Since I've never been anywhere that created multiserver environments, I'll have to take their word for it, although I did begin to suspect that if you created a job on a master server using sp_add_job you'd only be able to start at step 1, and that this parameter is really just so that the multiserver environment can use it to migrate jobs around.

     What's my main point?  Documentation is our friend.  I shouldn't have to dig into a nested stored procedure to find out that there is really no way that I, a humble user, can take advantage of the @start_step_id, and I should in turn not subject my fellow database professionals to this sort of information chase.

     

  • Object Limit And SQL PowerShell Provider?

    One of the applications we have from a vendor has a SQL Server 2005 database with over 50,000 tables.  I was using the PowerShell provider for SQL Server to search through the tables to find any that had the word 'ROLE' in it using the following command:

    get-childitem *ROLE*

    But, in the results, only two tables where returned, and I was expecting plenty more.  In T-SQL I ran the following query:

    SELECT count(*) FROM sys.tables
    WHERE [name] LIKE '%ROLE%';

     This time I see that there are 133 tables in the database that have the string 'ROLE' in the name.

    I recalled reading a blog somewhere about folks hitting an object limit when returning objects from Active Directory in PowerShell, so I begin to wonder if there isn't some sort of configuration inside the PowerShell provider for SQL Server that lets you set a limit for get-childitem.  And, sure enough, there is a global variable called $SqlServerMaximumChildItems.  However, mine is set to 0, which means I should be returning an unlimited number of objects.

    I head back into PowerShell in the SQLServer:\Sql\<database>\<instance>\databases\<dbname>\tables\, and run the following statement:

    (get-childitem *).count

     1000?  What if I change the SqlServerMaximumChildItems global variable to 20 and try the count again?

    set-variable -name SqlServerMaximumChildItems -scope global -value 20

    Nope, the directory count still shows 1000.  What if I bump up the variable to 2000?  Directory count still shows 1000.

     I try writing out the list of table names to a text file, and only 1000 table names are written.  Does PowerShell have a 1000 object limit?  That doesn't seem right, and my internet searches can't find anything to even suggest that.  In fact, I use invoke-SQLCMD to select the table names from sys.tables again and I get all 50,000 objects.  What about SMO 10.0?  That doesn't seem right either.  Something about the way I setup PowerShell to work with the SQL Server Provider?  Is there a bug in the SqlServerMaximumChildItems global variable?

    Anyway, I tested it on another machine, and was able to reproduce the issue.

     I'm stumped.

  • My Plug for SQLPSX

    Chad Miller, one of my favorite bloggers on SQL Server and PowerShell, has just announced the release of version 1.5 of SQLPSX.  SQLPSX is a collection of functions, cmdlets, and scripts that make accessing SQL Server via PowerShell extremely easy.

    For example, normally, without even considering error handling, you'd have to write the following PowerShell code to get a SQL Server server object:

    $srv = new-object ("Microsoft.SqlServer.Management.Smo.Server") "YourServer"

    But with SQLPSX, you get that functionality, plus error handling, in the easy-to-use, easy-to-remember function, Get-SQLServer:

    $srv = Get-SQLServer "YourServer"

    I use only a fraction of what SQLPSX has to offer, but functions like Get-SQLServer save me so much typing and time I've modified my PowerShell profile to load the LibrarySMO.ps1 script whenever I startup PowerShell.

    I also recommend checking out Chad's great articles on PowerShell and SQL Server on SQLServerCentral.com, such as getting data out of SQL Server using PowerShell and loading data into SQL Server using PowerShell.

  • Thoughts On The Cloud

    Cloud computing is all the rage right now.  Many of the people I follow on Twitter, whose opinions I respect, are talking about it as the wave of the future.  Paul Nielsen made a bold prediction on his blog last monthBrent Ozar blogs about it frequently and appears pretty excited about it.  And, without a doubt, the news today about SDS is adding momentum to cloud computing.

     

    So, anyway, here I sit.  I'm in danger of slipping behind on my goals for 2009 to blog once a week.  I need a topic.  Why not cloud computing?

     

    I'm a DBA.  I'm in the IT trenches every day, and my job boils down to making sure that people have access to their data, and that their data is protected; from theft, from disaster, from accidents, from their own mistakes.  I work hard during the day, and I have enough interest in my craft to dedicate some of my personal time to it.  Here's cloud computing through my lenses.  You’ll need your own grains of salt.

     

     When You're A Hammer...

     

    Despite my best efforts, I’m not the creature of logic I strive to be.  And this is another one of those times when it’s very possible that my emotions are getting the better of me.  So, let me get the emotional part of my critique of cloud computing out of the way.  My instincts say it is not even going to come close to approaching the bold pronouncements of its major proponents, be they vendors or technology experts.  Why?  I’d counter that question with some questions for you.  How’s SOA working out for you?  How about offshoring?  Virtualization?

     

    These are just a few examples of recent IT ideas that, while they looked great on paper, have in no way been universal successes.  I’m not suggesting that because they are not universal successes that they must be failures, but what I mean to say is that they have their time and place.  Clearly, your perspective has alot of influence on whether you consider them successes, and some of them have been more successful than others.  But, they are another tool in your toolbox for solving problems.

     

    I see cloud computing as just another tool in the toolbox.  It will have some impact on the IT topography of companies, but it will not dominate the landscape for probably a couple decades.

     

    So, where’s my proof?  I don’t have any.  It’s just my gut talking.  It’s my brain interpreting what I perceive as the loud volume of vendors advocating for the cloud, and the silence of customers, or potential customers, praising it as a success.  It’s my experience dealing with vendors and imagining that I will have the same sorts of problems dealing with cloud computing vendors that I do with hardware and software vendors today.  It’s my natural defense against hype.  It's all of those things, and probably more.

     

    I Can See The Future?

     

    It’s not fair for me to just play armchair critic and not risk a little something, so here are my predictions.

     

    Over the next 18 months there will be a major push towards cloud computing in the IT press.  (C’mon, that’s a gimme.)

     

    In 5 years, large companies will start pulling back from their initial, heavy investments in cloud computing for numerous reasons.  There will have been a high profile security breach.  A major cloud computing vendor will have gone belly up, likely due to some scandal, putting its customers at risk.

     

    In 20-30 years my post will seem foolish, as cloud computing will be a common, natural, but still not exclusive, part of the IT landscape.  Why 20-30 years?  Because I think it’s going to take a cultural shift of kids growing up in a time of ubiquitous internet and the concept of non-tangible goods, like digital music files, to take leadership positions and express their unique view of IT in their companies’ decisions.

     

    That’s Just A Start

     

    I think I’ve got a lot more to say about cloud computing, but I’ve used up my blogging minutes for today.

  • Beware Moving Parts

    My faithful readers will remember one of my orginal posts in which I expressed my enthusiasm for a new phone I was planning on purchasing, the Pantech Matrix.  Well, tragedy struck today when, for no apparent reason, the slider keyboard no longer functions.  If I extend the keyboard slowly, I see the screen image reorient to the keyboard and the keyboard lights go on.  But, when the keyboard is halfway extended, the keyboard lights suddenly turn off and the screen reorients back to the phone orientation.  I've seen this described online as having the screen switch to landscape mode when the keyboard is extended.

     I called the AT&T store at which I bought the phone, and since the phone is still under warranty, they gave me a phone number to call for warranty service.

    On the plus side, the phone support person was very professional and walked me through a couple steps to see if a reset of the phone back to its factory settings would solve the issue.  I didn't have much hope, since it feels like a mechanical issue to me, but I went along with the testing.  Sadly, it didn't fix the problem.

    On the plus side, they're going to send me a replacement phone which I should receive in 5 days.  On the down side, the phone is a refurbished one, not new, and my warranty does NOT reset to the date on which I receive the new phone.  I suppose I can live with the refurb, but the lack of a warranty reset doesn't exactly instill me with confidence.

    I will give the Pantech Matrix this credit; being deprived of the keyboard I've had to rely on the predictive edit mode, which is actually pretty slick and lets me type on the number pad almost as quickly as I would on the keyboard...almost.

    And there's the dark side to being an early adopter of new technology.  Sometimes you're the guinea pig on your own dime.

  • Expandable!

    When I start to learn a new technology, I find I learn best if I jump right in, get my hands dirty, and play around with it for a while.  After a couple initial ah-HA moments and early successes, I inevitably hit a wall where I can't seem to solve a particular problem.  By that time, I've built up quite a list of questions, and I'm ready for a deeper understanding of what's really going on.

    At that point it's time for me to pick up a tech book and read.  And that's when I get a couple more ah-HA moments almost right away.  Case in point:  I've been working with PowerShell and SQL Server on a regular basis now for a couple months, and I've written a couple of scripts based on some tutorials I've found online and some excellent articles and blog posts people have written.  I'd hit that wall, and so based on the recommendations I'd read on a couple blogs, I picked up Bruce Payette's Windows PowerShell In Action. It's turning out to be an excellent read.

    In a previous blog post I had written some code that had this little gem in it:

    Get-Content $tblfile | ForEach {$trdir=$fulldir+"\dbo."+$_+"\triggers\"; cd $trdir; dir | ForEach{$_.Script()>> $outfile}}

    Experienced PowerShell users can probably spot my code silliness right away.  As Bruce Payette's book explains, variables are expanded when placed within double quotes.  So, in the case above, assigning the string to $trdir is an extra, unnecessary step.  Knowing this, I could have saved my precious fingers for my accordion playing by dropping the $trdir assignment:

     Get-Content $tblfile | ForEach {cd "$fulldir\dbo.$_\triggers\"; dir | ForEach{$_.Script()>> $outfile}}

    Were you to know that I was a DBA who primarily worked with T-SQL, this mistake would make sense.  T-SQL doesn't have something as nifty as expandable variables within quotes...but that doesn't make me love it any less.  But, you're a persistent reader, you went back and read my previous blog post, and you're quick to point out 'Tim!  You used double quotes to expand variables earlier in that same script!!!'  Would you believe that sometimes computers speak to me and I just KNOW what I should be doing without understanding it?  No?  You, reader, are much to clever and should be writing your own blog.  I promise to read it.

More Posts Next page »
Powered by Community Server (Personal Edition), by Telligent Systems