SSMS | Screen space multiple scattering for Unity | Plugin library
kandi X-RAY | SSMS Summary
kandi X-RAY | SSMS Summary
Unity thread with more info:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SSMS
SSMS Key Features
SSMS Examples and Code Snippets
Community Discussions
Trending Discussions on SSMS
QUESTION
I need to upload a file (<10 MB) around once a week to a SQL Server 2016 database on a remote server in the same network. Until now it was all within a Access FE/BE but I want to migrate to SQL Server as backend.
The attachments I had in MS Access so need to be handled now on the SQL database as I do not want to do this on a fileshare.
I found many threads about using something like this from SQLShack
...ANSWER
Answered 2022-Mar-13 at 23:33I may have found a solution using the links from @AlwaysLearning. The first sub actually answers my question to upload a file to a remote FILESTREAM SQL Server. The second sub downloads all uploaded files into a given directory.
QUESTION
I have a CSV file in Azure data lake that , when opened with notepad++ looks something like this:
...ANSWER
Answered 2022-Feb-16 at 22:49I recreated a similar file and uploaded it to my datalake and serverless SQL pool seemed to manage just fine:
QUESTION
From a local C# program, I am trying to connect to an SSMS server's Integration Services Catalog (SSISDB) to read the .dtsx file(s) that are in there. I have the IP/u/p of the server, but after that, how would I get the .dtsx files?
...ANSWER
Answered 2022-Feb-04 at 18:49You can extract SSIS projects (including dtsx files) using the SSISDB.catalog.get_project stored procedure. You should use it to save the project as a ".zip" file and extract the packages from it.
You should call this stored procedure from an SQL Command using C# to extract those files. While searching online I found a solution implemented in PowerShell, you can implement the same logic using c#:
Similar questions:QUESTION
My input strings are like:
A or B OR C or D OR E or F
A OR B OR C OR D OR E OR F
Expected Output: 'A or B' OR 'C or D' OR 'E or F'
ANSWER
Answered 2022-Jan-21 at 10:13This solution comes with a high cost on server load since while is used.
QUESTION
I am porting a SSAS (SQL Server Analysis Server) Tabular model to Power BI Desktop. I have about 200 queries in the SSAS export (just in a text file) that I need to move into Power BI. I can paste the queries one at a time into the Advanced Editor in Power BI, but for 200 queries, this is a slog. I am looking for a way to import all the queries at once into Power BI Desktop.
For SSAS experts, this is attempt 4 to migrate the tables from SSAS. Attempt 1 was to use ALM Toolkit, but it does not work with tables in Power BI Desktop models. Attempt 2 was an XLMA script in SSMS, but I can't even get the script that is generated for the SSAS model to run in SSAS. I get errors like: Query (56,129) The syntax for ')' is incorrect. Attempt 3 in Tabular Editor had the same issue as SSMS.
So for attempt 4, I thought I'd try to paste multiple queries into the Power Query window. If I move queries from one Power BI file to another, I can select multiple queries and copy and paste them between Power BI files. If I look at the clipboard, it looks like this:
...ANSWER
Answered 2021-Dec-28 at 14:24A much simpler approach is to use VBA macros to create the queries from the text file in Excel Power Query, then manually copy the Excel queries to paste into Power BI Desktop. You can select all the queries in Excel at once from either the Queries & Connections pane or the Power Query Editor and copy them in one shot.
Here is some VBA code to create the queries in a new file. It requires the file with the macro to have a table named "Data_sources" on a sheet named "Data sources" with at least 4 columns (Data Source Name, Data Source Query, Server, and Database):
QUESTION
I have set up a Serverless SQL pool in Azure Synapse that is querying a view I had set up of a linked Azure Data Lake.
...ANSWER
Answered 2021-Dec-30 at 04:47You would need to create server-scoped credential to allow access to storage files.
These are used when SQL login calls
OPENROWSET
function withoutDATA_SOURCE
to read files on some storage account. The name of server-scoped credential must match the base URL of Azure storage (optionally followed by a container name). However, SQL users can't use Azure AD authentication to access storage and serverless SQL pool doesn't return subfolders unless you specify/**
at the end of path.
QUESTION
The SQL Agent Jobs sits above the user level and requires a login to be assigned to the owner. But it doesn't take a group login as an accepted parameter. I need to use the Windows AD group as owner because I have different SQL users and some of them should see only the specific jobs. As now Ive created separate jobs for every user using SQLAgentUserRole which is not good for sure and the database is full of 1:1 jobs, each of them with different owner to avoid seeing the other jobs.
The whole picture: Lets say that I have 10 different jobs in the database. One of those jobs is named UserJob. I want specific users when connecting to the database and expand the jobs section to see ONLY the job named "UserJob" and be able to start it. I dont need it via Stored procedure, etc. I just need to start the job via the SSMS (right click, start job, enter parameters if needed). Thanks.
...ANSWER
Answered 2021-Dec-22 at 23:19As per the docs SSMS checks user membership in the following Database Roles to show SQL Server Agent tree node:
- SQLAgentUserRole
- SQLAgentReaderRole
- SQLAgentOperatorRole
I used SQL Server Profiler to find what queries are executed when you first connect to database in Object Browser and expand various nodes.
For SQL Server Agent it uses SELECT * FROM msdb.dbo.sysjobs_view
view to list Jobs. This view can be modified.
- Create a new Database Role in msdb database. I called it "CustomJobRole".
- I then created a new Job (I assume you already have a Job) called "TestJob"
- Create a low privilege user that should be able to see and run only "TestJob".
- Add this user to "CustomJobRole" and "SQLAgentReaderRole" and/or "SQLAgentOperatorRole" (see linked above docs for details)
- Modify
sysjobs_view
as follows:
(see comments in code)
QUESTION
I'm trying read data from sql database. When I run the code, it gives an error when it comes to where it should read data.
"System.InvalidCastException: Specified cast is not valid."
I get an error. I researched my mistake but couldn't find the solution that works for me. While the query text I wrote works in ssms, it does not work in code.
...ANSWER
Answered 2021-Dec-17 at 13:48First of all you should execute your queries ONLY with parameters. Secondly, we don't know your table schema - please show it.
But most probably there is problem in how you store this value. GetDouble doesn't do any conversions, so your data should already be saved as double.
What's more, there can be problem with globalization. What you should do is:
QUESTION
I have an issue while importing a flat file into SSMS. As I download a CSV file from a specific system, the decimal separator is always ".". I have a regional setting of comma and I use commas all the time. But when importing these CSV files into SSMS, I get an error of type mismatch, due to the fact that SSMS cannot recognize the values as numbers (float, decimal, etc.)
I have tried to switch the regional Windows settings and replaced dot with a comma, which solved the issue and imported the file, but the question is, am I able to change settings in SSMS somehow so I am able to keep comma as default but import CSV files with decimal point separator?
I need to work only with SSMS, I am unable to install SSIS packages.
Thank you very much for any feedback.
...ANSWER
Answered 2021-Dec-14 at 14:37In SSMS select "Import Data" option then in "Data Source" select "Flat File Source". Select file to load and then change "Locale" option (located just below file name).
Locales control how data formats are displayed and interpreted such as currency symbols and radix (decimal separator) character.
QUESTION
It appears that the latest SQL Server SSMS v18.8 is replacing non-printing characters with blanks in the grid output. This was addressed for v2008 in this question, and it noted that it was fixed in v2012. Does anyone know of an option to restore the v2012 behavior in v18.8?
If you execute this query in v18.8 you get "aN-blank-b":
...ANSWER
Answered 2021-Dec-08 at 23:19It appears that if you get the tab or not is linked to the Retain CR/LF on copy or Save setting, however, only if you restart SSMS after enabling it.
Firstly, enable the setting via Tools -> Options -> Query Results -> SQL Server -> Results to Grid -> Retain CR/LF on copy or Save.
Then close SSMS, and then reopen it. When you copy and paste the value, you then get a tab.
Animated GIF of this "feature" occuring:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SSMS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page