Showing posts with label users. Show all posts
Showing posts with label users. Show all posts

Wednesday, March 28, 2012

how to transfer logins,pwds and current permissions

I need to restore a database and would have orphaned users I notice the
Transfer logins KB articles creates those logins and passwords.. But what
about the security such as if the login was dbowner or sysadmin or
processadmin . I am using SQL 2000I mean the transfer of logins and passwords in the MS KB articles
I believe the special sprocs listed there take care of the logins, passwords
and the SIDs so that the users in the databases are not orphaned but I was
just worried about how to transfer the Server roles. I believe the Database
access roles are within the database
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:e86%23PdHaDHA.2032@.TK2MSFTNGP10.phx.gbl...
> I'm not sure which transfer you are referring to (if you mean a mthod
which keep the correct SID or
> not).
> However, assuming that you do have matcing SID's (this is the first thing
to handle):
> Things like db_owner etc are inside the database, hence are transferred
with the restore.
> I'm pretty certain that the transfer of logins doesn't handle stuff in
master for your logins,
> though (sysadmin etc).
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eRpy$0EaDHA.4028@.tk2msftngp13.phx.gbl...
> > I need to restore a database and would have orphaned users I notice the
> > Transfer logins KB articles creates those logins and passwords.. But
what
> > about the security such as if the login was dbowner or sysadmin or
> > processadmin . I am using SQL 2000
> >
> >
>

Monday, March 26, 2012

How to track down lock escalation

Hi,
using MSSQL 2000 SP3 on an Win2003 Server. My DB has 60 highly concurrent
users. Occasionlly I see heavy lock escalation (performance monitor) which
leads to blocking situations. Althoug I tried to track down the blocking
statements, I was not able to figure out which statements lead to the
escalation.
Any idea, what I can trie to identify the statements causing the locks?
TIA
BerndHi
I'd try to determine which functions or actions of the application are leading to the lock escalation. You can use SP_LOCK to locate the blocking locks, and hence the tables invloved. You might also want to use DBCC INPUTBUFFER on the SpId which is doing the blocking, as this might give you clues as to what action the user is performing when the problem occurs. It depends on your application as to how useful this will be.
Once you have the action, examining the query plans from performing the actions with Query Analyiser should give you the problem statment. If you are getting a lock escalating to be a table lock, then you will be looking for Table Scans or Clustered Index Scans
There is also Profiler, which has a Lock:Escalation event, but once you start adding in all the event to collect all the SQL Statements, Profiler can start dropping event, especially when it's getting busy, which is just the bit you want. But if you can get the system to yourself and know the problem action, there shouldn't be any problem.sql

Friday, March 23, 2012

how to tell when a database was lasted accessed by general users?

Hi,
In the Subject, by general users, I meant those users who did regular
database operations, like insert, update, delete, etc. rather than the users
who have special privileges to do database maintenance operations, like
backup. We need to clean up those databases that haven't been accessed for
quite a while. Right now, we back up all the databases.
Thanks in advance,
BingHi
AFAIK there is not an easy way without either prolonged profiling or
possibly enabling C2 auditing. Alternatively products like auditdb from
Lumigent http://www.lumigent.com/products/auditdb.html would be able to tell
you, and log readers like their log explorer
http://www.lumigent.com/products/le_sql.html would be show updates.
A maverick approach may be to make the database readonly and see who squeals
!!
John
"bing" wrote:

> Hi,
> In the Subject, by general users, I meant those users who did regular
> database operations, like insert, update, delete, etc. rather than the use
rs
> who have special privileges to do database maintenance operations, like
> backup. We need to clean up those databases that haven't been accessed fo
r
> quite a while. Right now, we back up all the databases.
> Thanks in advance,
> Bing

how to tell when a database was lasted accessed by general users?

Hi,
In the Subject, by general users, I meant those users who did regular
database operations, like insert, update, delete, etc. rather than the users
who have special privileges to do database maintenance operations, like
backup. We need to clean up those databases that haven't been accessed for
quite a while. Right now, we back up all the databases.
Thanks in advance,
Bing
Hi
AFAIK there is not an easy way without either prolonged profiling or
possibly enabling C2 auditing. Alternatively products like auditdb from
Lumigent http://www.lumigent.com/products/auditdb.html would be able to tell
you, and log readers like their log explorer
http://www.lumigent.com/products/le_sql.html would be show updates.
A maverick approach may be to make the database readonly and see who squeals!!
John
"bing" wrote:

> Hi,
> In the Subject, by general users, I meant those users who did regular
> database operations, like insert, update, delete, etc. rather than the users
> who have special privileges to do database maintenance operations, like
> backup. We need to clean up those databases that haven't been accessed for
> quite a while. Right now, we back up all the databases.
> Thanks in advance,
> Bing
sql

how to tell when a database was lasted accessed by general users?

Hi,
In the Subject, by general users, I meant those users who did regular
database operations, like insert, update, delete, etc. rather than the users
who have special privileges to do database maintenance operations, like
backup. We need to clean up those databases that haven't been accessed for
quite a while. Right now, we back up all the databases.
Thanks in advance,
BingHi
AFAIK there is not an easy way without either prolonged profiling or
possibly enabling C2 auditing. Alternatively products like auditdb from
Lumigent http://www.lumigent.com/products/auditdb.html would be able to tell
you, and log readers like their log explorer
http://www.lumigent.com/products/le_sql.html would be show updates.
A maverick approach may be to make the database readonly and see who squeals!!
John
"bing" wrote:
> Hi,
> In the Subject, by general users, I meant those users who did regular
> database operations, like insert, update, delete, etc. rather than the users
> who have special privileges to do database maintenance operations, like
> backup. We need to clean up those databases that haven't been accessed for
> quite a while. Right now, we back up all the databases.
> Thanks in advance,
> Bing

Monday, March 19, 2012

how to syncronize record via ftp?

CIAO all people...!
Ihave 1 database di access 2000 built on 20 table...query and form,
users insert record easy from form.
I have Microsoft SQL Server Service Manager 7.00.623.
I have the same database in web space ...ex ...(ad esempio
ftp.tiscali.it/azienda/db/data.mdb)
how to syncronize record?
the all database is 60 mb
Access replica is ok for localhost or for a pc in lan...is not ok for
FTP...
Replica snapshot di SQL (with server distributore etc etc) is ok only for
SQL database but i have access...
Is this an Access question?
If so, please post it to microsoft.public.access.replication
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"miikii" <m_piccSPAM@.DELCAKKIOhotmail.com> wrote in message
news:42144f3e$0$6316$5fc30a8@.news.tiscali.it...
> CIAO all people...!
> Ihave 1 database di access 2000 built on 20 table...query and form,
> users insert record easy from form.
> I have Microsoft SQL Server Service Manager 7.00.623.
> I have the same database in web space ...ex ...(ad esempio
> ftp.tiscali.it/azienda/db/data.mdb)
> how to syncronize record?
> the all database is 60 mb
>
> Access replica is ok for localhost or for a pc in lan...is not ok for
> FTP...
> Replica snapshot di SQL (with server distributore etc etc) is ok only for
> SQL database but i have access...
>
>

Monday, March 12, 2012

How to sync users and logins in SQL2005 after restore

Does anyone have a script that synchronizes the users and logins in a
database after a restore for SQL 2005?
I used one for SQL 2000, but the domain groups are not synced, and the SQL
users are. So if any one knows how to do this, please post the answer!
The script I used that works half is the following:
[code]
DECLARE @.UserName nvarchar(255)
DECLARE orphanuser_cur cursor for
SELECT UserName = name
FROM sysusers
WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
suser_sname(sid) is null
ORDER BY name
--cannot translate sid to existing user=orphaned
OPEN orphanuser_cur
FETCH NEXT FROM orphanuser_cur INTO @.UserName
WHILE (@.@.fetch_status = 0)
BEGIN
PRINT @.UserName + ' user name being resynced'
EXEC sp_change_users_login 'Update_one', @.UserName, @.UserName
FETCH NEXT FROM orphanuser_cur INTO @.UserName
END
CLOSE orphanuser_cur
DEALLOCATE orphanuser_cur
go
[/code]
--
MCDBA 2000
MCSE 2000Hi
BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/516ef311-e83b-45c9-b9cd-0e0641774c04.htm
Take a look at this article
http://blogs.msdn.com/lcris/archive/category/11519.aspx
"G? Brander" <GBrander@.discussions.microsoft.com> wrote in message
news:EAE86B34-3DC8-4027-90C7-1029FC2A34AE@.microsoft.com...
> Does anyone have a script that synchronizes the users and logins in a
> database after a restore for SQL 2005?
> I used one for SQL 2000, but the domain groups are not synced, and the SQL
> users are. So if any one knows how to do this, please post the answer!
> The script I used that works half is the following:
> [code]
> DECLARE @.UserName nvarchar(255)
> DECLARE orphanuser_cur cursor for
> SELECT UserName = name
> FROM sysusers
> WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
> suser_sname(sid) is null
> ORDER BY name
> --cannot translate sid to existing user=orphaned
> OPEN orphanuser_cur
> FETCH NEXT FROM orphanuser_cur INTO @.UserName
> WHILE (@.@.fetch_status = 0)
> BEGIN
> PRINT @.UserName + ' user name being resynced'
> EXEC sp_change_users_login 'Update_one', @.UserName, @.UserName
> FETCH NEXT FROM orphanuser_cur INTO @.UserName
> END
> CLOSE orphanuser_cur
> DEALLOCATE orphanuser_cur
> go
> [/code]
> --
> MCDBA 2000
> MCSE 2000
>|||Thanks for your answer, but the first link does tell someting about changing
the db_owner, and I do not see the connection with my problem.
The second link tells me also nothing about my problem.
My problem is:
After a restore from a database to a server that already has the logins, the
users and logins are not in sync. So the id's from the users in the database
are not corresponding anymore. With the script I supplied in my startpost, I
can reconnect the SQL Server logins, but the Windows groups and Windows users
are not reconnected. (BOL:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/11eefa97-a31f-4359-ba5b-e92328224133.htm
[quote]sp_change_users_login cannot be used with Windows logins.[/quote])
MCDBA 2000
MCSE 2000
"Uri Dimant" wrote:
> Hi
> BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/516ef311-e83b-45c9-b9cd-0e0641774c04.htm
>
> Take a look at this article
> http://blogs.msdn.com/lcris/archive/category/11519.aspx
>
> "G? Brander" <GBrander@.discussions.microsoft.com> wrote in message
> news:EAE86B34-3DC8-4027-90C7-1029FC2A34AE@.microsoft.com...
> > Does anyone have a script that synchronizes the users and logins in a
> > database after a restore for SQL 2005?
> > I used one for SQL 2000, but the domain groups are not synced, and the SQL
> > users are. So if any one knows how to do this, please post the answer!
> >
> > The script I used that works half is the following:
> > [code]
> > DECLARE @.UserName nvarchar(255)
> > DECLARE orphanuser_cur cursor for
> > SELECT UserName = name
> > FROM sysusers
> > WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
> > suser_sname(sid) is null
> > ORDER BY name
> >
> > --cannot translate sid to existing user=orphaned
> >
> > OPEN orphanuser_cur
> > FETCH NEXT FROM orphanuser_cur INTO @.UserName
> >
> > WHILE (@.@.fetch_status = 0)
> > BEGIN
> > PRINT @.UserName + ' user name being resynced'
> >
> > EXEC sp_change_users_login 'Update_one', @.UserName, @.UserName
> >
> > FETCH NEXT FROM orphanuser_cur INTO @.UserName
> > END
> >
> > CLOSE orphanuser_cur
> > DEALLOCATE orphanuser_cur
> > go
> > [/code]
> >
> > --
> > MCDBA 2000
> > MCSE 2000
> >
>
>|||The database was the Microsoft CRM 3.0 database, and I solved it now, by
scripting the schema's and users, changed the scripts so, that the users
where connected tot the appropiate login's, deleted the schema's and users
and finaly recreated the users and schema's.
There should however be an easier way, because when there are objects owned
by schema's you are not able to delete the schema's.
So if anyone knows the answer, please respond.
--
MCDBA 2000
MCSE 2000
"Uri Dimant" wrote:
> Hi
> BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/516ef311-e83b-45c9-b9cd-0e0641774c04.htm
>
> Take a look at this article
> http://blogs.msdn.com/lcris/archive/category/11519.aspx
>
> "G? Brander" <GBrander@.discussions.microsoft.com> wrote in message
> news:EAE86B34-3DC8-4027-90C7-1029FC2A34AE@.microsoft.com...
> > Does anyone have a script that synchronizes the users and logins in a
> > database after a restore for SQL 2005?
> > I used one for SQL 2000, but the domain groups are not synced, and the SQL
> > users are. So if any one knows how to do this, please post the answer!
> >
> > The script I used that works half is the following:
> > [code]
> > DECLARE @.UserName nvarchar(255)
> > DECLARE orphanuser_cur cursor for
> > SELECT UserName = name
> > FROM sysusers
> > WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
> > suser_sname(sid) is null
> > ORDER BY name
> >
> > --cannot translate sid to existing user=orphaned
> >
> > OPEN orphanuser_cur
> > FETCH NEXT FROM orphanuser_cur INTO @.UserName
> >
> > WHILE (@.@.fetch_status = 0)
> > BEGIN
> > PRINT @.UserName + ' user name being resynced'
> >
> > EXEC sp_change_users_login 'Update_one', @.UserName, @.UserName
> >
> > FETCH NEXT FROM orphanuser_cur INTO @.UserName
> > END
> >
> > CLOSE orphanuser_cur
> > DEALLOCATE orphanuser_cur
> > go
> > [/code]
> >
> > --
> > MCDBA 2000
> > MCSE 2000
> >
>
>

How to sync users and logins in SQL2005 after restore

Does anyone have a script that synchronizes the users and logins in a
database after a restore for SQL 2005?
I used one for SQL 2000, but the domain groups are not synced, and the SQL
users are. So if any one knows how to do this, please post the answer!
The script I used that works half is the following:
[code]
DECLARE @.UserName nvarchar(255)
DECLARE orphanuser_cur cursor for
SELECT UserName = name
FROM sysusers
WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
suser_sname(sid) is null
ORDER BY name
--cannot translate sid to existing user=orphaned
OPEN orphanuser_cur
FETCH NEXT FROM orphanuser_cur INTO @.UserName
WHILE (@.@.fetch_status = 0)
BEGIN
PRINT @.UserName + ' user name being resynced'
EXEC sp_change_users_login 'Update_one', @.UserName, @.UserName
FETCH NEXT FROM orphanuser_cur INTO @.UserName
END
CLOSE orphanuser_cur
DEALLOCATE orphanuser_cur
go
[/code]
MCDBA 2000
MCSE 2000Hi
BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/516ef311-e83b-45c9-b9cd-
0e0641774c04.htm
Take a look at this article
http://blogs.msdn.com/lcris/archive/category/11519.aspx
"G? Brander" <GBrander@.discussions.microsoft.com> wrote in message
news:EAE86B34-3DC8-4027-90C7-1029FC2A34AE@.microsoft.com...
> Does anyone have a script that synchronizes the users and logins in a
> database after a restore for SQL 2005?
> I used one for SQL 2000, but the domain groups are not synced, and the SQL
> users are. So if any one knows how to do this, please post the answer!
> The script I used that works half is the following:
> [code]
> DECLARE @.UserName nvarchar(255)
> DECLARE orphanuser_cur cursor for
> SELECT UserName = name
> FROM sysusers
> WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
> suser_sname(sid) is null
> ORDER BY name
> --cannot translate sid to existing user=orphaned
> OPEN orphanuser_cur
> FETCH NEXT FROM orphanuser_cur INTO @.UserName
> WHILE (@.@.fetch_status = 0)
> BEGIN
> PRINT @.UserName + ' user name being resynced'
> EXEC sp_change_users_login 'Update_one', @.UserName, @.UserName
> FETCH NEXT FROM orphanuser_cur INTO @.UserName
> END
> CLOSE orphanuser_cur
> DEALLOCATE orphanuser_cur
> go
> [/code]
> --
> MCDBA 2000
> MCSE 2000
>|||Thanks for your answer, but the first link does tell someting about changing
the db_owner, and I do not see the connection with my problem.
The second link tells me also nothing about my problem.
My problem is:
After a restore from a database to a server that already has the logins, the
users and logins are not in sync. So the id's from the users in the database
are not corresponding anymore. With the script I supplied in my startpost, I
can reconnect the SQL Server logins, but the Windows groups and Windows user
s
are not reconnected. (BOL:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/11eefa97-a31f-4359-ba5b-e923
28224133.htm
[quote]sp_change_users_login cannot be used with Windows logins.[/qu
ote])
MCDBA 2000
MCSE 2000
"Uri Dimant" wrote:

> Hi
> BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/516ef311-e83b-45c9-b9c
d-0e0641774c04.htm
>
> Take a look at this article
> http://blogs.msdn.com/lcris/archive/category/11519.aspx
>
> "G? Brander" <GBrander@.discussions.microsoft.com> wrote in message
> news:EAE86B34-3DC8-4027-90C7-1029FC2A34AE@.microsoft.com...
>
>|||The database was the Microsoft CRM 3.0 database, and I solved it now, by
scripting the schema's and users, changed the scripts so, that the users
where connected tot the appropiate login's, deleted the schema's and users
and finaly recreated the users and schema's.
There should however be an easier way, because when there are objects owned
by schema's you are not able to delete the schema's.
So if anyone knows the answer, please respond.
--
MCDBA 2000
MCSE 2000
"Uri Dimant" wrote:

> Hi
> BOL
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/516ef311-e83b-45c9-b9c
d-0e0641774c04.htm
>
> Take a look at this article
> http://blogs.msdn.com/lcris/archive/category/11519.aspx
>
> "G? Brander" <GBrander@.discussions.microsoft.com> wrote in message
> news:EAE86B34-3DC8-4027-90C7-1029FC2A34AE@.microsoft.com...
>
>

How to switch identity within stored procedure

I want dynamically created views by one user get viewed by other users.
These users will not know who has created the view.
To make this possible I am trying to write a procedure which will switch
identity of user to dbo and then create a view and again restore original
identity. I have not found anything which will switch identity, what can be
used to do this part?
If this is not possible then how else this can be achievedhave a look at setuser
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Shilpa" <Shilpa@.discussions.microsoft.com> wrote in message
news:1AA35FFE-3C0C-40B6-8852-FCFDB4B1DB4F@.microsoft.com...
>I want dynamically created views by one user get viewed by other users.
> These users will not know who has created the view.
> To make this possible I am trying to write a procedure which will switch
> identity of user to dbo and then create a view and again restore original
> identity. I have not found anything which will switch identity, what can
> be
> used to do this part?
> If this is not possible then how else this can be achieved|||If the user is in the db_owner role, he could create some views with the dbo
schema and others with his own schema.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

How to switch identity within stored procedure

I want dynamically created views by one user get viewed by other users.
These users will not know who has created the view.
To make this possible I am trying to write a procedure which will switch
identity of user to dbo and then create a view and again restore original
identity. I have not found anything which will switch identity, what can be
used to do this part?
If this is not possible then how else this can be achievedhave a look at setuser
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Shilpa" <Shilpa@.discussions.microsoft.com> wrote in message
news:1AA35FFE-3C0C-40B6-8852-FCFDB4B1DB4F@.microsoft.com...
>I want dynamically created views by one user get viewed by other users.
> These users will not know who has created the view.
> To make this possible I am trying to write a procedure which will switch
> identity of user to dbo and then create a view and again restore original
> identity. I have not found anything which will switch identity, what can
> be
> used to do this part?
> If this is not possible then how else this can be achieved|||If the user is in the db_owner role, he could create some views with the dbo
schema and others with his own schema.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

How to switch identity using stored procedure

I want dynamically created views by one user get viewed by other users.
These users will not know who has created the view.
To make this possible I am trying to write a procedure which will switch
identity of user to dbo and then create a view and again restore original
identity. I have not found anything which will switch identity, what can be
used to do this part?
If this is not possible then how else this can be achievedHi,
Take a look into system procedure sp_changeobjectowner. This procedure will
help you to change the object owners.
Thanks
Hari
SQL Server MVP
"Shilpa" <Shilpa@.discussions.microsoft.com> wrote in message
news:F42A25B8-74B6-4192-BCEA-47EA588C90FE@.microsoft.com...
>I want dynamically created views by one user get viewed by other users.
> These users will not know who has created the view.
> To make this possible I am trying to write a procedure which will switch
> identity of user to dbo and then create a view and again restore original
> identity. I have not found anything which will switch identity, what can
> be
> used to do this part?
> If this is not possible then how else this can be achieved|||If you add the developers to the db_ddladmin database role, they can give
the procedure ownership to the 'dbo' schema when they create it.
A good practice is to use "CREATE PROCEDURE dbo.MyProcedure".
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Shilpa" <Shilpa@.discussions.microsoft.com> wrote in message
news:F42A25B8-74B6-4192-BCEA-47EA588C90FE@.microsoft.com...
>I want dynamically created views by one user get viewed by other users.
> These users will not know who has created the view.
> To make this possible I am trying to write a procedure which will switch
> identity of user to dbo and then create a view and again restore original
> identity. I have not found anything which will switch identity, what can
> be
> used to do this part?
> If this is not possible then how else this can be achieved

Wednesday, March 7, 2012

How to store Resume and cover letter into SQL Server?

Hi,

I am trying to create an asp.net web recruiting application for HR, which will give the users the ability to both copy/paste the Resume and cover letter in textbox and upload resume and cover letter, then submit it (which will be saved into SQL Server 2000 table).

I am thinking to save Resume and cover_letter as Image data type columns in SQL Server.

. Can someone give me a direction about how to save the uploaded resume and cover letter to table and if it's the easiest way to do it?

. What to deal with different formats of uploaded resumes? I hope to limit to only Word or HTML

. Since I also give user another option - copy/paste the resume and coverletter into a textboxes. Can I simply save the copy/paste resume and cover letter into text field column? Later, say, if any HR recruiter retrieve the text from database, will it concatonates everything together without line break?

Any ideas is appreciated.

You have two options use NChar 4000 or NVarchar 4000 and limit the size of the uploaded file so you can use ANSI SQL %Like% in your search or use NText and use Full Text index which is an add on to SQL Server dependent on Microsoft Search service with the Microsoft Catalog populated all the time to get search results. Full Text index uses Microsoft proprietry key word search as CONTAINS, CONTAINSTABLE, FREETEXT and FREETEXTTABLE. Run a search for Full Text index implementation in SQL Server BOL(books online) Hope this helps.|||

You can save the resume in the database in an image field

//Create a Buffer Stream to Hold the uploaded file
string FileName = GetFileName(txtFileUpload.PostedFile.FileName.ToString());
string FileType = txtFileUpload.PostedFile.ContentType.ToString();
int FileSize = int.Parse(txtFileUpload.PostedFile.ContentLength.ToString());
byte[] DocBuffer = new byte[FileSize];
Stream objSream;
objSream = txtFileUpload.PostedFile.InputStream;
objSream.Read(DocBuffer,0,FileSize);
//Pass this buffer as a paramter to a Stored procedure which will insert a new record into ur table
SqlParameter pcvContent = new SqlParameter("@.cvContent",SqlDbType.Image);
pcvContent.Direction = ParameterDirection.Input;
pcvContent.Value = cvContent;
dbCommand.Parameters.Add(pcvContent);
//======================================================================
to retrive the saved file from the database you have to do the following
do your select statment
Response.AddHeader("Content-Disposition","attachment; filename='"+ dr["FileName"].ToString() +"'");
Response.ContentType = dr["FileType"].ToString();
Response.BinaryWrite( (byte[]) dr["CvContent"]);
//=========================================================================
this the first solution.
The secound one is to create a resume builder.

|||Personally, I would consider storing BOTH the raw document in an IMAGEcolumn, and ripping the text of the document and storing that in a TEXTcolumn. This will allow you to set up a full-text index forsearching the resumes, while at the same time making it easy for usersto get the resumes back in whatever format they were submitted in.

|||

hi,

I need to do a keyword search in word and pdf documents. I tried using Index Server linked with SQL Server but its giving me many problems. So i'm planning to rip off the text from the word or pdf docs and store the text in a TEXT field as u said in one of the threads so that i can do a search easily.

Is it possible to read from a word or a pdf file and store it in a string. Sorry about contacting u directly

Thanks in Advance

Sunday, February 19, 2012

How to stop Default Params from running rpt

I have default parameters set up in my report to make it easier for the users
to have an idea on what types on inputs the report expects. How do I now get
the report to stop automatically running as soon as someone brings it up?
thanks in advance!"Carl Henthorn" wrote:
> I have default parameters set up in my report to make it easier for the users
> to have an idea on what types on inputs the report expects. How do I now get
> the report to stop automatically running as soon as someone brings it up?
> thanks in advance!
Maybe there is a better solution, but this may be a useful workaround :
create one extra parameter.. in the non queried list of values add 1 value
(start), do not give it a default value. The query only starts if that
parameter is set to start. You don't have to use it anywhere in your report..