ColdFusion 10 Administrator, MS SQL 2012 and Windows 8 - windows-8

I've been trying to add a datasource in the ColdFusion Administrator for Windows 8 and I've been having many issues.
Below is what I've done:
Database created "onessBlog".
Login created onessBlog with password onessBlog / SQL Server Authentication pointing to default database onessBlog
User onessBlog created with default schema of dbo.
Named Pipes enabled for SQLEXPRESS
TCP/IP - All IP1 to IP11 is Active, Enabled, TCP Dynamic Ports is blank and TCP Port is 1433.
Service has been restarted.
Under data sources in ColdFusion Administrator, I create a datasource name 1ssBlog with the Microsoft SQL Server. I filled in the following fields:
CF Data source Name: 1ssBlogg
Database: onessBlog
Server: 127.0.0.1 and localhost
Port: 1433
User name: this is blank
Password: this is also blank
Once I verify the connection, I get the following error: Cannot open database "onessBlog" requested by the login. The login failed.
I have viewed the following resources and I don't know what I missed:
Adobe Docs
Local SQL Server 2008 ColdFusion Datasource
How do you configure a ColdFusion 8 datasource to connect to a local SQL Server 2008 server?

As Miguel-F commented above, he asked me why the username and password fields were blank. I replied that, according to the Adobe Docs, it advised me to leave the username and password fields blank. Obviously, this wasn't the case. Outlined below are the steps of getting a new instance SQL Server connected with ColdFusion:
Using SQL Server Management Studio, add a new database by going to the Object Explorer, right click on "Databases" and clicking on "New Database". Enter a name and leave at defaults for development purposes.
While still in the Object Explorer, under "Security" right on "Logins" and select "New Login". Enter a login name and choose "SQL Server authentication". For development purposes, uncheck at least "User must change password at next login"
Still in the Object Explorer, expand the new database that was created and right click "Security" and select "New User". Select User Type "SQL user with login" and type a user name. For "Login name", press the three dots button "..." and browse to and select the username created above. Select default schema as "dbo" for development purposes.
Video "Create user in SQL Server 2008 R2"
Exiting SQL Server Management Studio, go to sql Server Configuration Manager. Expand "SQL Server Network Configuration" and select "Protocols for SQLEXPRESS". Enable "Named Pipes" by right clicking.
Double click on "TCP/IP". In the IP Addresses tab type "Yes" for each "Enabled" field where "Active" is "Yes". Delete any entries to "TCP Dynamic Ports" and enter "1433" for any "TCP Port".
Save changes and selecting "SQL Serve Services" right click on "SQL Server" and restart the service by right clicking and clicking "Restart".
Local SQL Server 2008 ColdFusion Datasource
Log in to ColdFusion Administrator. Should be http://127.0.0.1:8500/CFIDE/administrator/index.cfm if left at defaults. Click on "Data Sources". Type in a Datasource name and select "Microsoft SQL Server" as the Drive Type.
In the "Database" field, enter the name of the database created in step 1.
In the "Server" field, enter 127.0.0.1 with "Port" 1433.
In the "User name" field, enter username created on step 2 and was selected in step 3.
In the "Password" field, enter the password for that username.
Submit and if it didn't verify, verify the connection.

Related

problem with importing data from sql server to tabular model

hi i am using vs 2017 and sql 2017 versions
i want to import data to tabular model from default server location
what i tried:
server: .
database:databaseName
mircrosoft login
username: myusername, pasword: mypw
server: serverName
database:
server login
username: serverName\user, pasword:
and few other combinations and i cant get it working
error i get everytime
Either a required impersonation level was not provided, or the provided impersonation level is invalid.
Thank you!
What is the impersonation level set as in the connection? This can be found be going to Model > Existing Connections > Edit > Impersonation in SSDT. For a Tabular model use either ImpersonateAccount or ImpersonateServiceAccount, which correlates to the "Specific Windows user name and password" and Service Account options in SSDT, respectively. From your question, it looks like the ImpersonateAccount option is what you are looking for. If the model is already deployed, the current Impersonation setting can be viewed by connecting to the SSAS instance through SSMS. After this, go to the model, then the Connections folder, right-click the connection you're working on a select Properties. The Impersonation Info field located under Security Settings will display the current value of this property.
I got this error when just selected the "Use Windows Authentication" option for connecting to the server. This resolved once entered the required impersonation details as below:
Open SSAS solution: Choose "Data sources " and Edit
Then select "Windows Authentication" and enter database name
Click button "Impersonation" and enter username and password

sql server 2012: cannot alter the login sa

I'm trying to create a database on my local machine using SSMS version 11.0.2100.60. I've run the application as administrator, logged in using Windows authentication, and I've added MYDOMAIN\my-username to the Logins. However if I try to create a db with this login I get the message
CREATE DATABASE permission denied in database 'master'.
(Microsoft SQL Server, Error: 262)
If I try to add the privelage dbcreator to my user, I get the following error.
User does not have permission to perform this action.
(Microsoft SQL Server, Error: 15247)
I can't log in as sa as I don't know/remember the password (is there a preset default?), and if I try to change the password I get the message:
Cannot alter the login 'sa', because it does not exist or you do not have permission.
(Microsoft SQL Server, Error: 15151)
Finally I note that the account 'sa' is disabled, and if I try to enable it I get the same error as before. Is there any way around this or do I need to re-install?
Version info:
Microsoft SQL Server Management Studio 11.0.2100.60
Microsoft Analysis Services Client Tools 11.0.2100.60
Microsoft Data Access Components (MDAC) 6.2.9200.16384
Microsoft MSXML 3.0 4.0 6.0
Microsoft Internet Explorer 9.10.9200.16635
Microsoft .NET Framework 4.0.30319.18051
Operating System 6.2.9200
I found the answer here:
In order to start SQL Server in single-user mode, you can add the
parameter “-m” at the command line. You can also use the SQL Server
Configuration Manager tool, which provides proper controls for the
file access and other privileges. To use the Configuration Manager
tool to recover your system, use the following steps:
Open the Configuration Manager tool from the "SQL Server 2005| Configuration" menu
Stop the SQL Server Instance you need to recover
Navigate to the “Advanced” tab, and in the Properties text box add “;–m” to the end of the list in the “Startup parameters” option
Click the “OK” button and restart the SQL Server Instance
A little more specific :
Open Sql Configuration Manager.
Select SQL Server Services.
On the right hand side, select the instance.
Right click on it and open properties.
In the advanced tab attach ";-m" at the end of the Startup Parameters field.
Apply and restart the service.
Now you have privilege to enable "sa" user and modify its password.
once done, remove ";-m" and restart the service.
You are good to go.
I'd like to point out an alternative answer laid out on DBA SE. Download PSExec onto the box that is having the problem and follow the instructions laid out in this blog post to effortlessly change admin settings using the NT Authority\System account.
./psexec -s -i "C:\...\Ssms.exe"
Wanted to share this solution as it solved my problem!

SQL Server 2008 error 18456 state 58, Login failed for user "

I have a Visual Studio C++ project (unmanaged C++) in which I try to connect to a SQL Server 2008 instance on another machine in the LAN. I use TCP/IP. My connection string is:
"DRIVER={SQL Server Native Client 10.0};Server=tcp:169.254.204.232,1433;Network Library=DBMSSOCN;Initial Catalog=myDB;User ID=myDBUser;Password=myPassword;"
Important fact: I am able to successfully connect remotely to that instance with user id myDBUser and password myPassword using SSMS -- using SQL Authentication mode (and specifying TCP/IP in the connection options)! Also, once logged in I can successfully navigate the database myDB.
So yes, I have enabled Mixed mode authentication on my server.
Also note that the same code was successfully connecting when my instance was local and I was using Windows Authentication. In other words, what changed since this whole thing last worked is that I moved my server to another machine, am now using SQL Authentication, and therefore changed my connection string -- the code has otherwise not changed at all.
Here is the error message I get in my SQL Server 2008 instance's Server Logs:
Login failed for user ". Reason: An attempt to login using SQL Authentication failed. Server is configured for Windows Authentication only.
Error: 18456, Severity: 14, State: 58.
Notice that the user being quoted in that error message is blank, even though in my connection string I specify a non-blank user ID.
Other connection strings I tried that give the same result:
"DRIVER={SQL Server Native Client 10.0};Server=MACHINE2;Database=myDB;User ID=myDBUser;Password=myPassword;" (where MACHINE2 is the windows name of the machine hosting the sql server instance.)
I do not specify an instance name in the above connection string because my instance is installed as the default instance, not a named instance.
Any ideas on how to solve this?
UPDATE: I solved this problem it seems. Are you ready to find out how silly and totally unrelated that error message was?
In the connection string, I just changed "User ID" to "uid" and "Password" to "pwd", and now it works.
I now see "Connected successfully" in my SQL Server logs...
Try running SELECT SERVERPROPERTY('IsIntegratedSecurityOnly'); if it returns 1 is Windows Authentication if 0 Mixed. If it returns 1 is definitely Windows Authentication and there must be something else wrong.
I think I solved this problem by doing this...
right click on servername on object explorer -> Properties -> Security -> Changed server authentication to SQL server and Windows authentication mode -> click OK.
after that open server on object explorer -> Expand security -> Expand Login -> right click on your login -> properties -> type new password -> confirm password -> OK.
then disconnect your SQL and restart your system. then login SQL server 2008 with changed password in sql authentication mode.
Thanks :)
The answer: In the connection string, I just changed "User ID" to "uid" and "Password" to "pwd", and now it works. I now see "Connected successfully" in my SQL Server logs...

SQL Server 2008 Error 233

I'm creating new login in SQL Server 2008 with following sql script:
CREATE LOGIN [xyz] WITH PASSWORD='xyz',
DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
It creates new login successfully. But when I try to login with it using SQL Server Management Studio it fails saying:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
What's wrong? How do I solve this issue?
Here is how I done it, maybe it works for you too.
login Microsoft SQL Server 2012 with windows authentication.
right-click onto the server name in Object Explorer and click Properties
In the new tab click Security
select SQL Server and Windows Authentication
Ok
Close the SQL server management studio.
start+run
write services.msc
search for SQL there and restart all services.
that works for me.
It's also possible that you're trying to use SQL Server Authentication without having enabled it. To fix this, right-click Properties on your server instance in SQL Server Management Studio, and update the security settings to include "SQL Server and Windows Authentication mode".
Looks like you're trying to connect using named pipes, but SQL Server is not listening on that protocol. See MSDN.
The two fixes MSDN suggests are:
Connect using TCP/IP, or use the SQL
Server Configuration Manager to
enable remote connections using named
pipes.
Using SQL Server Configuration
Manager on the client computer, move
TCP before named pipes in the
protocol order list.
I had a similar issue:
1. log in as the master user or windows authenticated user.
2. right click on the database --> properties --> security -->
3. change Windows Authentication mode to "SQL server and windows authentication mode" by clicking on the radio button. (if it is not)
4. restart the server
I had the same issue when i first setup SQL Server 2014 on my local machine.
In my case the solution was to set a correct defualt database.
Login with Administrator in SQL Server
Go to Securities >> Logins >> select your user name and go to properties
From Status >> uncheck user account lock check box
Change password for the user
Restart the sql server and login with your username.
I was facing the same error.
I've resolved the error by following below mentioned steps:
Disable named pipes and restart sql services.
After restart sql server I enabled names pipes and did a sql server restart again (Link for Step 1 and 2)
Connect to SQL server via studio.
Right click on SQL instance --> Properties --> Connections --> "Set the Maximum number of 5. concurrent connections to '0' ".
Save the change.
Restart the SQL server if possible. (Link for step 3 to 6)
I hope this will help someone
This is might not be a connection issue . Check your default database and if that is online . More commonly this issues seen when the default database will be offline or not exists . If your default database other than master ,better check this option.
I got a way to go around the problem.
Open one instance and login using the windows authentication
allow sql and windows auth both by right cliking on the db server.
Open second instance and login using sql authentication.
bingo the sql authenticated instance open .. :)
Actually in this way we cheat the sql authenticated instance as it tries to find an already running instance.. worked fr me.. good luck
I tried most of the solution but was not able to solve it until I found this URL which says to do the following:
Open SQL Server Management Studio and run the these queries:
sp_configure 'show advanced options', 1;
go
reconfigure
go
sp_configure 'user connections', 0
go
reconfigure
go
The reason why we got this error is that the user connections was reset to 1, so only one user was able to connect with the SQL server.
just a simple query worked for. I hope this will work for others as well.
I have not used the script style, but login through GUI I encountered the same error code. I had entered wrong user name and this is why I was getting the Sql Server, Error: 233. In order to resolve this, you should input the following information:
Server Name: MachineName\SQLEXPRESS
Authentication: SqlServer Authentication
User Name: Assigned user-name or simply sa
Password: xyzpqr
NOTE: Here I have wrote above data for demo purpose only, actual data is your machine & software's properties.
According to: https://msdn.microsoft.com/en-us/library/bb326280.aspx
Go to --> Remot setting
Go to "Remote" tab
in "Remote Assistance", Tick "Allow Remote Assistance connection to this computer", Click the "Advance" button and tick the "Allow..." and in the "Invitation" set the "30 days"
Then in the "Remote Desktop" part
Just tick "Allow remote connection to this computer"
After following the examples here and still not getting in, I found that my sa login was disabled. The following got me in:
Logged back in under windows authentication.
Expanded Security Tab
Expanded Logins Tab
Right-clicked sa and selected Properties
Went to the Status Tab
Under Login: Clicked 'Enabled' radio
Restarted Server and logged in as sa.
This assumes you have set sa password already using
ALTER LOGIN sa WITH PASSWORD = '<enterStrongPasswordHere>' ;
"A connection was successfully established with the server, but then an error occurred during the login process."
I was getting this problem from sqllocaldb when used from within Docker. The problem was the Docker image was not allocated enough memory. Increasing the memory actually fixed the problem.

User does not have permission to access a database

I'm trying to connect to a database using Windows Authentication. I believe that my current user does not have access to it.
How can I enable a user to login to SQL Server, and use the database?
You need to use the SQL Server Management Studio program to grant access for the user. You'll need to connect in with a login that has administration privileges for the database. If you have don't have those privileges you'll need to contact someone that does.
If you do have a login with those privileges:
open Management Studio
connect to the database server the database is on and look for the Security node in Object Explorer.
Expand the Security node and look for the name of the user in the list of Logins. The user's name should be the same as the user's Windows login if you are using Windows Authentication DOMAIN\Username format.
If the user is there, you will need to grant that user appropriate permissions to the database (read, execute SPs, etc.).
If the user isn't there you will need to add them.
Permission can also be added by group so you should check for groups that the user belongs to as well.
I had a scenario where I inherited a PC from another developer that left the organization. I couldn't access the default instance using Windows Authentication.
Here was the solution:
Open up SQL Server Configuration Manager
Click on "SQL Server Services"
Locate the Instance in the right pane and double-click for its properties
In the "Log On" tab, notice the "Log on as:" radio button option is set to "Built-in account".
Change the option to "This account" and add your Windows Authentication account with your domain and username and enter your password.
Click "Apply". Click "Yes" when it asks you if you want to restart the instance.
This will automatically add your Windows Authentication user account (Active Directory or local user) to the SQL Server instance. You will now be able to connect right away to the selected instance. As best practice, reset the settings back to the Built-in user account (most likely Network Service).
That's it!