|
|
A SQL Server DBA attempts a personal IT project and documents the (mis)adventures.
-
Yup, you read the title right. My blog is going to be moving. For a number of different reasons it's time for me to strike out on my own, so I'm following Brent Ozar's excellent How To Start a Blog series to make that migration happen. One of those reasons is that my wife has given me a project of migrating her ftp-hosted Blogger blog over to WordPress. She's got scores of readers and I'd like to make that transition as seamless as possible for them. And, it's against my nature to make changes to production without having done some sort of test, so my migration of my own blog to WordPress will be a good test run that, while not identical, will give me some basis of understanding for when I take the leap with her blog. I've also known that I have to move this year, and having this imminent change hanging over me was just another impediment to sitting down and getting my thoughts out, and getting to work on all of the other home tech projects I want to do this year. It's time for action, I sez. I'll make a more official announcement once I'm ready to declare my new home, but it shouldn't be to hard to find the new home if you'd like to watch the messy metamorphosis.
|
-
In a renewed effort to read one tech book a month in 2010, I've restarted Bruce Payette's Windows PowerShell In Action just as I've been using PowerShell to solve a problem at work. I was attempting to use a SendEmail function I found on a blog, and when I tried to call the function like this: SendEmail("someaddress@someplace.com","Someaddress@someplace.com","This is a subject","This is the body of the email"); I got the following error: Exception setting "From": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Net.Mail.MailAddress"." At C:\PowerShell\SendEmailTest.ps1:15 char:10 + $msg. <<<< From = $From + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyAssignmentException
Exception calling "Add" with "1" argument(s): "The parameter 'addresses' cannot be an empty string. Parameter name: addresses" At C:\PowerShell\SendEmailTest.ps1:26 char:20 + $msg.To.Add <<<< ($singleAddress) + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException
Exception calling "Send" with "1" argument(s): "A from address must be specified." At C:\PowerShell\SendEmailTest.ps1:56 char:17 + $client.Send <<<< ($msg) + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException
The parameter 'addresses' is an empty string? How is that possible? I clearly entered someaddress@someplace.com which is most definitely not an empty string. Fortunately, I read about this PowerShell function gotcha in Mr. Payette's book on page 183, where goes on to describe things like PowerShell looking at the contents of parentheses as an expression and very smart people being tripped up by this. To make a long story short, I should have called the function with the arguments separated by spaces, like: SendEmail "someaddress@someplace.com" "Someaddress@someplace.com" "This is a
subject" "This is the body of the email"; I'll take this opportunity to plug the book again. It's little pieces of advice like this that have saved me a ton of time as I've learned PowerShell.
|
-
Time to make my professional goals again for the new year. In conjunction with listing my new goals, I'll also talk about some of the goals for last year and how I fared. Certification: Pass exam 70-453 in order to earn my MCITP: Database Administrator 2008. Bonus Goal: Pick another certification and take at least one exam for it. Server Admin? BI Developer? Database Developer??
Last year: I reached my goal of getting my MCITP: Database Administrator certification. Blogging: Make at least one blog post a week. Move blog to a new site. Last year: Didn't quite make the one blog post a week. I'm hoping to do better this year, starting now. It's only 52 posts, right?
Reading: One technology book a month. Last year: Man, didn't hit this one either. Uh oh, I don't like where this review of last year is headed... Technology: Focus on learning Powershell, SSIS, and SSAS. Last year: Undefineable goal, but my early enthusiasm for Powershell really kind of died out as I didn't have any places to apply it at work. 2010 is starting out very differently, and I've already developed some automation scripts with Powershell for work, and I'm starting to recommend it for certain things to our developers as well. Scripting: Write 1 script a week for my toolbox. Last year: Tried this goal, and, by my count, I ended up with 74 new scripts, in both T-SQL and Powershell, that make my job easier. Hurray! I got one. Learning: Attend 6 of the monthly local SQL Server user group meetings this year. Attend PASS Summit.
Last year: Yup, I did manage to attend my goal of 1 user group meeting last year, and I also attended the PASS Summit. Volunteer: Donate some of my time to PASS, or to my local SQL Server User Group. I'm already slated to volunteer at SQL Saturday 31 in Chicago. Last year: Didn't make it a goal, so this one's a new one.
|
-
I was tagged in a recent post by Jeremiah Peschka asking how we use SQL Server. Jeremiah has uttered that words that compel me to reveal my true identity, despite the great risk I take in doing so. Fear not, for the true consciousness of the one who identifies himself as Tim Benninghoff is safe, and, due to his cooperative nature, has been granted access to our vast Yithian libraries to occupy his time while I borrow his body. This SQL Server, as far as I have been able to discover, is a data manipulation system of great power, but fraught with great danger for the uninitiated. In the current organizational construct to which I have attached this
Tim form in order to learn more about this SQL Server, I have found that it is primarily used as the platform by which
Independent Software Vendors, under the ruse of providing something
called 'solutions', unleash their torment upon the guardians of
information of humanity, which your age has called DBAs. Some of these 'ISVs' do seem to have in their possession a true, complete, unaltered copy of the manuscript known as Books Online, and access to the further writings of SQL Server's technological priesthood, known as MVPs, but I find that the vast majority of these ISVs seem to have based their machinations on apocryphal, if not outright heretical, knowledge compilations of SQL Server. In a query to the Tim consciousness, he suggests that ignorance drives their decisions. From the discomfort and distractions they inflict upon me in this Tim form, I am forced to disagree with him and attribute their actions to malice of the darkest and most sinister nature. Perhaps DBAs will one day unlock the secrets of time, and be able to transport their consciousness in order to escape the ISVs, much as we have done to escape our destruction at the hands of the flying polyps.
Another thought framework, which I have heard referred to as the Frame of the Main, seems to perform most of the data support for this organizational construct, also referred to as a company by the other humans amongst whom I walk. However, I have noticed that a transition of certain functions away from the Frame of the Main to SQL Server seems to be under way. This transition has been a difficult one, as former practitioners of the COBOL pictograms move their domain knowledge into the much revered relational storage archetype of SQL Server. Of note, an electronic library exists, referred to by the humans here as the Data Warehouse, that collects information from this Frame of the Main and transfers it to the Data Warehouse. The curious and remarkable thing is that the SQL Agent is the primary mechanism by which this data movement, known as ETL, is performed. These SQL practitioners have found ways to apply the power of the SQL Agent that I had not thought possible! As if the onslaught of the SQL Server ISVs were not enough, a great ravening beast, fearfully referred to as The Oracle, appears to be hatching some arcane and nefarious plan to increase its dominion over the company, employing its own ISVs to champion its cause. The Oracle's plan seems to be working, as even now this Tim form is being instructed to assist in transporting data to the systems in The Oracle's web of influence. All is not gloom for me in this Tim form, as we have begun the installation of the latest universal understanding, SQL Server 2008, and have nearly retired all instances of the reliable, but ancient in the information techology timeframe, SQL Server 2000. I look for ways to employ some of its new features such as PowerShell support, Central Management Server, Policy Based Management, and Management Data Warehouse to the greater glory of the company. It is time that I continue this meme, and so I call upon the entities known as Allen Kinsel and KenDrah to answer the question, How do YOU use SQL Server? I instruct you to REVEAL ALL!
Hey man, what the heck are you doing? What is all this....omg. This is how you repay me for being totally cool in the library of Yith? NO! Don't hit publish!
|
-
Recently when I tried to access Reporting Services' Report Manager for a SQL Server 2008 Developer Edition SP1 instance on a Windows 2008 R2 Server, I got a completely blank screen. It was not a mostly blank screen still showing the header, nor was I getting the blank page after being prompted for my user credentials three times. No, the page was loading immediately and was completely blank. I checked the Windows logs, the SQL Server logs, and the Reporting Services log, and no errors were being logged.
Fortunately I knew that the security department had recently made changes to that instance to enable Kerberos authentication in order to support Kerberos delegation for a web app that connected to our SQL Server and Reporting Services. They'd dutifully documented all of the changes, and so since I didn't have any error logs to go on, I knew this was the only change that had happened recently and likely had to be the culprit.
We used the same domain account to run both the SQL Server service and the Reporting Services in order to make our lives a tad bit easier, and I double checked that all of the SPNs were registered properly for the web server, SQL Server, and Reporting Services. Figuring it had to be something related to the Reporting Services configuration, I noticed that they'd changed a setting in the RSReportServer.config file, located at C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer in a default install, and noticed they'd changed <AuthenticationTypes> to <RSWindowsKerberos/>. I wanted to accept Kerberos or NTLM tokens, so BOL pointed me in the direction of using <RSWindowsNegotiate/>. But, despite BOL suggesting that this setting would be omitted if I were running in native mode and using a domain user for the service, I caved to my rebellious streak, removed <RSWindowsKerberos/>, replaced it with <RSWindowsNegotiate/> and hoped for the best. It worked! The web app continued to work via Kerberos authentication/delegation, and I was able to access my Report Manager again.
I'm sure there's a moral to this story somewhere. Mainly, though, I'm just very pleased that the security department and the consultant they had helping them were so diligent in documenting their changes. I probably owe them a cookie or something.
|
-
PASS Summit 2009 is rapidly approaching, and one of the features of the conference is the chance to meet new people who also work with SQL Server. In order to help attendees meet new people, some folks have put together SQL PASS Twitter Bingo. I've volunteered to be one of the squares on the randomly-generated bingo cards, and I'm really looking forward to meeting lots of attendees. Now, you've read the proposed rules and seen the sample cards and you're probably wondering how, in the name of all six-legged beings, you are going to find a handful of people at a conference attended by a couple thousand people. And to make matters worse, how are you going to find me, since my Twitter avatar isn't a picture of me? Well, the goal of the game is to meet people, not be a detective, so I'm going to try to make myself more conspicuous by doing the following: 1) Publish my agenda on my Google calendar - The sessions I plan on attending at the conference will be public, so feel free to look up my calendar to find out where I'm going to be. 2) Twitter - I'll be tweeting my locations under my nom de plume, Bugboi. Sessions may end up being full, or I may change my mind, and my calendar may not reflect where I actually am. Twitter updates will point you in the right direction.
3) Bugs - Each day I'll be wearing a different insect-themed t-shirt, potentially paired with a blazer or jacket if it's cold. Look for the bugs and that will probably be me, unless, of course, there is some other totally awesome person there who likes insects there at the conference.
But, what if after all that effort you still can't find me? Well, if you've found one person on your card, you might ask them if they know anyone else on the card, and they just might be able to point you in my direction. Or the helpful folks staffing the Quest and PASS booths might be able to help you get started as well. Good luck, and I hope to see you at the Summit!
|
-
In the age of SQL injection attacks, the dangers of dynamic SQL are pretty well documented. But, as with most things, there's a time and a place for them. I recently indulged in a trip down memory lane, reviewing the scripts in my 'toolbox' that I use for administration, and I was reminded of how much I use dynamic SQL for my day-to-day administrative tasks. For many, this blog post isn't going to break any new ground. Consider it an homage to my favorite aspect of dynamic sql in t-sql; the ability to do administrative tasks en masse.
For example, at work we use SQL Agent extensively for plenty of administrative tasks. In those rare instance when one of those jobs should break, we like to know what happened in as much detail as possible. So, we use SQL Agent's step history to log that information to a text file and email the log file to us. But, when I'm building a large job, going into the Advanced page of the Job Step properties through SSMS and defining the output file for each step can get rather tedious. Enter dynamic SQL. After I've built the job, I open up a Query window, and build a quick script like this: DECLARE @sql varchar(max);
SET @sql = '';
SELECT @sql = @sql + 'EXEC msdb.dbo.sp_update_jobstep @job_id='''+CAST(job.job_id AS varchar(max))+''',@step_id='+CAST(step.step_id as varchar(10))+',@output_file_name=''G:\JobLogs\<jobname>.log'',@flags=6' FROM msdb.dbo.sysjobs AS job JOIN msdb.dbo.sysjobsteps AS step ON job.job_id=step.job_id WHERE job.name = '<jobname>' AND step.step_id > 1;
EXEC(@sql); As you can see, using the information from the SQL Agent system tables stored in msdb, I build a variable to string together executions of sp_update_jobstep in order to update all of the steps in my job, except the first one, to use the same log file, to append the step's history to that log file, and to also include the step information into SQL Agent's history, and then I execute that statement, which modifies all of the steps at the same time. In jobs that have 10s, if not a 100 steps, I've saved myself quite a bit of time from having to go through the GUI. Now,this certainly isn't the only way I could have done this task. I could also have scripted out the job through SSMS, done a Find/Replace to change the values for @flags and @output_file_name. but, since I'm weird and I also want my first step to NOT append to the log file because I want the file to be 'new' every time the job executes, I'd have to then go back and search through the code to find the first step and change the @flags value. Then, in SQL Server 2005, I'd have to drop the job and run the script to recreate. But, no, I think I like dynamic SQL just fine.
|
-
The internet abounds with documentation and blog posts about logon triggers, introduced to SQL Server 2005 in service pack 2. Recently I had the opportunity to work with them developing an imperfect solution to provide a temporary bandage for a vendor's poor SQL security design; a recipe for delving into the dusty, forgotten corners of the functionality. From that experience, combined with some help from Books Online, I've come away with a couple hints and tips, all of which were tested on SQL Server 2005 SP2.
Errors In Your Trigger Can Prevent Everyone From Connecting
Let's say you've created a trigger, but made the mistake of referencing a table that doesn't exist in the trigger's logic. Well, that error is going to prevent anyone, even administrators, from connecting to the server because of the trigger execution. Yikes! Failures to connect to SQL Server because of a logon trigger are logged to your SQL log file. Fortunately, an error like a non-existent table will also show up in the log file as part of that logon trigger failure to connect. You should be able to use this to give you clues on how to fix your logon trigger.
Know How You Are Going to Disable the Trigger So, you probably already know that you can use a DAC (Dedicated Administrator Connection) to get into SQL Server, but it's a little more complicated than just using admin:<server name>. You're probably panicking because you've launched SSMS and are trying to connect using admin:<server name>, but you keep getting a message saying 'Dedicated administrator connections are not support. (ObjectExplorer)'. Reading closely you'll see that you can't use Object Explorer with a DAC. Trying connecting via a Query instead. If you're DBA who doesn't have access to the server on which SQL Server resides, you'll want to make sure you have remote DAC enabled on your server before you start your logon trigger work, either via the SQL Server Surface Area Configuration for Features or sp_configure.
Also, if you try to connect via a DAC and see this error message from SSMS: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.) (Microsoft SQL Server, Error : 10053)
or this error message from sqlcmd: HResult 0x2745, Level 16, State 1 TCP Provider: An established connection was aborted by the software in your host machine. Sqlcmd: Error: Microsoft SQL Native Client : Communication link failure. ...then it means that one of your co-workers, or your evil subconscious, have already made the single DAC connection allowed to a server, and you'll have to track them down and wrestle the DAC away from them. If you don't have SQL Browser running, you might not be able to connect via a DAC either, receiving some long error about the SQL Browser and port numbers in sqlcmd, or in SSMS about a 'network-related or instance-specific error'. In this case, you'll need to check your SQL error log to find the port that the DAC is listening on, and then use sqlcmd -S<server IP>,<port> to connect to the server.
Know How To Find The Triggers
If you use descriptive names like me and can't remember the exact spelling, you need to be able to find the exact name of the trigger once you've connected via a DAC. The system view sys.server_triggers is your friend. Armed with the name of your logon trigger from this view, DISABLE TRIGGER <trigger name> ON ALL SERVER will help you out of your jam. Or, if you're feeling particular vindictive, DROP TRIGGER <trigger name> ON ALL SERVER will work too. What if you have multiple logon triggers and don't know which one is stopping you? I'm afraid you'll have to use a process of elimination and the sys.server_triggers.is_disabled column to help you keep track of where you are at. Although, there is a way to create your logon trigger so that it both prevents a user from connecting AND logs that failed connection to a table you create. That sounds like a good topic for my next blog post. Thanks go out to @MladenPrajdic and @afernandez on Twitter, both very smart, helpful people whom you should follow, for the inspiration for this post.
|
-
"I suppose you could say that everyone has an El Guapo." Lucky Day, The Three Amigos As the title of my blog post says, I've got an El Guapo, a nemesis, an antagonist. It's a mental monkey trap. I cannot seem to figure out how the 'Limit size of job history log' setting for the SQL Server Agent would be useful to me in its current incarnation, which hasn't changed since at least SQL Server 2000. In this History setting found in the SQL Server Agent properties, you can set the maximum job history log size in rows, which defaults to 1000, and you can also set the maximum job history rows per job, which defaults to 100. We use SQL Agent extensively...very extensively. On some of our servers we have hundreds of jobs that handle everything from database and server maintenance to data loads. While these jobs all follow a basic form, they have a variable number of steps depending on what the job is intended to do. Our largest job has upwards of 100 steps by itself. Additionally, these jobs run with a certain frequency, be it daily, weekly, monthly, or whatever other frequency we can concoct.
And so, while we find the 'Automatically remove agent history' option very useful, I cannot seem to come up with a scenario where setting job history limits in terms of rows would be useful other than as a last protection from a SQL Agent job run amok. Any ideas?
|
-
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.
|
-
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.
|
-
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.
|
-
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.
|
-
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.
|
-
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.
|
|
|
|