SP 2010 to SP 2013 Migration - Mounting issue - sharepoint-2010

The Mounting process is showing percentage completed 0.27% for more than 10 hrs. is this normal or error.
we are trying to Mount ~ 350 GB content DB
We noticed an error which is marked as critical in both sharepoint as
well as database server output
"Cannot alter the role 'SPDataAccess', because it doesn't exist or you do not have permission. Cannot grant, deny or revoke permissions to sa,dbo,entity owner, information_Schema,sys or yourself"
Please provide your inputs
SP 2010 to SP 2013 Migration - Mounting issue
0.27% : SPContentDatabase Name=TWIN***_GR**Di****n_C***ent.
100% Mounting completed

This looks like a SQL permissions issue. You may need to ensure your farm account has DB_Owner mapping to the SQL database prior to mounting it. If the command is still running it might be best to start from scratch by deleting the SQL database and re-copying/restoring it from the SP2010 version.
PS: it's definitely not recommended in a production environment, but it might be easier to give the farm account Sysadm to the SQL instance, at least while you attempt to Mount the DB to SP2013.

Related

partial user name upon installation of SQL Server 2017 Developer Edition

I'm in the process of setting up a new laptop for application development work and today I installed SQL Server 2017 Developer Edition on this computer. I used the Basic install option rather than the Customize install option. Some pertinent facts:
operating system is Windows 10
device name is MARIGOLD
administrator on this computer is an e-mail address and the characters that appear before the # symbol for the e-mail are knot22
When the confirmation screen was displayed after installing SQL Server, it showed the SQL Administrator as MARIGOLD\knot2 (see red line that points this out in screenshot). Notice that there is a 2 missing - was was expected was MARIGOLD\knot22. Why did it chop off the user name? Is there a way to fix this?
Your username on the computer is "knot2".
This may not match the display name.
The following procedure will lose all stored credentials. You may lose program data, bookmarks contact lists... as well as some file permissions
The easiest way to solve this is to:
Create a temporary admin account, Grant the account all privileges in SQL Server.
Login as that user.
Backup the entire C:\users\knot2 directory(including hidden and system files). You may have to reboot to do this.
Delete the "knot2" user.
Create "knot22" user.
Grant the "knot22" account all privileges in SQL Server.
Copy the backup of C:\users\knot2 into C:\users\knot22
Remove or disable the temporary user.
It is up to you to figure out if it is worth it or not.

MSSQL 2016 Server: All databases marked Recovery Pending state

Tonight I had run into this issue where all my databases on our production server were in a Recovery Pending state after doing a Windows (server 2016) Update, an update to my Redgate SQL Backup software and restarting the server. Looking at the logs I found that all of the databases were not accessible with an "Access denied" error. So I figured it was something to do with the user under which the MSSQLSERVER service was running. So I explicitly set permissions to the data and log folders for that user and restarted SQL Server service and all is fine again.
HOWEVER, this server has been running for a very long time - and I have not seen this kind of issue where suddenly the user doesn't have access to the data and log folders. SOMETHING had to have removed permissions on those folders. In addition, now when I look at the security tab of those folders, I see that the user I'm using to run the MSSQLSERVER is explicitly defined. But on our staging server, which has the exact same configuration, I DO NOT see the user explicitly defined there, yet the server is running along just fine.
SO - To my question. What the heck happened? Any ideas? Should I be worried that the user account running my MSSQLSERVER service is now explicitly defined in the Security tab of my data and log folders?
Use ALTER DATABASE ... REBUILD LOG ON. First set to Emergency, then rebuild the log, then set online and multi-user. You will get a warning that the database may not be transactionally consistent (and it is true).
Alter Database TestDB Set Emergency;
Go
Alter Database TestDB Rebuild Log On
(Name = N'TestDB_log',
FileName = N'L:\Path\To\LogFile\TestDB_log.ldf')
Go
Alter Database TestDB Set Online, Multi_user;
Go

How to setup MS SQL for Lightswitch intrinsic deploy - exception occurred when building the database for the application

Question
Sign in to vote
0
Sign in to vote
VS2013 Community html project, SQL2014 Standard db
Does anyone have a good walkthrough of deploying with an intrinsic db? Deployment with external db works fine, but not with intrinsic.
F5 build works fine on localhost with external or intrinsic db, server deploy to IIS/SQL works fine with external db... just not with intrinsic db...
None of the docs I have found are real detailed about how to setup sql server to handle the intrinsic deployment.
Created the sql project, selected that in LS app properties. Do I create a DB on the SQL server or does LS do that? The Publish dialog on the database step says the admin account will be used to "create and update" the db. Have tried sql admin account with and without specifying a target db. Can the user account be the same as the admin account? Tried that both ways.
Moved from RDS to a fully managed SQL instance and now works. – user5050939 just now edit delete

Whose logon is being used in a SQL Server 2008 Agent Job

I have an SSIS package that transfers some tables to CSV files on a network drive; it runs fine from my computer manually. I store it on the server in the MSDB database and execute it from there and it runs fine, but when I create a job that has one step that runs the SSIS package from MSDB it fails saying it can't find the CSV file name.
I spent all day yesterday figuring out this means a permissions issue with whatever logon credentials are being used through the job. The job owner shows to be domain/myuserid and step properties show they are using windows authentication with my username. The problem is, I know I have access to this folder.
The first line of the error log says: "Executed as user: servername\SYSTEM". So I made sure user "SYSTEM" has access to the network folder I want to load the files on, but I still get the same error.
The command line looks like #command=N'/SQL "\SSIS package name" /SERVER servername /CHECKPOINTING OFF /REPORTING E'
edit: I found SQL Server agent job account issue where someone asks who the job is run under and marc_s says "I can't seem to find any definitive answers on that one, really. Since my Jobs typically select and update stuff in the database, I am lead to assume that the "Owner" account will be used by default, unless you specify some other account on a given step"
Which also leads me to believe it is using my logon information that has access
The best practice that we've been able to come up with here is to make a domain account for SSIS and then set up a Proxy in SQL Server that is used to run the SSIS Package in a SQL Job.
I would say that the servername\SYSTEM account is a local account, and therefore won't have access to network folders on other servers.
You probably want to run this as a domain account of some sort, which does have access.
Typically this will be the SQL Server Agent, so check in the Services list, in the control panel, and see what account is running the agent, and if necessary change it to the appropriate account.
This may have knock on consequences though, so be careful what other jobs are running.

Visual Studio causes error in SQL Management Studio

This is my first try of Visual Basic 2010 Express, though I have 10 yrs+ experience in VBA.
I'm running Windows XP SP2 on a desktop pc with following installed:
Visual Basic 2010 Express... just installed!
SQL Server 205 Express ... been running on pc for 12 months
I've created a new DB in SQL for my test application, but have not added any users or permissions to it as I'm using Windows authentication.
I've created a new Windows Forms Solution in VB2010EXP and tried adding a new Data Source for my new SQL DB, but it keeps giving error message about not having rights ot the db.
2 days of searching on the web has confirmed many others with similar issues, but no obvious solution. Eventually I find a few threads about permissions and moving the mdf into the root of the HDD, so try moving my mdf file up closer to the root of the Hard Drive
msf was in C:\Documents and Settings\_SharedData\Application_Data\MSSQL2005\Data\
now in C:\SQL2005\Data\
Now I can finally add a data source to my Db and start to use VS.
Problem is now occasionally when I am workng in VB and then go to the SQL Management Studio and try and view/change my DB, it gives an error and I cant access my DB. I then have to detach and re attach to my DB before I can work on it.
So my questions are:
Surely the location of my MDF file
should not be critical???
Do I need to add a user and
permission to my DB or should VB be
able to deal with this automatically
as I'm using windows authentication
Are then any known issues with
VB/VS causing errors in SQL
Managment Studio?
Thanks in advance
Grant
SQL Server runs on a different Windows Account to the one you use. You can check this by going to services (Run > Services.msc) and under SQL Server, go to properties and the Log On tab. I think by default 2005 uses the 'Network Service' system account. Now the reason you can't attach an MDF sat inside your documents folder is that account doesn't have access to your documents. You could give it permission, but you're much better off having the databases closer to the root as you have done.
Your connection to the database is driven by the connection strings you use. My personal preference is to create SQL Login accounts for my applications, and give them the least possible permissions they require. You could do the same using a Windows Account if you prefer.
I'm sure there are a couple. What is the error you are getting that prevents you accessing the Db? If we can see this error we may be able to help better.
Hope that helps.