Don't see PowerShell in SQL Azure - sql-server

I got access to SQL Azure. My problem is I can see Powershell in my local system but not in remote Sql server.
Through SSMS I can access SQL Azure and I can see the Databases and I can create database, but I can't use Powershell.
In my local sql server I used Powershell to send the http request like
$http_Request = New-Object system.Net.WebClient;
$Result = $http_Request.downloadString("url");
It was working fine, but when I try the same thing in SQL Azure I can't. any help?

Related

Connect from application to SQL Server (ONLY Theoretical!)

I don't know how to connect from a self-written application to a SQL Server. I have added an application role to the SQL Server already. Do I need a SQL Server login or only a database user? I know that after I'm connected I can run the procedure sp_setapprole to access the database as an application. How does this work in theory?
You need a connection string
(instructions on how to connect to the SQL Server: URL,PORT,USERNAME,PASSWORD) and a command to be Executed.
I'm sure there are a lot of instructions online for you, just give it a quick google search:
%Programming_Language & "SQL Connection String"

Why I cannot connect to remote database when using tablediff.exe?

I am trying to sync to tables on differenet servers (Local one and remote one) using this code that I rum from the command prompt:
"C:\Program Files\Microsoft SQL Server\120\COM\tablediff.exe" -sourceserver localpc\SQL2014 -sourcedatabase localdb -sourceschema sche -sourcetable table1 -destinationserver remotepc\SQLEXPRESS -destinationdatabase remotedb -destinationschema sche -destinationtable table1 -et Difference -f d:\table1_differences.sql
but I recieve the error : unable to access database remotedb
The local db is SQL server 2014 express edition
The remote db is SQL server 2014 express edition
Firewall is turned off.
I assigned the admin user as the logon account for the sql service on the remote server.
NOTE I can connect to the remote db normally from C# application or from my local SQL server .
Thanks,
Solved it by assigning the -destinationuser and -destinationpassword parameters

How To Connect A Azure Sql Server 2012 Database From Localmachine

I want to connect my SQL server management studio which is running locally with a Azure SQL Server 2012 database
Now i have enable the sa account on the SQL server side and i also check the server name by running this query --
SELECT ##SERVERNAME
I got the output
MSRV01\SQLSERVER
Now from my local machine when i am trying to loginto that Azure SQL server like this --
It retun this error
Do any one have any idea what i am doing wrong here !
Unless your local machine is on the same domain (or even subnet) as the azure VM then accessing via machine hostname will never work.
If you are using an Azure hosted database (i.e. not a VM) then in your Management Portal, navigate to the database settings panel. At the top will be listed the Server name with a URL like xxxxxxxx.database.windows.net. Use this to connect to your database in SSMS.
Further reading: https://azure.microsoft.com/en-gb/documentation/articles/sql-database-connect-query-ssms/

Connect AnyLogic to SQL Server database

the new build-in database in AnyLogic 7.3 allows to connect to a SQL Server database. I am struggling to connect it to a local database that I set up using SQL Management Studio (using SQL Server 2008 R2).
A few more facts to clarify:
My dbase is called "myDBase" and has a db_owner called "myNewLogin".
I log into SQL Management Studio using "Server type" = Database engine. The Server name is "NAMEOFMYMACHINE\SQLEXPRESS". I set "Authentication" to Windows authentication
my login "myNewLogin" is set to use "SQL Server authentication" in its properties. It uses "myPassword" as a password (but doesn't enforce it)
I set up the AnyLogic import wizard as below:
I have tried to use different inputs (such as "sa" for the Login,...) but in any combination, I always get the error
"Login failed for user ..."
I have also turned off my Windows firewall to allow port 1433 communication, but the result is the same.
Have you been able to load from a local SQL Server database? How did you set it up, which versions did you use... The more specific your reply, the better.
thx a lot in advance
Thanks again for your help.
I fixed the problem by installing SQL Server 2014 (was 2008) and logging in using "Mixed Method" with a "sa" account.
have you tried host: localhost\sqlexpress ?

sql server cmdlet (sqlps) and remote server

I'm using sqlps powershell module to get some data from my local database. My code is something like this
PS C:\> Import-Module sqlps -DisableNameChecking
PS SQLSERVER:\> cd "SQL\myMachineName\..."
It works correctly, but sometimes I need to connect to a remote server running SQL server, so I use Enter-PSSession. Is this the correct way or can I somehow map that server under local SQLSERVER:\SQL directory?
The PowerShell provider for SQL server can be used to connect to a remote SQL server without PowerShell remoting. For example, at the SQLSERVER: drive, you can change the location to a different SQL Server using
PS SQLSERVER:\> cd "SQL\remoteMachineName\SQLInstanceName"

Resources