Will the performance of a SQL server drastically degrade if the database is bigger than the RAM? Or does only the index have to fit in the memory? I know this is complex, but as a rule of thumb?
Server A (SQL2005) is in our primary domain, but server B (SQL2000) is just in a windows workgroup. We are not allowed to join it to the domain, or bad things happen...
We also can't enable SQL authentication on server B.
We've got domain accounts for A, and matching local accounts on server B.
I can connect to B from my local PC or A using SSMS and a domain login, but I can't get the linked server to connect.
Any ideas how to do this?
I once needed the lines of the stored procedures, to be able to trace whether i have a reference to some function, procedure or table, or sometimes to try to find something inside of the sp's code. Where does the sql server stores the procedures's code?
Can you create a linked server in SQL Server 2008 and then refer to it with an alias.
So, I create a linked server to "SalesServer", but I give it the alias "Sales", so I can use it like this:
SELECT * FROM Sales.DB1.dbo.DailySales
i.e. if I create a VARCHAR(50) field, what happens if I try to assign it a value that's 100 characters long?
Will SQL Server let me do this? Is it somehow less efficient?
I was learning this ORM because think this is good technology for most projects. But most employers required acquirement of ADO.NET and SQL.
This ORM not will use in high-loaded system (like popular web-sites)? In which types of projects this ORM will be useful? Are highly loaded projects using ORM?
I am testing out my scripts to see if they will prevent xss and sql injections. Can someone provide me with some basic but good scripts that would "hack" into my programs. I want to test my scripts before it goes online.
I am aware of other solutions like System.Data.Sqlite or Firebird through Dblinq, but since nothing beats SQL Compact Edition (integration-wise) with Visual Studio, I would like to use it and to know if its license allows its usage in Open Source projects.
Thanks.
I'm trying to compare the schemas of two tables that exist in different databases. So far, I have this query
SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('table1')
The only thing is that I don't know how to use the sys.columns to reference a database other than the one that the query is connected to. I tried this
SELECT * FROM db.sys.columns WHERE object_id = OBJECT_ID('table1')
but it didn't find anything.
I'm using SQL Server 2005
Any suggestions? thanks!
Which is faster in SQL, While loop, Recursive Stored proc, or Cursor?
I want to optimize the performance in a couple of spots in a stored procedure.
The code I'm optimizing formats some strings for output to a file.
I need to write a function to delete the login in the database if it does not have any users to map to using SQL Server Management Objects (SMO). How can I achieve this ?
How to automatically generate documentatation of stored procedures of SQL Server 2008 like doxygen does to codes? I read about hyperSQL but it doesn't work nice with Windows.
Thanks!
Gil.
I am trying to write an aggregate udf for using Sql Server 2008 and C# 3.5 that implodes an aggregation of data. The kind of syntax I am looking for is:
SELECT [dbo].[Implode]([Id], ',') FROM [dbo].[Table] GROUP BY [ForeignID]
where the second parameter is the delimiter for the aggregate function. And example return value would be something like:
1,4,56
Is there a way to have multiple parameters in an aggregate udf?
How can I find out if a Linq to SQL entity has grandchildren or not?
Pseudo-code below:
Return From p In dc.Processes Where p.Signers.Count > 0 and p.Signers.Signatures.Count > 0
Obviously I can't run the code above but I need to make sure that all the returning Processes have at least one Signer and that all of those Signers have at least one Signature.
TIA!
I need a test database to practice joins and other kinds of data retrieval operations in SQL.
What's a good free test database and RDBMS system to use on Windows?
In SQL Server, is there any way to check whether the changes in the schema will impact Stored Procedures (and/or Views)?
For example a change of the column name in one table, may break some Stored Procedures; how to check the impacted stored procs?
I have a developer that is having trouble connecting to a SQL Server instance by entering the server name (local)\HIS_SERVER_INSTANCE into Visual Studio-Server Explorer. If he replaces (local) with his machine name, it connects fine. I have had similar issues before but they seemed to fix themselves. Does anyone know a fix for this?
Sql 2008 is telling me to include the Primary Key in an index in the Included Column field. I thought the PK was automagically returned with all indexes?
I would like to allow two threads to write in a table at the same time (I know the problem of updating the same row, but this would be a story apart). I need that in behalf of speed up the operations in my aplication (one thread could write in row X while another could do the same in row X+n instead of waiting the first to finalize).
So, can I block rows instead of tables with Linq to SQL?
Thanks.
Why is it necessary to remove and then re-add a user to a SQL Server database after restoring it from a file?
If I don't do this, I get a "User login failed" when trying to access the database using this username from apps.
The scenario is I want to get the users who has less than 2 photos.
There are two table:
[Users] (UserId, UserName)
[UserPhotos] (PhotoId, PhotoName, UserId)
UserId is a Foreign Key but I do not want to use association like user.Photos.
A user may have none photo in the [UserPhotos] table.
How to use Linq To Sql to get List<User> who has less than 2 photos?