Tuesday, April 29, 2008
Automating SQL Server 2005 Express Backups and Deletion of Older Backup Files
I've compiled a couple of my scripts - both TSQL and VBScript - to create a tip for MSSQLTips.com on automating backups and deletion of SQL Server 2005 Express databases to mimic that of creating a database maintenance plan. You can check out the article for more details. Feel free to post comments on the MSSQLTips.com forum site and hopefully, you'll find the tip very useful. I'll write a few more tips for them in the long run just for the fun of it.
Monday, April 21, 2008
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed
I got this error when I tried to access a remote share from one of our DR servers. Well, apparently, the DR server configuration was not designed properly which is probably the reason why I am getting this error. The production and DR server both have the same configuration (or course, they are on a different network segment which is why this is possible) and I only get to access one or the other using a separate VPN profile. I was trying to copy a database backup from the production server and moving it to the DR server. The resolution: just run a net use * /delete command. It may sound simple but it works and that's what is more important. Having the same configuration (hostname and IP address, in my case) is causing my Windows XP workstation to get confused so a simple purge of the cache of my shared folder information. I would have to do this quite often as I need to connect to both servers on a regular basis
Wednesday, April 16, 2008
Follow-up on Policy-based Management in SQL Server 2008 v1
I asked Dan Jones about getting the policies in SQL Server 2008 to be evaluated in SQL Server 2005 and SQL Server 2000. You can create policies in SQL Server 2008 instances and use those policies to evaluate and even implement them in SQL Server 2005 and SQL Server 2000 instances with a couple of things to consider. One, if you are targetting facets which only exist in SQL Server 2008, the policies won't get evaluated on previous versions. An example of this is creating a policy which checks whether or not FILESTREAM option is enabled on a database. This of course won't get evaluated on previous version instances. The same is true when you intend to run the policies on previous version. You cannot run those policies on schedule or on-demand unless you use a workaround using PowerShell to do that. I'll work on a couple of samples where I'll create a policy in SQL Server 2008 and evaluate previous version instances based on that policy.
Tuesday, April 8, 2008
Thinking of cloning your workstations and servers?Think NewSID.exe
How many times have I mentioned in my blog posts that I am indeed a lazy guy? Probably a lot of times. That is practically because I always think of ways to make my work, especially those repetitive ones, as easy as possible. This case is one of them. I regularly work with virtualization, whether using Microsoft Virtual PC/Virtual Server or VMWare Server or Workstation for my tests or even for simulations. And whenever I need to work with a few servers and workstations, I simply create a copy of the virtual machine to eliminate the time and effort to install the operating system and applying the service packs if they need to be on each one of those images. Many organizations use disk image cloning software such as Norton Ghost or Acronis both for mass deployment of operating systems and for disaster recovery. But if you are to simply use these tools (or my method using virtualization) for cloning purposes, you are in for a surprise if you do not change the computer security identifier (SID) of the different images. To validate what I mean by this, create two cloned images and deploy them on a network. Then, try logging in using a domain account on either of the machines and you'll get the error mentioned below
The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain
Fortunately, SysInternals have a tool called NewSID v4.10. This tool is a program that changes a computer's SID. It is free and is a Win32 program, meaning that it can easily be run on systems that have been previously cloned. NewSID works on Windows NT 4, Windows 2000, Windows XP and Windows Server 2003. You can download the tool from Microsoft and run it on the cloned machine to change its SID. It is recommended though that you run this tool on a machine that is not a member of a domain. You can choose to randomly generate a SID, copy an SID from another computer or simply specify one (which is not really recommended). You can also choose to rename the machine to a different one (in my case, I still needed to run this tool eventhough I've already renamed the cloned image since they are both going to be a part of the same domain). A rebot would be required after a SID change has been applied. Download the tool and try it out for yourself
The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain
Fortunately, SysInternals have a tool called NewSID v4.10. This tool is a program that changes a computer's SID. It is free and is a Win32 program, meaning that it can easily be run on systems that have been previously cloned. NewSID works on Windows NT 4, Windows 2000, Windows XP and Windows Server 2003. You can download the tool from Microsoft and run it on the cloned machine to change its SID. It is recommended though that you run this tool on a machine that is not a member of a domain. You can choose to randomly generate a SID, copy an SID from another computer or simply specify one (which is not really recommended). You can also choose to rename the machine to a different one (in my case, I still needed to run this tool eventhough I've already renamed the cloned image since they are both going to be a part of the same domain). A rebot would be required after a SID change has been applied. Download the tool and try it out for yourself
Subscribe to:
Posts (Atom)