840 reputation
920
bio website
location New York, NY
age 37
visits member for 3 years, 6 months
seen Jun 3 at 13:53

May
23
comment Backup Restore Procedure error SQL Server 2008 R2
@AaronBertrand - Is it possible for filelistonly to return the wrong logical name? When I do a manual restore of the DB I get a different logical name than the one I see from the filelistonly.
May
23
comment Backup Restore Procedure error SQL Server 2008 R2
@AaronBertrand - I wish that was an option. Unfortunately reengineering the process the organization uses to spin up these sites is a multidepartment undertaking that is not likely to get off the ground at the moment.
May
22
comment Backup Restore Procedure error SQL Server 2008 R2
@AaronBertrand - I used SET SQL = N' RESTORE DATABASE ' + CONVERT(NVARCHAR(500), DestinationDB) + ' FROM DISK = ' + CONVERT(NVARCHAR(500), BackupPath) + ' WITH FILE = ' + CONVERT(NVARCHAR(500), Position) + ', MOVE ' + CONVERT(NVARCHAR(500), DataFile) + ' TO ' + CONVERT(NVARCHAR(500), NewDBFileName) + ', MOVE ' + CONVERT(NVARCHAR(500), LogFile) + ' TO ' + CONVERT(NVARCHAR(500), NewLFFileName) + ', NOUNLOAD, REPLACE, Stats = 10;' SELECT SQL.
May
22
revised Backup Restore Procedure error SQL Server 2008 R2
added 836 characters in body
May
22
comment Backup Restore Procedure error SQL Server 2008 R2
@AaronBertrand - well in the original the file paths are passed in as NVarchar variables so.... No. No quotes. However, I suspect I should have put them in for my example. sorry about that.
May
22
comment Backup Restore Procedure error SQL Server 2008 R2
@RLF - We are running SP2. Version number 10.50.4000.0 (x64)
May
22
comment Backup Restore Procedure error SQL Server 2008 R2
@AaronBertrand - I've added a print of the sql that is created as reqyested.
May
22
revised Backup Restore Procedure error SQL Server 2008 R2
added 408 characters in body
May
22
comment Backup Restore Procedure error SQL Server 2008 R2
Nope. Only one mdf and only one ldf file.
May
22
asked Backup Restore Procedure error SQL Server 2008 R2
Apr
25
comment Hidden user rights
That query returns nothing as well.
Apr
25
comment Hidden user rights
ok to test the public theory I created a new user assigned to the public role. logged into that user and attempted to create a table. The create table failed.
Apr
25
comment Hidden user rights
the user can create tables and temp tables yes. I'm not sure about the rights associated with the public role. I'll need to look them up.
Apr
25
comment Hidden user rights
Not using impersonation, No application roles defined. I ran both queries as sysadmin account and got the same results.
Apr
25
comment Hidden user rights
if it's helpful the login does not have any roles assigned to it either.
Apr
25
comment Hidden user rights
It is not a windows login. The user appears to be able to do this on all dtabases although I have been using a single database as my test case.
Apr
25
comment Hidden user rights
I've logged in as the sqlserver user that the apposes and yes username is returning the correct name. Query number 2 came back as a blank set and query number 3 gives me the name of one of our developers as the owner. Not the user that I'm troubleshooting.
Apr
25
comment Hidden user rights
the first query only came back with Connect Database. The second query came back with nothing. I tried running the revoke anyway but that didn't help. The user is still able to drop and create a table on the database.
Apr
24
asked Hidden user rights
Apr
16
awarded  Popular Question