|
You can do it, but since the latest is able to manage any database, I would not recommend installing several versions. Just install the latest one and you will be able to manage any MS SQL database.
"I'm neither for nor against, on the contrary." John Middle
|
|
|
|
|
Doesn't the management studio also allow you to design solutions? Is that also backwards compatible in a way that one would feel comfortable deploying it?
|
|
|
|
|
SSMS will adapt itself to the version of the database it is connected to. Thus, you will not be able to setup something that would not be compatible with the database version you are working on.
I've been using this software for years now, and never had to worry installing several versions on a single computer.
That being said, you can easily test that latest version allows you to work on every database.
"I'm neither for nor against, on the contrary." John Middle
|
|
|
|
|
Yes, but I see no real need for multiple versions of SSMS in itself.
That said, I still have the predecessors (SQL Enterprise Manager & SQL Query Analyzer, from SQL 2000) and its companion installed; I feel that Query Analyzer is a much lighter weight component for running queries
I am open to new ideas, though; as I have been using the in-development SQL Operations Studio which is a little heavier than SQL-QA, but not as bloated as SSMS
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional
|
|
|
|
|
Assuming I have file data northwnd.mdf version 2005 I want to convert to file data version 2008 or reverse ?
|
|
|
|
|
Use backup and restore going from 2005->2008. You cannot reverse the process using this method.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
As Mycroft said, you can upgrade, but not downgrade. Restore the older version database to a newer version instance, or detach from the old version and attach to the new version.
Be aware that backup formats changed between SQL2008 and SQL2008 R2, which can cause incompatibilities
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
You could export it - dump it as sql statements rather than as a back up.
If the exported sql was fairly simple then it would work in either database. It is possible that it would require some modification to go from 2008 to 2005.
|
|
|
|
|
I am using Sql Server 2017 with Transact and a file with synonyms in FTData. I have found several serious flaws and problems but in the Microsoft MSDN forum and in Microsoft connect no one answers me. The rest of the people say they do not know how it works.
Video: https://youtu.be/Il7-DDKfHiU
Problem 1: Freetexttable Error With More of 3 Words.
I use Freetexttable with thousands of synonyms in a simple query in two Pc. By entering up to 3 words "Microsoft Sql Management Studio" instantly returns the result and the memory remains stable in 6Gb.
If I enter 4 words he is thinking for 10 minutes and the memory consumes until 12Gb. At the start of the video you can see what it takes Sql Server to load the synonyms and every few minutes if Sql Server is not used again it loads them again.
Example:
SELECT [Table].*, FT.* FROM [Table] INNER JOIN FREETEXTTABLE([Table], [Contenido], 'Word1 Word2 Word3') FT ON [Table].Id=FT.[Key] WHERE ([Table].STATE IS NULL OR [Table].STATE = ' ') ORDER BY RANK DESC, Page
Problem 2: Transact does not return the inflections of a word if you do not accent it correctly.
When looking for the inflectional of a word, if I introduce the word with the accent the inflections appear well. The server collation is SQL_Latin1_General_CP1_CI_AI
If I introduce the word without the accent, the inflections do not appear. In Spanish café and cafés are accentuated.
Video: https://youtu.be/4DX-Y3eoDo4
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(INFLECTIONAL, café)', 3082, 0, 0)
display_term returns: cafes cafe
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(INFLECTIONAL, cafe)', 3082, 0, 0)
display_term returns: cafe
When doing the same with the synonyms, returns the same results with or without accent.
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(THESAURUS, cafe)', 3082, 0, 0)
SELECT display_term FROM SYS.DM_FTS_PARSER('FORMSOF(THESAURUS, café)', 3082, 0, 0)
display_term returns: cafe chicoria sucedaneo mezcla chicoria. In Spanish sucedáneo are accentuated.
Note:After making the video I tried to recover the inflections of the word echaré (with and without accent) and returns the inflections well in both cases. So the problem is with some words.
I have found a very interesting example. I use the verb "echar". Among others, it has 2 inflections that are "echaré" and "echaría". If I consult "echaré" with and without an accent, it works well for me and it also returns me between its inflections.
If I consult "echaría" work well with accent and bad without accent.
Video: https://youtu.be/DmfZmzRW4w8
Problem 3: Transact load the synonyms many times.
I have added synonyms and a function that loads them when starting sql server. The problem is that when you make the first consultation you think about 1.5 minutes. Also, if I do not do searches, every so often (it can be 15 minutes) again it seems that it reloads the synonyms, perhaps from tempdb. How is it done to load them once and not delete them from tempdb?
I have this store procedure to load the synonyms at the start of sql server from file:
USE master;
GO
CREATE PROCEDURE Sinonimos
AS
SET NOCOUNT ON;
GO
EXEC sys.sp_fulltext_load_thesaurus_file 3082, @loadOnlyIfNotLoaded = 1;
GO
Activate the store procedure at startup by:
USE master
GO
EXEC sp_procoption @ProcName='Sinonimos', @OptionName = 'startup', @OptionValue = 'on';
GO
Problem 4: You can not protect the synonyms.
I have to install the sql server system on a client but I do not want to leave the .xml file from FTData there with synonyms. Is there a way for the file to load it from a remote URL or can the file be encrypted?
modified 8-Feb-18 7:32am.
|
|
|
|
|
Hello friends!
Could you tell me please how to delete specific data from multiple tables in sql database .
|
|
|
|
|
Very simple:
DELETE FROM table1 WHERE something = somethingelse
DELETE FROM table2 WHERE 1 = 2
DELETE FROM table3 WHERE ...
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I have this function that creates an order. I was missing a couple of things in the columns like weight, cost and profit.
So I wrote this to just grab the cart items to calculate my missing data
List<orders_cart> sC = context.ORDERS_CART.Where(m => m.order_ID == pOrderID).ToList();
But then I came to the ship weight, which I need to get from PRODUCT_INFO.
I forget the nomemclature for my expression above, so I wasn't able to search possibilities.
Possible to do a quick join off sC into another list?
If possible, I would need a little nudge towards getting it right.
Thanks!
If it ain't broke don't fix it
|
|
|
|
|
Presumably you have a navigation property from the cart lines to the product info?
In which case, you should be able to use something like:
context.ORDERS_CART.Include(l => l.Product).Where(... which will load the product details with each line. You can then use the navigation property to access the product details for the line.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I think I used include in a VB version of a situation that I needed extra details.
Let me give that a spin.
Monday I just looped the cart items and asked for the details and added them.
If it ain't broke don't fix it
|
|
|
|
|
hi,
I need a single qurery which satisfy the muliple dynamic fields get to be updated.
1. I am having the multiple fields in the table and I want to consider only the fieldname contanis "_edt"
2. All the fieldname("_edt") get to be updated as "some value" like "XXX"
Looks like :
set @sql = 'UPDATE r SET ' + c.name = ''XXX'' FROM sys.columns c
INNER JOIN sys.tables t ON c.object_id = t.object_id,Record r
where t.name = ''Record'' and c.name like ''%_edt'''
Please help on this.
Thanks,
Arun
|
|
|
|
|
Something like this should work:
DECLARE @SQL nvarchar(max) = N'';
SELECT
@SQL = @SQL + N', ' + QUOTENAME(name) + N' = @value'
FROM
sys.columns
WHERE
object_id = OBJECT_ID('Record')
And
name Like '%_edit'
;
SET @SQL = Substring(@SQL, 3, LEN(@SQL) - 2);
SET @SQL = N'UPDATE Record SET ' + @SQL;
PRINT @SQL;
EXEC sp_executesql @statement = @SQL,
@params = N'@value varchar(10)',
@value = 'XXX';
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Tnks a lot.. it is working for me
|
|
|
|
|
Boy that was a mouth full. Let me explain.
I have a table of products with names and descriptions. So take a word like kneepads. The correct way to spell it is knee pads and the column contains that correct spelling. But users will type in kneepads to search. I solved the plural issue with a custom function that I wrote.
But I'm wondering if I can query the database in Linq, and say something like without removing, replacing a value in the database
from pr in context.PRODUCT_ITEMS
WHERE pr.Name.Replace(" ", "").Contains("kneepad")
Basically I'm just looking for ideas to handle this.
My older program had another table that contains names and descriptions that were pre-stripped for searching and I really don't want to go back to that.
If it ain't broke don't fix it
|
|
|
|
|
It would be a very slow solution.
Assuming t-sql, I would add a computed column and put an index on it.
|
|
|
|
|
I would suggest holding a table of synonyms, with possible search terms pointing to the actual terms in the product description
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Add a normal search without the gimmicks and explain that if "kneepads" don't give the correct results, they should search for "knee".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Guess the original idea I had might be the best. A separate table of straight text with no white spaces and just do a join.
Or maybe a table of words with white space that are parsed out with conjunctions removed and verbs fixed.
Alright Thanks!
If it ain't broke don't fix it
|
|
|
|
|
As I read this you have decided on a solution and now are attempting to implement that.
My take on the problem, not your solution, is that you should investigate it first and then decide on a solution to implement.
Your problem is not new. It has been around for decades and I doubt your solution will work. For starters because it doesn't really deal with misspellings. Not to mention synonyms.
However there are solutions that do work fairly well. So you should see if you can find them first.
|
|
|
|
|
I created an EF6 data context by following this.
I need to change the connection string at runtime. I found this article but my data context does not have an overloaded contstructer:
public partial class MyEntities : DbContext
{
public MyEntities()
: base("name=MyEntities")
{
}
What am I doing wrong? How to I set the EF data Context connection string at runtime??
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Add the required constructor overloads to your context:
public partial class MyEntities : DbContext
{
public MyEntities() : base("name=MyEntities")
{
}
public MyEntities(string nameOrConnectionString) : base(nameOrConnectionString)
{
}
public MyEntities(DbConnection existingConnection, bool contextOwnsConnection) : base(existingConnection, contextOwnsConnection)
{
}
EDIT: If you're using the .tt file to generate the context from the database, you'll probably need to add the extra overloads in a separate file; that's why the class is declared as partial .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|