Intellisense not working in SQL Server Management studio. what could be reason? - intellisense

I have been working on SSMS 2008 for last 1 month, I have enabled intellisense
Not sure why but it just does not work. what could be reason?

We had the same problem with Intellisense not working, in both SSMS version 17.9 and 18.0 and 18.1, when using Azure SQL DB, on accounts that were not dbmanager.
The suggestion from #sundar helps, even if it reports an error
Msg 40508, Level 16, State 1, Line 1
USE statement is not supported to switch between databases. Use a new connection to connect to a different database.

Related

SQL Azure Export Data-Tier Application & import into local SQL server

I have a SQL Azure database. I'm able to export the Database using Tasks > Export Data Tier Application. This is successful.
I then try to use Import Data Tier Application in my local SQL server and I get the following error:
Could not import package. Warning SQL0: A project which specifies
Microsoft Azure SQL Database v12 as the target platform may experience
compatibility issues with SQL Server 2008. Warning SQL72012: The
object [db_Data] exists in the target, but it will not be dropped even
though you selected the 'Generate drop statements for objects that are
in the target database but that are not in the source' check box.
Warning SQL72012: The object [db_Log] exists in the target, but it
will not be dropped even though you selected the 'Generate drop
statements for objects that are in the target database but that are
not in the source' check box. Error SQL72014: .Net SqlClient Data
Provider: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near
'CREDENTIAL'. Error SQL72045: Script execution error. The executed
script: CREATE DATABASE SCOPED CREDENTIAL [databasenameAzureStorageCredential]
WITH IDENTITY = N'SHARED ACCESS SIGNATURE';
I have SQL Server Management Studio 14.0.17289.0 and everything is up to date.
I have read different posts on Stack overflow and done some googling but unsure the best way to move forward. How can I solve this?
It seems like there is a compatibility mode differences in your local SQL server DB and Azure SQL server DB. Check your compatibility level and if it is mismatched here is the resource to solve that. The error was because you use SSMS version 'X' to generate the bacpac against Azure SQL version 'Y'. Try to generate the same bacpac using SSMS version 'Y' and it works for me.
Please download the latest version of SQL Server Management Studio from here to have the best user experience with Azure SQL Database. SSMS v14 is too old. The current version of SSMS is v17.9.
Remove (drop) the database scoped credential named "databasenameAzureStorageCredential" before exporting the database. The following query should give you a list of credentials created.
SELECT * FROM sys.database_scoped_credentials
In general, you need to remove references to external sources before exporting your database.

DB restoration issue

I have a issue while trying to restore a DB. Earlier I had SQL Server 2000 on my system so I installed SQL Server 2005 and now I'm trying to upload a DB backup made on SQL Server 2005 only. While uploading that I'm getting the following:
The query is
restore database APR15THB from disk ='C:\datab\APR15MUR.bak' with replace ,
move 'Apr07Trans_dat' to 'c:\overseas\mil-data\APR15THB.mdf',
move 'Apr07Trans_log' to 'c:\overseas\mil-data\APR15THB.ldf'
The error is
Msg 3169, Level 16, State 1, Line 1
The backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Can anyone please help me with this?
No, you can not restore a backup taken with a more modern version to a more outdated sql server.
SImple like that.
ALL your server versions are old, but you running 2000 is ancient. What about doing an update like every 15 years?
Check
https://support.software.dell.com/litespeed-for-sql-server/kb/30314
(yeah, google really has a lot on that stuff). Quite obviously you seem still to restore on 2000. Getting confused with multiple instances installed - i.e. you did not upgrade 2000 to 2005 but installed 2005 side by side and still use the 2000 version for restore?

SQL Server Management Studio connects, but can't perform a select against Azure database?

I've successfully connected to an Azure hosted SQL database in SQL Server Management Studio, but I can't perform any queries that I can perform in web matrix.
The following query works just fine in web matrix:
SELECT *
FROM [junglegymSQL].dbo.Action AS a
But when I try to execute it in SQL Management Studio I receive the following error:
Msg 40515, Level 15, State 1, Line 16
Reference to database and/or server name in 'junglegymSQL.dbo.Action' is not supported in this
version of SQL Server.
Remove the [junglegymSQL] from your SQL.

msg102 level 15 error - sql server

I was trying to run a script to create a DB with all the tables and data on a server, which I created using script wizard in SSMS 2008. The destination server is 2005 and since I am unable to just restore a backup, I had to go through this long process which entailed running it through sqlcmd cause it was too large to open in SSMS.
But after running for more than 5 hours, I checked on it and it had the following error:
msg 102 level 15 state 1, incorrect syntax near 'VA'
Now I tried finding the source of the error and looking in the script the only reference to 'VA' are in the data types nvarchar or varchar.
Please help, I really need to deploy this DB.
EDIT
For those who have answered, thanks for the responses. I guess I will have to rerun the script but I would like to know if anyone has any ideas on running the script in SSMS. The script is over 2GB in size since it has to recreate the data and there is no other way to deploy this 2008 DB to a 2005 sql server edition.
Either: you have scripted a SQL Server 2008 only option which can be changed in SSMS (tools..options somewhere)
Or (assuming no other VA strings) the word VARCHAR has truncated to VA. I've had this happen with dynamic SQL: can be a real pain to track down
in SSMS if you double click on the error message in the results pane, it will usually change focus and highlight that line of code. Now, how close that line of code is to the actual error depends on the actual problem, but you should be able to find the line of code it is complaining about.
Really tricky to track these down, but you could either try to generate the script setting the compatibility level for SQL 2005 or use the SQL 2005 tools to generate the script.

SQL 2008 setting compatibility level

When I try to add a data-base in SQL Server 2008 (Right clicking on Databases folder->New Database) the only compatibility options given to me in the options tab are 70, 80, and 90.
However, I require the use of the DATE object, which doesn't work unless I set the compatibility level to 100.
I've tried using
exec sp_dbcmptlevel mydb, 100;
GO
However, I get the following error:
Valid values of the database compatibility level are 60, 65, 70, 80, or 90.
What I am missing here?
From your description, it certainly appears that the database is a SQL Server 2005 database, not SQL Server 2008. Does it have a "100.something" next to the server name? If not, it's not SQL Server 2008.
Are you using SQL Server 2008 Management Studio, or an earlier version?
Leave it blank. Compatibility level is there to allow you to set the compatibility to a lower version of the database (if you need to).
Have you by chance tried the following?
ALTER DATABASE [DatabaseName] SET COMPATIBILITY_LEVEL = 100
Try in SQL Server Management Studio: right click on database -> properties -> options, and choose compatibility level