370 reputation
211
bio website sqlserverupgrade.com
location Miami, FL
age 33
visits member for 3 years, 9 months
seen May 30 at 18:56

Database and Business Intelligence Practitioner


Jan
17
comment How can I make only *one* user controlled database
I did not. My fault. I have updated the syntax.
Jan
5
comment Why SQL server unload CLR assembly every midnight
Can you post the exact message you see / error messages? Can you disclose more information about server configuration? How much RAM, CPU, 32-bit or 64-bit system & what version of windows?
Aug
16
comment How can I store function names to be executed on a subset of rows?
it really depends, my suggestion was to use in case you had to use nested cursors. I would test the process doing 1. a cursor , 2. dynamic sql , 3. an SSIS Package (if process can be scheduled vs. run adhoc).
Aug
16
comment How can I store function names to be executed on a subset of rows?
The other option would be to do dynamic sql using the function.
Aug
5
comment In which form Microsoft SQL password should be given when creating a user?
seems to me that what you are concerned with is validating the password. To validate I suggest using SQLCMD utility. I typically validate by running SQLCMD with the following query."PRINT CAST(@@SERVERNAME AS NVARCHAR(100))+ ' | ' + CAST(SUSER_SNAME() AS NVARCHAR(100)) + ' | '+ CAST(DB_NAME() AS NVARCHAR(100)) + ' | ' + CONVERT(VARCHAR(20),getdate(),120) "
Jul
3
comment How can I store function names to be executed on a subset of rows?
is it required to run one row at a time? you could probably use the cursor for each different accountTypeId then process sets of rows "where accountTypeId = x". You may need to add validations, so that you can ensure the function results don't violate business rules. e.g. consider. update accounts set balance = fn_x(accountID) where accountTypeId = 'P' and fn_x(accountId) >= 0. Say for instance you don't allow balances to go below zero. You still get benefit of set based operation, but run function across all records of a specific type which don't violate rules
Jul
3
comment Chaining SQL Server Agent Jobs
does each of your items need to be a separate job? Could they be setup into a master job with separate job steps and for each job step add t-sql or other logic which determines whether the step should run and how (e.g. if (condition = true) do work else do nothing.
Jun
25
comment SQL Agent powershell context reference
Is powershell a requirement for what you are doing?
Jun
25
comment Recovering from: A transport-level error has occurred when sending the request to the server in SSMS
I have encountered the same issue after installing SSMSToolsPack. If I have a window that is connected to multiple servers, then open a new window, there is no way to get that window to connect. I have to close the window as both the "Connect" and "Change Connection" buttons are inactive.
May
29
comment How do you cope with Database Server Inventory Management
While it does seem political, I do believe there is some value in having this information for other reasons. Among these are Ensuring Licensing Compliance as well Ensuring all Databases on Servers (considered production) have a functioning backup solution. I take inventory on servers, but not on desktops. Dealing with unsupervised installs is a side effect of this, which I think is responsible behavior.
May
23
comment How do you cope with Database Server Inventory Management
I ended up writing a package which pulls a list of windows servers from the domain controller (ignoring desktops). I save this list of servers to the database. I subsequently wrote another SSIS package with a WMI task which queries the list of servers and pulls the services on each box. Problem is I am not a domain admin, so I know of at least 2 servers which have SQL and I cannot access.
Mar
4
comment Powershell-type SQL Agent Job failing intermittently trying to get Disk Space on Server via WMI-query
@user1005 - is powershell a requirement for this or would you be equally as satisfied with the vbscript equivalent of this?
Mar
4
comment What's the most effective way to duplicate an instance on SQL 2008?
@jcolebrand - I suggested backup restore, by simply would have to consider how to move data across from your live system to your demo system when you do stuff such as adding columns. This does however have the drawback requiring a restore then data purge before another backup and restore / detach and attach.
Feb
21
comment The SELECT permission was denied on the (View) object after explicit grant select on view to user
@Marian - I have edited the code above to correct the doubling. That was a typo.
Feb
18
comment The SELECT permission was denied on the (View) object after explicit grant select on view to user
I also verified in the sys.database_permissions and the 'appuser' is configured correctly to have select permission on the view.
Feb
18
comment The SELECT permission was denied on the (View) object after explicit grant select on view to user
Thanks for the name check... I had done a replace on the actual object name. its prefixed with an alpha.