You can look for the permission paths used by a login as follows:
EXEC xp_logininfo 'DOMAIN\USER_A', 'all'
Thursday, July 17, 2014
Permission paths for login
Wednesday, June 25, 2014
SQL Server 2012: Kill all processes for a specific database
SELECT 'KILL ' + cast(A.session_id as varchar)
FROM sys.dm_exec_sessions A WITH (NOLOCK)
INNER JOIN sys.databases B WITH (NOLOCK)
ON A.database_id = B.database_id
WHERE B.name = 'your.dbname.here'
Tuesday, February 11, 2014
Why don’t software development methodologies work?
My long standing thesis that you cannot apply assembly line theory to software development, it is the people that make it succeed or fail not the process.
People all too often look to a tool or a process to fix their problem, but what typically happens is that all these things serve to do is divert attention away from the problem and distract people with process and tools.
Kind of like buying gym memberships or exercise equipment expecting them to make you healthy. The thing is, if someone isn't already exercising on their own (jogging, doing push-ups and sit-ups), then no amount of equipment or tools will solve their problem. Instead, if a person is already in the right mindset and demonstrating the right behavior, then tools can help leverage performance to the next level -- basically do the right thing, better.
My experiences and conclusions mirror those of the author of the article linked to below:
Why don’t software development methodologies work?
[Excerpt] It’s common now for me to get involved in a project that seems to have no adult supervision. Surprisingly, left to themselves programmers don’t revert to cowboy coding—they adopt or create methodologies stricter and more filled with ritual than anything I experienced in 1980. In fact programmers today can be much more rigid and religious about their methodologies than they imagine a 1970s-era COBOL shop was. I now routinely get involved with projects developed by one or two people burdened with so much process and “best practices” that almost nothing of real value is produced.
People all too often look to a tool or a process to fix their problem, but what typically happens is that all these things serve to do is divert attention away from the problem and distract people with process and tools.
Kind of like buying gym memberships or exercise equipment expecting them to make you healthy. The thing is, if someone isn't already exercising on their own (jogging, doing push-ups and sit-ups), then no amount of equipment or tools will solve their problem. Instead, if a person is already in the right mindset and demonstrating the right behavior, then tools can help leverage performance to the next level -- basically do the right thing, better.
My experiences and conclusions mirror those of the author of the article linked to below:
Why don’t software development methodologies work?
[Excerpt] It’s common now for me to get involved in a project that seems to have no adult supervision. Surprisingly, left to themselves programmers don’t revert to cowboy coding—they adopt or create methodologies stricter and more filled with ritual than anything I experienced in 1980. In fact programmers today can be much more rigid and religious about their methodologies than they imagine a 1970s-era COBOL shop was. I now routinely get involved with projects developed by one or two people burdened with so much process and “best practices” that almost nothing of real value is produced.
Monday, December 30, 2013
Example PGP encryption and decryption using MuleStudio 3.5
PGP_PublicEncrypter – Global Encryption Element
In this case we are using our Secret Key, Secret Alias ID, and Secret Passphrase to sign the encrypted message. We use the recipient’s (in this case “Joe Bob”) Public Key and Principal Email.
PGP_PrivateDecrypter – Global Encryption Element
Global Elements:
<encryption:config name="PGP_PublicEncrypter"
defaultEncrypter="PGP_ENCRYPTER"
doc:name="PGP_PublicEncrypter">
<encryption:pgp-encrypter-config
principal="Joe Bob
<jobbob@yahoo.com>"
publicKeyRingFileName="C:\vault\keys\joebob_public.gpg"
secretAliasId="-4553241976692078076"
secretKeyRingFileName="C:\vault\keys\my_secret.gpg"
secretPassphrase="MySecretPass"/>
</encryption:config>
<encryption:config name="PGP_PrivateDecrypter"
defaultEncrypter="PGP_ENCRYPTER"
doc:name="PGP_PrivateDecrypter">
<encryption:pgp-encrypter-config
principal="Joe Bob
<jobbob@yahoo.com>"
publicKeyRingFileName="C:\vault\keys\joebob_public.gpg"
secretKeyRingFileName="C:\vault\keys\joebob_private.gpg"
secretAliasId="-5394156070371012997"
secretPassphrase="joebob12" />
</encryption:config>

Flow Elements:
<flow name="flowEncrypt"
doc:name="flowEncrypt">
<vm:inbound-endpoint exchange-pattern="request-response"
path="queueEncrypt"
doc:name="vmEncrypt"/>
<logger message="#[payload]"
level="INFO" category="### INPUT
LOGGER ###"
doc:name="Logger"/>
<encryption:encrypt
using="PGP_ENCRYPTER" config-ref="PGP_PublicEncrypter"
doc:name="Encrypter"/>
<logger message="#[payload]"
level="INFO" category="### ENCRYPTED LOGGER
###"
doc:name="Logger"/>
<encryption:decrypt using="PGP_ENCRYPTER"
config-ref="PGP_PrivateDecrypter"
doc:name="Decrypter"/>
<logger message="#[payload]"
level="INFO" category="### DECRYPTED
LOGGER ###"
doc:name="Logger"/>
</flow>
------------------------------------------------------
./src/test/java/EncryptFlowTest.java
------------------------------------------------------
import static
org.junit.Assert.assertEquals;
import static
org.junit.Assert.assertNotNull;
import static
org.junit.Assert.assertTrue;
import
java.io.File;
import
java.io.IOException;
import
java.util.Collection;
import
java.util.HashMap;
import
java.util.Map;
import
org.apache.commons.io.FileUtils;
import
org.junit.Test;
import
org.mule.DefaultMuleMessage;
import
org.mule.api.MuleException;
import
org.mule.api.MuleMessage;
import
org.mule.api.client.MuleClient;
import
org.mule.api.transport.PropertyScope;
import
org.mule.tck.junit4.FunctionalTestCase;
public class
EncryptFlowTest extends FunctionalTestCase
{
@Test
public void testEncryptFlow () throws
MuleException
{
HashMap<String, Object> propsMap = new HashMap<String,
Object>();
MuleClient client =
muleContext.getClient();
String payloadSend = new String("The
quick brown fox jumped over the lazy dog");
MuleMessage reply = client.send
("vm://queueEncrypt", payloadSend, propsMap, 5000);
assertNotNull(reply);
assertNotNull(reply.getPayload());
assertTrue(reply.getPayload() instanceof
String );
String result =
(String)reply.getPayload();
assertEquals(result, payloadSend);
}
@Override
protected String getConfigResources()
{
return
"src/main/app/pgpexample.xml";
}
}
------------------------------------------------------
./src/test/resources/log4j.properties
------------------------------------------------------
# Default log level
log4j.rootCategory=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-5p %d [%t] %c: %m%n
################################################
# You can set custom log levels
per-package here
################################################
# Reduce noise for Mule High
Availability
log4j.logger.com.gigaspaces=ERROR
log4j.logger.com.j_spaces=ERROR
log4j.logger.com.sun.jini=ERROR
log4j.logger.net.jini=ERROR
# CXF is used heavily by Mule
for web services
log4j.logger.org.apache.cxf=WARN
# Apache Commons tend to
make a lot of noise which can clutter the log.
log4j.logger.org.apache=WARN
# Reduce startup noise
log4j.logger.org.springframework.beans.factory=WARN
# Mule classes
log4j.logger.org.mule=INFO
log4j.logger.com.mulesoft=INFO
# Your custom classes
log4j.logger.com.mycompany=DEBUG
Thursday, December 12, 2013
Adding SQL Server JDBC Connector in Mulesoft
1. Microsoft JDBC Driver for SQL Server can be downloaded here: http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx
2. Add theSQL Server JDBC connector to your project:
Project -->Build Path --> Add External Archives...
3. In the connections explorer add a new connection global element for data source by selecting MS SQL Data Source
4. Fill in connection information. JDBC urls for SQL Server should be of form:
For default instance on default port 1433
jdbc:sqlserver://servername:1433;databaseName=databasename
For named instance with non-default port:
jdbc:sqlserver://servername\instancename:port;databaseName=databasename
5. Now create database connection global elment and select the sql server database connection defined in steps

Note that the SQL Server Browser service may need to be active for JDBC to see the server.
Additional info and Mulesoft tutorial:
http://www.mulesoft.org/connectors/microsoft-sql-server-connector
which port is which?
Depending how the SQL Server instance is set up, it may be a named instance and not have a standard port of 1433.
To find out which port, you can run netstat in a command prompt.
Another way is to open SQL Server Configuration Manager and browse to:
SQL Server Network Configuration -> Protocols for <SERVERNAME> -> TCP/IP
Then in the TCP/IP window select the IP Address tab and scroll down to IPAll
To find out which port, you can run netstat in a command prompt.
Another way is to open SQL Server Configuration Manager and browse to:
SQL Server Network Configuration -> Protocols for <SERVERNAME> -> TCP/IP
Then in the TCP/IP window select the IP Address tab and scroll down to IPAll
Monday, December 2, 2013
Enable Alert system for SQL Server Agent
DatabaseMail on the SQL Server Agent -> Properties -> Alert System (check the checkbox), and then restart SQL Server Agent
Subscribe to:
Posts (Atom)









