Reputation
1,221
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
5 11
Newest
 Yearling
Impact
~78k people reached

  • 0 posts edited
  • 0 helpful flags
  • 33 votes cast
Nov
28
comment SQL Server logins and users — assign multiple logins to a single user?
You can use a Windows group for the login, assign one user to the group, and then, outside SQL Server, assign Windows users to the group. Alternately, you can use role-based permissions and assign the users to the role and assign the role the permissions it needs. There's a huge amount of depth to the SQL Server security system.
Nov
3
comment Two ways to define may-have-a (1..0-1) relationship
Maybe I'm not really following your relationship here. Usually when you have a 0-1 to 1 relationship, you do one of two things: 1) Put the 0-1 fields in the 1 table and allow them to be nulls. This is denormalized, but practical. 2) Create a second table for the 0-1 fields and use the exact same primary key as the 1 table. This is normalized, but complex. I can't envision a situation where you'd need to create a key for the 0-1 table that you'd then store in the 1 table but allow to be null. That seems like just the worst of both worlds.
Nov
3
awarded  Yearling
Oct
28
awarded  Popular Question
Oct
19
answered MERGE command in SQL Server 2005
Sep
25
comment SQL Operating system error 5(Access is denied.)
@mason48ws Missing the point. IIRC, SQL Server will mount the database wherever the file currently is. It won't move it to the SQL Server folders for you unless you tell it to, and if you're using a service account, it probably doesn't have access to a random user's desktop.
Sep
25
comment SQL Operating system error 5(Access is denied.)
Did you drop the old database before restoring? Additionally, you should probably restore the file to the SQL Server database location, not some file randomly on your desktop.
Aug
15
comment How to manage hundreds of SQL jobs?
Idera has an offering. This question will probably be closed as opinion-based or otherwise poor since the site tends to dislike list-type answers. Software lists tend to go out of date quickly.
Aug
3
answered Select statements during long update
Aug
3
comment Select statements during long update
UPDATE, INSERT, and DELETE statements ignore the NOLOCK hint.
Aug
1
comment Password generator function
Personally, I don't see why this should be a DB function at all unless you're storing plain text passwords, which is itself a pretty questionable practice. Ideally you want to store a hashed password and it's salt, and use a key derivation function to do your hashing for you.
Jul
15
comment SQL Server Slowdown?
These were my first thoughts as well. Tempdb contention and autogrowth events for the DB and transaction logs are known causes for slowdown.
Jun
30
comment A good dataset to experiment NoSQL databases
-1 While I don't think you're wrong, I'd argue that an RDBMS and NoSQL data store simply do different things, making this a pretty unfair comparison. Beating up on an NoSQL data store because it's a bad RDBMS is as silly as beating up on an RDBMS because it's a bad file system. And ultimately, you didn't really do anything to answer the question actually being asked.
Jun
11
answered Does SA account need to be called “SA” or can I rename it safely?
Jun
11
comment How to select first row from a join that returns multple rows on the primary key
@normandantzig Both are valid in SQL Server in most situations.
Jun
11
comment How to select first row from a join that returns multple rows on the primary key
@normandantzig That's an alias.
Jun
11
comment Changing sa password
What error are you getting when you try to log in? Has the server been configured for Windows Authentication only? Is the sa account disabled? Has the sa account been renamed and another account named sa been added? What do you get when you run these: SELECT CASE SERVERPROPERTY('IsIntegratedSecurityOnly') WHEN 1 THEN 'Windows Authentication' WHEN 0 THEN 'Windows and SQL Server Authentication' END as [Authentication Mode]; SELECT name, type_desc, is_disabled FROM sys.server_principals WHERE sid = 0x01; SELECT * FROM sys.syslogins WHERE sid = 0x01;
Apr
27
awarded  Peer Pressure
Mar
23
comment High Availability using SQL Server 2012 requires how many licenses
The only person who can answer this is your MS Licensing rep.
Jan
22
comment Metadata Headache
You should be able pick reasonable sizes for the fields. Metadata scanning should only throw an error very rarely. Your data is only going to vary so much or you wouldn't use varchar in the first place. MySQL can't store War and Peace in a single varchar field. It's limited to 65535 bytes per record unless they're using blobs, but blobs wouldn't be as much of a SSIS problem. If it's really that big of a problem that you can't ever fail or you can't ever wait to fix it, use CAST(Field AS VARCHAR(max)). Your performance will suffer, but you don't have a lot of choice given your requirements.