Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Restore a database in SQL Server 6.5 Version Expand / Collapse
Author
Message
Posted Thursday, August 04, 2011 7:11 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 4:16 AM
Points: 35, Visits: 431
Hi Guys,

The backup file is in *.dat.gz which is a Gun Zip File.

Please help me in Unzipping the file and then restoring it in Server.

Source and destination are of Same versions.
Post #1154711
Posted Thursday, August 04, 2011 7:59 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 8:28 AM
Points: 20,462, Visits: 14,088
have you been able to at least successfully unzip the file?



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1154715
Posted Friday, August 05, 2011 1:06 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 4:16 AM
Points: 35, Visits: 431
Atlast i was able to unzip the file using winzip..

So please help me with the restore....
Post #1154779
Posted Friday, August 05, 2011 7:01 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 4:16 AM
Points: 35, Visits: 431
Database is also restored.. With Permissions....Thanks
Post #1155013
Posted Friday, August 05, 2011 7:22 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Thursday, January 16, 2014 12:03 PM
Points: 21,376, Visits: 9,594
Easiest thread ever. All poster should be like that .
Post #1155033
Posted Friday, August 05, 2011 9:10 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, January 03, 2014 3:52 PM
Points: 6,066, Visits: 5,277
Yeah, really easy, apparently nothing left for us to do..

CEWII
Post #1155128
Posted Friday, August 05, 2011 9:45 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 8:28 AM
Points: 20,462, Visits: 14,088
seven.srikanth (8/5/2011)
Database is also restored.. With Permissions....Thanks


Good to hear




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1155172
Posted Friday, August 05, 2011 7:52 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 4:16 AM
Points: 35, Visits: 431
Hey guys... The thread is easiest but restoration went like a mission....

After the Successful restoration the Customer gave me a Big Surprise Smile...
txtPost_CommentEmoticon('');


Anyways I'm just documenting the stuff.. Will Post Here Once done...

Thanks Guys
Post #1155471
Posted Sunday, August 07, 2011 12:30 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 4:16 AM
Points: 35, Visits: 431
Step 1:
Execute the Following in the database context where you need to pull those permissions, This will create a sp_showpermissions stored procedure.
/****** Stored Procedure dbo.sp_showpermissions v 1.0 ******/
CREATE PROCEDURE sp_showpermissions
@group VARCHAR(30) = NULL
AS
SET NOCOUNT ON
IF @group is NULL SELECT @group = 'public'
IF EXISTS (SELECT name from sysusers where name = @group and uid = gid)
BEGIN
SET NOCOUNT OFF
SELECT "ROLE NAME" = b.name,
"OBJECT NAME" = c.name,
"ACTION" = CASE a.action
WHEN 26 THEN 'REFERENCES'
WHEN 193 THEN 'SELECT'
WHEN 195 THEN 'INSERT'
WHEN 196 THEN 'DELETE'
WHEN 197 THEN 'UPDATE'
WHEN 198 THEN 'CREATE TABLE'
WHEN 203 THEN 'CREATE DATABASE'
WHEN 204 THEN 'GRANT_W_GRANT'
WHEN 205 THEN 'GRANT'
WHEN 206 THEN 'REVOKE'
WHEN 207 THEN 'CREATE VIEW'
WHEN 222 THEN 'CREATE PROCEDURE'
WHEN 224 THEN 'EXECUTE'
WHEN 228 THEN 'DUMP DATABASE'
WHEN 233 THEN 'CREATE DEFAULT'
WHEN 235 THEN 'DUMP TRANSACTION'
WHEN 236 THEN 'CREATE RULE'
END,
"TYPE" = CASE c.type
WHEN 'C' THEN 'C CHECK constraint'
WHEN 'D' THEN 'D Default or DEFAULT constraint'
WHEN 'F' THEN 'F FOREIGN KEY constraint'
WHEN 'K' THEN 'K PRIMARY KEY or UNIQUE constraint'
WHEN 'L' THEN 'L Log'
WHEN 'P' THEN 'P Stored procedure'
WHEN 'R' THEN 'R Rule'
WHEN 'RF' THEN 'RF Stored procedure for replication'
WHEN 'S' THEN 'S System table'
WHEN 'TR' THEN 'TR Trigger'
WHEN 'U' THEN 'U User table'
WHEN 'V' THEN 'V View'
WHEN 'X' THEN 'X Extended stored procedure'
END
FROM sysprotects a, sysusers b, sysobjects c
WHERE a.uid = b.uid
AND c.id = a.id
AND b.name = @group
ORDER BY b.name, c.name, a.action
END
ELSE
BEGIN
PRINT 'You did not provide a valid role name'
PRINT ''
SELECT 'Valid role names for the ' + db_name() + ' database are:'
PRINT ''
SELECT "Role Name"=name FROM sysusers WHERE uid = gid ORDER BY name
PRINT ''
PRINT ''
PRINT 'Syntax: sp_showpermissions [role_name]'
PRINT ''
PRINT 'sp_showpermissions with no parameter will show permissions for public'
END
SET NOCOUNT OFF
Step 2: Next, Script out the execute of the above script and give parameter as a role name. Repeate this with all the Roles. And save the results in Excel, which will reduce the post work to be done.
Step 3: Next, Script the logins and roles using syslogins and sysusers, there is nothing you can be done here so everything is to be done normally. I’m not a TSQL Coder to code all this stuff. So, I had done all this manually and taken them in excel.
FYI, now we will be having following information related to permissions.
Logins.
Logins and Roles associated.
Roles and Object Permissions
So we got the permissions.
Step 4: Proceed with the Restore using the following command,
LOAD DATABASE dbname
FROM disk = ‘......dat’
You will be done with the restoring the database, So now You need to proceed with the permissions.

Step 5: With the stuff you have got in Excel, make sure you change the stuff that will execute in the Query window. And then execute in the order, that will create the users for logins first and then object permissiosns to roles. So now thats it, You are done... Trust me... The above script is so handy....
Post #1155632
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse